/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.auth-card {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #2a2a4a;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.auth-card .logo {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.auth-card h1 {
    font-size: 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 8px;
}

.auth-card p {
    text-align: center;
    color: #888;
    margin-bottom: 24px;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form input {
    width: 100%;
    padding: 12px 16px;
    background: #0a0a0a;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    outline: none;
    border-color: #4a4a8a;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #6a4a9a, #4a6a9a);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(74, 106, 154, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: #888;
}

.auth-footer a {
    color: #6a8aca;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
#app {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #0a0a0a;
    border-right: 1px solid #1a1a2e;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #1a1a2e;
}

.sidebar-header h2 {
    font-size: 20px;
    color: #fff;
}

.sidebar-header .subtitle {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #888;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
}

.sidebar-nav .nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
}

.sidebar-nav .nav-item:hover {
    background: #1a1a2e;
    color: #e0e0e0;
}

.sidebar-nav .nav-item.active {
    background: #1a1a2e;
    color: #6a8aca;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #1a1a2e;
}

.user-info {
    display: flex;
    align-items: center;
    color: #888;
    margin-bottom: 12px;
}

.user-info i {
    font-size: 24px;
    margin-right: 12px;
}

.btn-logout {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.btn-logout:hover {
    background: #2a1a1a;
    color: #ff6b6b;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-header {
    padding: 16px 24px;
    border-bottom: 1px solid #1a1a2e;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.btn-menu {
    background: transparent;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    margin-right: 16px;
    display: none;
}

.top-header h1 {
    font-size: 20px;
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-warning {
    background: #2a2a1a;
    color: #ffaa44;
}

.badge-success {
    background: #1a2a1a;
    color: #44ff88;
}

.badge-danger {
    background: #2a1a1a;
    color: #ff4444;
}

.badge i {
    font-size: 8px;
}

/* Pages */
.page-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: #2a2a4a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6a8aca;
}

.stat-info h3 {
    font-size: 24px;
    color: #fff;
}

.stat-info p {
    font-size: 12px;
    color: #888;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 24px;
}

.quick-actions h2 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #888;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.action-card {
    background: #1a1a2e;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e0e0e0;
    cursor: pointer;
    transition: border-color 0.3s, transform 0.2s;
}

.action-card:hover {
    border-color: #4a4a8a;
    transform: translateY(-2px);
}

.action-card i {
    font-size: 20px;
    color: #6a8aca;
}

/* Generate Page */
.generate-container {
    max-width: 600px;
    margin: 0 auto;
}

.generate-card {
    background: #1a1a2e;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #2a2a4a;
}

.generate-card h2 {
    margin-bottom: 24px;
    font-size: 20px;
}

.generate-card .form-group {
    margin-bottom: 16px;
}

.generate-card .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #888;
    font-size: 14px;
}

.generate-card .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #0a0a0a;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
}

.btn-large {
    padding: 14px;
    font-size: 16px;
}

/* Progress */
.progress-container {
    margin-top: 24px;
    background: #1a1a2e;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #0a0a0a;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6a4a9a, #4a6a9a);
    border-radius: 4px;
    transition: width 0.5s;
}

#progressText {
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* Results */
.results-container {
    margin-top: 24px;
}

.result-item {
    background: #1a1a2e;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #2a2a4a;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-item.success {
    border-color: #2a4a2a;
}

.result-item.failed {
    border-color: #4a2a2a;
}

.result-item .email {
    color: #6a8aca;
}

.result-item .password {
    color: #44ff88;
    font-family: monospace;
}

/* Accounts Table */
.accounts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.accounts-toolbar h2 {
    font-size: 20px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

.btn-secondary {
    padding: 8px 16px;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #2a2a4a;
}

.btn-danger {
    padding: 8px 16px;
    background: #2a1a1a;
    border: 1px solid #4a2a2a;
    border-radius: 6px;
    color: #ff6b6b;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #3a1a1a;
}

.accounts-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
}

.accounts-table th {
    background: #0a0a0a;
    padding: 12px 16px;
    text-align: left;
    color: #888;
    font-weight: 500;
    font-size: 12px;
    border-bottom: 1px solid #2a2a4a;
}

.accounts-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #1a1a2e;
}

.accounts-table tr:hover td {
    background: #0a0a0a;
}

.text-center {
    text-align: center;
    color: #666;
}

/* Settings */
.settings-container {
    max-width: 600px;
    margin: 0 auto;
}

.settings-card {
    background: #1a1a2e;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #2a2a4a;
}

.settings-card h2 {
    margin-bottom: 24px;
    font-size: 20px;
}

.status-display {
    margin-top: 24px;
    padding: 16px;
    background: #0a0a0a;
    border-radius: 8px;
}

.status-display p {
    margin: 4px 0;
    color: #888;
}

.status-display span {
    color: #e0e0e0;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.toast-success {
    background: #1a2a1a;
    border: 1px solid #2a4a2a;
    color: #44ff88;
}

.toast-error {
    background: #2a1a1a;
    border: 1px solid #4a2a2a;
    color: #ff6b6b;
}

.toast-info {
    background: #1a1a2a;
    border: 1px solid #2a2a4a;
    color: #6a8aca;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s;
    }

    .sidebar.open {
        left: 0;
    }

    .btn-menu {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .accounts-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .accounts-table {
        font-size: 12px;
    }

    .accounts-table th,
    .accounts-table td {
        padding: 8px 10px;
    }

    .top-header h1 {
        font-size: 16px;
    }

    .auth-card {
        padding: 24px;
        margin: 0 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 20px;
    }
}.device-badge {
    cursor: pointer; color: #6366f1; font-size: 12px;
    padding: 2px 8px; border-radius: 20px;
    background: rgba(99,102,241,.1); display: inline-block;
}
.device-badge:hover { background: rgba(99,102,241,.2); }
.device-details {
    position: absolute; background: #1e293b;
    border: 1px solid #334155; border-radius: 12px;
    padding: 16px; font-size: 11px; line-height: 1.8;
    z-index: 999; max-width: 360px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5); color: #94a3b8;
}
.device-details b { color: #e2e8f0; }
tr { position: relative; }
