/* VPN Panel - Light Modern SaaS Dashboard */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-input: #f1f5f9;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fce7f3 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: width var(--transition);
    overflow: hidden;
    flex-shrink: 0;
}
.sidebar.collapsed { width: 72px; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.content { flex: 1; padding: 24px; animation: contentFadeIn 0.4s ease; }

@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loading overlay for SSH operations */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.6);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}
.loading-overlay.active {
    display: flex;
}
.loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-overlay .text {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Sidebar */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}
.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.sidebar-logo:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4); }
/* Panel logo - consistent sizing everywhere */
.panel-logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.sidebar-logo-img {
    max-height: 40px;
    max-width: 140px;
    object-fit: contain;
    flex-shrink: 0;
}
.sidebar-header-logo-only { justify-content: center; }
.sidebar-header-logo-only .sidebar-logo-img { max-width: 160px; max-height: 44px; }
.sidebar-title-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sidebar-title { font-weight: 600; font-size: 1.1rem; white-space: nowrap; overflow: hidden; color: var(--text); }
.sidebar-slogan { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-slogan { display: none; }
.sidebar-nav { padding: 16px 0; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 0 12px;
    margin-bottom: 4px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
}
.nav-item:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
    color: var(--primary);
    transform: translateX(4px);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0.04) 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; margin: 0 8px; }
.sidebar.collapsed .nav-item:hover { transform: none; }

/* Header */
.header {
    padding: 16px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.toggle-sidebar {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.toggle-sidebar:hover { color: var(--primary); background: rgba(99, 102, 241, 0.08); border-color: rgba(99, 102, 241, 0.3); }
.user-menu { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    transition: transform var(--transition-fast);
}
.user-avatar:hover { transform: scale(1.08); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.user-avatar { text-decoration: none; color: inherit; }
.logout-btn {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}
.logout-btn:hover { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); transform: translateY(-1px); }

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
    animation: cardSlideIn 0.4s ease backwards;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.2);
}
.card-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.card-body { padding: 20px; }

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow);
    animation: statPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(99, 102, 241, 0.2);
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

@keyframes statPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: #e2e8f0;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 140px; }
.price-summary { margin-top: 16px; padding: 12px 16px; background: var(--bg-input); border-radius: var(--radius-sm); }
.renew-user-info { margin-bottom: 16px; color: var(--text-muted); }
.modal.modal-lg { max-width: 700px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-muted); font-size: 14px; }
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    transition: all var(--transition-fast);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
tr { transition: background var(--transition-fast); }
tr:hover td { background: rgba(99, 102, 241, 0.04); }
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: transform var(--transition-fast);
}
.badge:hover { transform: scale(1.05); }
.badge-success { background: rgba(16, 185, 129, 0.15); color: #059669; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #d97706; }

/* Table bandwidth bar */
.table-bandwidth-bar {
    min-width: 180px;
    max-width: 220px;
}
.table-bandwidth-track {
    display: block;
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
    position: relative;
}
.table-bandwidth-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 6px;
    transition: width 0.3s ease;
}
.table-bandwidth-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Pagination */
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}
.pagination a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-1px);
}
.pagination .active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: alertSlide 0.3s ease;
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}
.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-2);
}
.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.12) 0%, transparent 50%);
    animation: bgFloat 15s ease-in-out infinite;
}
@keyframes bgFloat {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}
.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    animation: loginCardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-logo {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
    animation: logoPulse 2s ease-in-out infinite;
}
.login-logo-img {
    width: auto;
    height: auto;
    min-height: 48px;
    max-width: 100%;
    background: none;
    box-shadow: none;
    animation: none;
    overflow: hidden;
}
.login-logo-img img,
.login-logo-img .panel-logo {
    max-height: 56px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
@keyframes logoPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35); }
    50% { box-shadow: 0 12px 32px rgba(99, 102, 241, 0.45); }
}
.login-title { text-align: center; font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.login-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 32px; font-size: 14px; }
.login-card .form-group { margin-bottom: 20px; }
.login-card .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
}
.login-links { text-align: center; margin-top: 24px; }
.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}
.login-links a:hover { color: var(--secondary); text-decoration: underline; }

/* Dashboard */
.dashboard { max-width: 1400px; }
.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}
.dashboard-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}
.dashboard-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Stats grid variants */
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
    .stats-grid-3 { grid-template-columns: 1fr; }
    .stats-grid-2 { grid-template-columns: 1fr; }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}
.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 28px; height: 28px; }
.stat-users .stat-icon { background: rgba(99, 102, 241, 0.12); color: var(--primary); }
.stat-resellers .stat-icon { background: rgba(139, 92, 246, 0.12); color: var(--secondary); }
.stat-servers .stat-icon { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-balance .stat-icon { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.stat-content { flex: 1; min-width: 0; }

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.dashboard-card .card-body { padding: 0; }
.activity-list { max-height: 420px; overflow-y: auto; }
.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-fast);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: rgba(99, 102, 241, 0.03); }
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
    opacity: 0.6;
}
.activity-content { flex: 1; min-width: 0; }
.activity-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}
.activity-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}
.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.8;
    margin-top: 4px;
}

/* User list */
.user-list { padding: 8px 0; }
.user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-fast);
}
.user-item:last-child { border-bottom: none; }
.user-item:hover {
    background: rgba(99, 102, 241, 0.05);
}
.user-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; color: var(--text); display: block; }
.user-meta { font-size: 13px; color: var(--text-muted); }
.user-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}
.user-item:hover .user-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

/* Credentials modal */
.credentials-modal-body .credentials-intro {
    margin-bottom: 24px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    border-left: 4px solid var(--primary);
}
.credentials-modal-body .credentials-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.credentials-block {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 16px;
    border: 1px solid var(--border);
    transition: border-color var(--transition-fast);
}
.credentials-block:hover { border-color: rgba(99, 102, 241, 0.3); }
.credentials-block label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.copy-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.copy-row input, .copy-row textarea {
    flex: 1;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}
.copy-row textarea {
    min-height: 80px;
    resize: vertical;
}
.copy-row .btn { flex-shrink: 0; }
.credentials-block .copy-all-block {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06));
    border-color: rgba(99, 102, 241, 0.2);
}
.modal.credentials-modal { max-width: 560px; }

/* Account page */
.account-page { max-width: 900px; }
.account-hero {
    position: relative;
    background: var(--gradient-1);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 32px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.account-hero-bg {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.account-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}
.account-avatar-wrap { position: relative; }
.account-avatar-label {
    cursor: pointer;
    display: block;
}
.account-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 4px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
}
.account-avatar:hover { border-color: rgba(255,255,255,0.9); transform: scale(1.02); }
.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.account-avatar-initial {
    font-size: 48px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.account-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--transition);
}
.account-avatar-overlay svg { width: 24px; height: 24px; }
.account-avatar-label:hover .account-avatar-overlay { opacity: 1; }
#avatarInput { position: absolute; width: 0; height: 0; opacity: 0; }
.account-hero-info { flex: 1; min-width: 200px; }
.account-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.account-role {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}
.account-email { color: rgba(255,255,255,0.9); margin: 0; font-size: 0.95rem; }
.account-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .account-cards { grid-template-columns: 1fr; } }
.account-card .card-header { display: flex; align-items: center; justify-content: space-between; }
.card-badge {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary);
}
.card-badge-muted {
    background: var(--bg-input);
    color: var(--text-muted);
}
.account-form-grid { display: grid; gap: 20px; margin-bottom: 24px; }
.btn-save { display: inline-flex; align-items: center; gap: 8px; }
.account-info-list { display: flex; flex-direction: column; gap: 0; }
.account-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.account-info-item:last-child { border-bottom: none; padding-bottom: 0; }
.account-info-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}
.account-info-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    text-align: right;
}
.account-card { animation: cardSlideIn 0.4s ease backwards; }
.account-card:nth-child(1) { animation-delay: 0.1s; }
.account-card:nth-child(2) { animation-delay: 0.15s; }
.account-hero { animation: cardSlideIn 0.4s ease; }

/* Empty state */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}
.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state p { margin: 0; font-size: 15px; }

/* Page title */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text);
}

/* Search & filters */
.toolbar { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .form-control { max-width: 280px; }
.toolbar select.form-control { max-width: 180px; }

/* Actions */
.actions { display: flex; gap: 8px; }
.actions .btn { padding: 6px 12px; font-size: 13px; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition);
}
.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title { font-size: 1.2rem; font-weight: 600; color: var(--text); }
.modal-close {
    background: var(--bg-input);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.modal-close:hover { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Settings page */
.settings-page { max-width: 720px; }
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.settings-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    transition: all var(--transition);
}
.settings-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.04);
}
.settings-tab.active {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}
.settings-tab .tab-icon { font-size: 1.2rem; }
.settings-cards { display: flex; flex-direction: column; gap: 0; }
.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.settings-card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}
.settings-card-header h3 { font-size: 1.1rem; margin-bottom: 4px; }
.settings-card-header p { margin: 0; font-size: 14px; color: var(--text-muted); }
.settings-card-body { padding: 24px; }
.settings-card-divider { height: 1px; background: var(--border); }

.settings-card-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-input);
}
.form-hint { font-size: 12px; color: var(--text-muted); margin: -4px 0 8px 0; }
.logo-upload-area, .favicon-upload-area { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.logo-preview { padding: 12px; background: var(--bg-input); border-radius: var(--radius-sm); }
.logo-preview img,
.logo-preview .panel-logo { max-height: 64px; max-width: 220px; width: auto; height: auto; object-fit: contain; display: block; }
.favicon-preview img { width: 32px; height: 32px; }
.logo-inputs, .favicon-upload-area { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 200px; }
.template-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.template-tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.template-tab:hover { border-color: var(--primary); color: var(--primary); }
.template-tab.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Pagination info */
.pagination-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.pagination-info { font-size: 13px; color: var(--text-muted); }

/* Sidebar overlay for mobile (hidden on desktop) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity var(--transition);
}

/* Responsive - mobile/tablet: sidebar fully hidden off-screen, opens as overlay */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        height: 100vh !important;
        width: 260px !important;
        z-index: 1001;
        transform: translateX(-100%) !important;
        transition: transform var(--transition);
        box-shadow: var(--shadow-lg);
        margin: 0 !important;
    }
    .sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    .sidebar.collapsed {
        width: 260px !important;
        transform: translateX(-100%) !important;
    }
    .sidebar.collapsed.mobile-open {
        transform: translateX(0) !important;
    }
    .sidebar .sidebar-title, .sidebar .sidebar-slogan, .sidebar .nav-item span { display: block !important; }
    .sidebar .nav-item { justify-content: flex-start !important; padding: 12px 20px; margin: 0 12px 4px 12px; }
    .sidebar-overlay.visible {
        display: block !important;
        opacity: 1;
    }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .page-title { flex-direction: column; align-items: flex-start; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.4s ease forwards; }
