/* Antigravity Tools Inspired - Translation Quota Manager Modal Styles */

.trans-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.trans-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.trans-modal-card {
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    width: 95%;
    max-width: 980px;
    max-height: 90vh;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(99, 102, 241, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #f3f4f6;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.trans-modal-overlay.active .trans-modal-card {
    transform: scale(1) translateY(0);
}

/* Header */
.trans-modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #131d31;
}

.trans-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trans-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-space-gradient;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.trans-header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.trans-header-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 2px;
}

.trans-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trans-btn-refresh {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.trans-btn-refresh:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.trans-btn-add {
    background: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.trans-btn-add:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}

.trans-btn-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.trans-btn-close:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
}

/* Modal Body */
.trans-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Stat Cards Row */
.trans-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.trans-stat-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.trans-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #475569;
}

.trans-stat-card.blue::before { background: #3b82f6; }
.trans-stat-card.green::before { background: #10b981; }
.trans-stat-card.purple::before { background: #8b5cf6; }
.trans-stat-card.orange::before { background: #f59e0b; }

.trans-stat-title {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.trans-stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.trans-stat-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Dual Banner Cards (Current & Optimal) */
.trans-banner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.trans-banner-card {
    background: #172136;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trans-banner-card.optimal {
    border-color: rgba(16, 185, 129, 0.25);
    background: #112829;
}

.trans-banner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trans-banner-tag {
    font-size: 0.82rem;
    font-weight: 700;
    color: #60a5fa;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trans-banner-card.optimal .trans-banner-tag {
    color: #34d399;
}

.trans-banner-email {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trans-badge-pro {
    background: #4f46e5;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.trans-badge-free {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

/* Account List Section */
.trans-table-wrap {
    background: #182234;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    overflow: hidden;
}

.trans-table-head {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trans-table-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
}

.trans-list {
    display: flex;
    flex-direction: column;
}

.trans-item-row {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: grid;
    grid-template-columns: 2.2fr 3.2fr 1.6fr 1.4fr;
    align-items: center;
    gap: 16px;
    transition: background 0.15s;
}

.trans-item-row:last-child {
    border-bottom: none;
}

.trans-item-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.trans-item-row.is-current {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
}

.trans-acc-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trans-acc-email {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trans-acc-key {
    font-size: 0.75rem;
    color: #64748b;
    font-family: monospace;
}

/* Quota Bar Component */
.trans-quota-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trans-quota-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
}

.trans-quota-used {
    color: #94a3b8;
}

.trans-quota-pct {
    color: #10b981;
}

.trans-quota-pct.warn {
    color: #f59e0b;
}

.trans-quota-pct.danger {
    color: #ef4444;
}

.trans-bar-bg {
    width: 100%;
    height: 8px;
    background: #334155;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.trans-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.trans-bar-fill.warn {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

.trans-bar-fill.danger {
    background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
}

.trans-meta-time {
    font-size: 0.78rem;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Row Action Buttons */
.trans-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.trans-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trans-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.trans-action-btn.active-now {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    color: #60a5fa;
}

.trans-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Sub-modal: Add Account */
.trans-submodal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 100050 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.trans-submodal.active {
    display: flex !important;
}

.trans-submodal-card {
    background: #182234;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    margin: auto;
    padding: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.trans-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trans-input-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}

.trans-input-text {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.trans-input-text:focus {
    border-color: #3b82f6;
}

.trans-submodal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* Empty State */
.trans-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.trans-empty-icon {
    font-size: 2.5rem;
    opacity: 0.6;
}
