/* =================================
   VERIFYHUB - FINAL DESIGN SYSTEM
================================= */

:root {
    --bg: #0F0F11;
    --panel: #18181B;
    --sidebar-bg: #09090B;
    --input-bg: #09090B;
    --border: #27272A;
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --success: #10B981;
    --danger: #EF4444;
    --text: #F4F4F5;
    --muted: #A1A1AA;
}

body.light-mode {
    --bg: #F4F4F5;
    --panel: #FFFFFF;
    --sidebar-bg: #FFFFFF;
    --input-bg: #F4F4F5;
    --border: #E4E4E7;
    --text: #18181B;
    --muted: #71717A;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

.hidden {
    display: none !important;
}

/* App Shell */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: background 0.3s;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

.brand-icon {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-label,
.eyebrow {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: var(--bg);
    color: var(--text);
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    background: var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--text);
}

.user-card small {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 1400px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.topbar h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: background 0.3s;
}

.stat-label {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-card strong {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

.stat-card small {
    color: var(--muted);
    font-size: 0.75rem;
}

/* Cards */
.workspace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: background 0.3s;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.card-heading h2 {
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
}

select,
input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 0.875rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: 0.2s;
    appearance: none;
}

select:focus,
input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    padding: 0.875rem;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    width: 100%;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--border);
}

/* Theme Toggle Button */
.btn-theme {
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.btn-theme:hover {
    background: var(--border);
    transform: scale(1.05);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.2;
}

.empty-state h3 {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Active State */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F59E0B;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.phone-container {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.phone-display {
    flex: 1;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    padding: 1.25rem;
    background: var(--input-bg);
    border: 1px dashed var(--border);
    border-radius: 12px;
    font-family: monospace;
    letter-spacing: 1px;
    color: var(--primary);
}

.btn-copy {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 70px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.2s;
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-copy:hover {
    background: var(--border);
    border-color: var(--primary);
}

/* Code Display */
.code-display {
    margin-top: 1rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 2px dashed var(--success);
    border-radius: 12px;
    text-align: center;
}

.code-display span {
    display: block;
    font-size: 0.85rem;
    color: var(--success);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.code-display strong {
    font-size: 3rem;
    font-weight: 800;
    color: var(--success);
    font-family: monospace;
    letter-spacing: 8px;
}

.timer-text {
    text-align: center;
    margin: 15px 0;
    color: var(--muted);
    font-family: monospace;
    font-size: 1.2rem;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Activity Feed */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.activity-item.completed {
    border-left: 4px solid var(--success);
}

.activity-item.pending {
    border-left: 4px solid #F59E0B;
}

.activity-item .time {
    font-size: 0.75rem;
    color: var(--muted);
}

.activity-empty {
    color: var(--muted);
    font-style: italic;
    text-align: center;
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: 12px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

td {
    padding: 15px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text);
}

tr:last-child td {
    border-bottom: none;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: var(--danger);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.8rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    font-weight: 500;
}

/* Page Animations */
.page-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wallet Styles (Updated for the new Dashboard look) */
.wallet-card {
    background: linear-gradient(145deg, #182B49 0%, #0F172A 100%);
    border: 1px solid #2A3C5A;
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

body.light-mode .wallet-card {
    background: linear-gradient(145deg, #EBF4FF 0%, #FFFFFF 100%);
    border: 1px solid #BFDBFE;
    color: #1E3A8A;
}

body.light-mode .wallet-label,
body.light-mode .wallet-card p {
    color: #64748B !important;
}

.wallet-label {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-balance {
    font-weight: 800;
    letter-spacing: -1px;
}

.wallet-min {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .navigation,
    .sidebar-label {
        display: none;
    } /* Hide nav on mobile */

    .brand {
        margin-bottom: 0;
    }

    .sidebar-bottom {
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1.5rem;
    }

    /* Toast Fix: Keep notifications above mobile navigation */
    .toast-container {
        bottom: 80px;
    }
}