/* ============================================
   BOT LIMA LR - Dashboard Styles
   Premium Dark Theme with Glassmorphism
   ============================================ */

/* ===== CSS Variables ===== */
:root {
    /* Primary Colors */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-dark: #5b21b6;
    --primary-glow: rgba(124, 58, 237, 0.4);

    /* Accent Colors */
    --accent: #06b6d4;
    --accent-light: #67e8f9;
    --accent-glow: rgba(6, 182, 212, 0.3);

    /* Success / Warning / Danger */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);

    /* Background Layers */
    --bg-base: #0a0a0f;
    --bg-surface: #12121a;
    --bg-card: #1a1a27;
    --bg-elevated: #22223a;
    --bg-hover: #2a2a42;

    /* Glass Effect */
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-strong: rgba(255, 255, 255, 0.06);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0a0a0f;

    /* Borders */
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(124, 58, 237, 0.5);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);

    /* Sizing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 72px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-hover);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.hidden {
    display: none !important;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-ring {
    position: absolute;
    inset: 0;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* ===== Login Screen ===== */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.login-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-base);
    overflow: hidden;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 8s ease-in-out infinite;
}

.login-orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-glow);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.login-orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-glow);
    bottom: -80px;
    left: -80px;
    animation-delay: -3s;
}

.login-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(16, 185, 129, 0.2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: var(--glass-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(124, 58, 237, 0.08);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 4px 24px var(--primary-glow);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Login Tabs */
.login-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-base);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.login-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.login-tab .material-symbols-rounded {
    font-size: 18px;
}

.login-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.login-tab:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group label .material-symbols-rounded {
    font-size: 16px;
    color: var(--primary-light);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn.client-btn {
    background: linear-gradient(135deg, var(--accent), #0891b2);
}

.login-btn.client-btn:hover {
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* Discord Login */
.discord-login-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.discord-info {
    text-align: center;
    padding: 16px;
    background: rgba(88, 101, 242, 0.06);
    border: 1px solid rgba(88, 101, 242, 0.15);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.discord-info .discord-logo {
    flex-shrink: 0;
}

.discord-info p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.discord-btn {
    background: linear-gradient(135deg, #5865F2, #4752C4) !important;
    text-decoration: none;
    margin-top: 0;
}

.discord-btn:hover {
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4) !important;
}

.discord-btn svg {
    flex-shrink: 0;
}

.license-btn {
    background: var(--bg-elevated) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border);
    font-size: 13px !important;
    padding: 10px !important;
    margin-top: 0;
}

.license-btn:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    white-space: nowrap;
}

.user-avatar.has-image {
    padding: 0;
    overflow: hidden;
}

.user-avatar.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.login-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--danger-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 13px;
    text-align: center;
    animation: shake 0.4s ease;
}

@keyframes shake {

    10%,
    90% {
        transform: translateX(-1px);
    }

    20%,
    80% {
        transform: translateX(2px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-4px);
    }

    40%,
    60% {
        transform: translateX(4px);
    }
}

/* ===== Dashboard Layout ===== */
.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width var(--transition);
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    min-height: 72px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.logo-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    color: white;
}

.logo-info {
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition);
}

.sidebar.collapsed .logo-info {
    opacity: 0;
    width: 0;
}

.logo-info h3 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.logo-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-light);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.nav-link .material-symbols-rounded {
    font-size: 20px;
    min-width: 20px;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.08));
    color: var(--primary-light);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.user-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.user-details {
    white-space: nowrap;
    overflow: hidden;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-status {
    display: block;
    font-size: 11px;
    color: var(--success);
}

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    transition: var(--transition);
}

.logout-btn:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.content-header {
    height: var(--header-height);
    min-height: var(--header-height);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h1 {
    font-size: 20px;
    font-weight: 700;
}

.header-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.server-select {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    cursor: pointer;
    min-width: 200px;
    outline: none;
    transition: var(--transition);
}

.server-select:focus {
    border-color: var(--primary);
}

.server-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===== Page Container ===== */
.page-container {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.purple {
    background: rgba(124, 58, 237, 0.12);
    color: var(--primary-light);
}

.stat-icon.cyan {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-light);
}

.stat-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon.orange {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-icon .material-symbols-rounded {
    font-size: 24px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Content Card */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header-left .material-symbols-rounded {
    font-size: 22px;
    color: var(--primary-light);
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.card-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body {
    padding: 24px;
}

.card-body.no-padding {
    padding: 0;
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn .material-symbols-rounded {
    font-size: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    box-shadow: 0 2px 12px var(--primary-glow);
    transform: translateY(-1px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #0891b2);
    color: white;
}

.btn-accent:hover {
    box-shadow: 0 2px 12px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-sm .material-symbols-rounded {
    font-size: 16px;
}

/* ===== Form Sections ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 12px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 20px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:hover td {
    background: var(--glass);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ===== Server Card ===== */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.server-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.server-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), transparent);
    opacity: 0;
    transition: var(--transition);
}

.server-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(124, 58, 237, 0.06);
}

.server-card:hover::after {
    opacity: 1;
}

.server-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.server-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.server-icon img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.server-name {
    font-size: 16px;
    font-weight: 700;
}

.server-id {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    margin-top: 2px;
}

.server-card-body {
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.server-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.server-stat .material-symbols-rounded {
    font-size: 16px;
}

.server-status {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    z-index: 1;
}

.server-status.active {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.server-status.inactive {
    background: var(--text-muted);
}

.server-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.license-key {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 4px 8px;
    border-radius: 4px;
    user-select: all;
}

/* ===== Add Server Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 28px;
}

.modal-icon.warning {
    color: var(--warning);
}

.modal-icon.danger {
    color: var(--danger);
}

.modal-icon.success {
    color: var(--success);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ===== Embed Preview ===== */
.embed-preview {
    background: #2f3136;
    border-radius: 4px;
    border-left: 4px solid var(--primary);
    padding: 16px;
    max-width: 520px;
    font-size: 14px;
}

.embed-preview .embed-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.embed-preview .embed-description {
    color: #dcddde;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.embed-preview .embed-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12px;
    color: #72767d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.embed-preview .embed-footer img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.embed-preview .embed-thumbnail {
    float: right;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    margin-left: 16px;
    object-fit: cover;
}

.embed-preview .embed-field {
    margin-top: 8px;
}

.embed-preview .embed-field-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.embed-preview .embed-field-value {
    font-size: 14px;
    color: #dcddde;
    white-space: pre-wrap;
}

/* Color input special styling */
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 44px;
    height: 44px;
    padding: 2px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-base);
    border: 1px solid var(--border);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-picker-group {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.color-picker-group input[type="text"] {
    flex: 1;
}

/* ===== Switch / Toggle ===== */
.switch-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.switch-group:last-child {
    border-bottom: none;
}

.switch-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.switch-label span:first-child {
    font-size: 14px;
    font-weight: 600;
}

.switch-label span:last-child {
    font-size: 12px;
    color: var(--text-muted);
}

.switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-elevated);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.switch input:checked+.switch-slider {
    background: var(--primary);
    border-color: var(--primary);
}

.switch input:checked+.switch-slider::before {
    transform: translateX(20px);
    background: white;
}

/* ===== Tags/Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-primary {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .material-symbols-rounded {
    font-size: 56px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ===== Toast Notification ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 300px;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

.toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--accent);
}

.toast-message {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    display: flex;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .content-header {
        padding: 0 16px;
    }

    .page-container {
        padding: 16px;
    }

    .server-select {
        min-width: 140px;
    }
}

/* ===== Log Entry ===== */
.log-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.log-entry:hover {
    background: var(--glass);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.log-dot.admin {
    background: var(--primary-light);
}

.log-dot.client {
    background: var(--accent);
}

.log-content {
    flex: 1;
}

.log-action {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.log-details {
    font-size: 12px;
    color: var(--text-secondary);
}

.log-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===== Utility ===== */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.w-full {
    width: 100%;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 13px;
}

.text-muted {
    color: var(--text-muted);
}

.font-mono {
    font-family: monospace;
}

/* ===== Pix Cards ===== */
.pix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.pix-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pix-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.pix-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--glass);
}

.pix-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--success), #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pix-card-avatar .material-symbols-rounded {
    font-size: 22px;
    color: white;
}

.pix-card-title {
    flex: 1;
    min-width: 0;
}

.pix-card-title h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pix-card-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pix-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon-danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.btn-icon .material-symbols-rounded {
    font-size: 18px;
}

.btn-icon-sm .material-symbols-rounded {
    font-size: 16px;
}

.pix-card-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pix-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pix-field-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.pix-field-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.pix-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pix-key-value {
    font-size: 13px;
    color: var(--accent-light);
    background: rgba(6, 182, 212, 0.08);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    flex: 1;
    word-break: break-all;
    border: 1px solid rgba(6, 182, 212, 0.15);
}

.pix-qr-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--glass);
    border-radius: 12px;
    border: 1px dashed var(--border);
}

.pix-qr-preview img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: contain;
    background: white;
    padding: 8px;
}

.pix-qr-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.empty-state.small {
    padding: 40px 20px;
}

.empty-state.small .material-symbols-rounded {
    font-size: 48px;
}

.empty-state.small h3 {
    font-size: 16px;
}

.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.pix-modal-form label .material-symbols-rounded {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 4px;
    color: var(--text-muted);
}

/* ===== Command Items ===== */
.command-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.command-item:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.command-item:last-child {
    margin-bottom: 0;
}

.command-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.command-icon {
    font-size: 22px;
    color: var(--primary-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.command-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.command-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.command-original {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--glass-strong);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.command-custom-input {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    width: 150px;
    font-family: monospace;
    transition: all 0.2s;
}

.command-custom-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.command-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

.card-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    .pix-grid {
        grid-template-columns: 1fr;
    }

    .command-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .command-name-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .command-custom-input {
        width: 100%;
    }
}