:root {
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.3);
    --bg-dark: #020617; /* Deepest Navy */
    --surface: rgba(15, 23, 42, 0.8);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.06);
    --accent-gold: #fbbf24;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --card: rgba(15, 23, 42, 0.6);
    --card-hover: rgba(15, 23, 42, 0.8);
    --zinc-700: #3f3f46;
    --zinc-800: #27272a;
    --zinc-900: #18181b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
    /* Attractive Mesh Gradient Background */
    background: 
        radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(30, 64, 175, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 1) 0%, #020617 100%);
}

/* Premium Custom Scrollbar (Matching Reference) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #71717a; /* Zinc/Grey thumb */
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

/* Scrollbar Buttons (Arrows) */
::-webkit-scrollbar-button:single-button {
    background-color: transparent;
    display: block;
    background-size: 10px;
    background-repeat: no-repeat;
}

/* Up Arrow */
::-webkit-scrollbar-button:single-button:vertical:decrement {
    height: 12px;
    width: 12px;
    background-position: center 4px;
    background-image: url("data:image/svg+xml;rgba(255,255,255,0.5),%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='rgba(161, 161, 170, 0.8)' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 4.86l-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 00.753-1.659l-4.796-5.48a1 1 0 00-1.506 0z'/%3E%3C/svg%3E");
}

/* Down Arrow */
::-webkit-scrollbar-button:single-button:vertical:increment {
    height: 12px;
    width: 12px;
    background-position: center 2px;
    background-image: url("data:image/svg+xml;rgba(255,255,255,0.5),%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='rgba(161, 161, 170, 0.8)' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.011 2.345 4 3.204 4h9.592a1 1 0 01.753 1.659l-4.796 5.48a1 1 0 01-1.506 0z'/%3E%3C/svg%3E");
}

/* Decorative Background Elements */
body::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 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.02'%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");
    pointer-events: none;
    opacity: 0.5;
}

.container {
    width: 100%;
    max-width: 440px;
    z-index: 10;
    animation: fadeIn 1.2s ease-out;
}

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

.portal-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.logo-brand {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff 40%, #64748b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
}

.sub-header {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 2rem;
    font-weight: 600;
    opacity: 0.8;
}

.portal-card {
    background: var(--surface);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 2rem;
    width: 100%;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    text-align: center;
    position: relative;
}

/* Stepper */
.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    padding: 0 10px;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 40px;
    right: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.step-progress {
    position: absolute;
    top: 14px;
    left: 40px;
    width: 0%;
    height: 1px;
    background: var(--primary);
    transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Compact Admin Table Styling */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.admin-table th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.admin-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Compact Status Badges */
.badge {
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
    border: 1px solid transparent !important;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}

.badge-approved {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

/* Compact Action Buttons */
.action-btn {
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
}

/* Approve Button Specific */
.action-btn.approve-btn {
    background: #10b981 !important;
    color: #020617 !important;
    border-color: #10b981 !important;
}

.action-btn.approve-btn:hover {
    background: #34d399 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4) !important;
}

/* Delete Button Specific */
.action-btn.delete-btn {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

.action-btn.delete-btn:hover {
    background: #ef4444 !important;
    color: #fff !important;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0f172a;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step.active .step-circle {
    border-color: var(--primary);
    color: var(--primary);
    background: #020617;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.step.completed .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #020617;
}

.step-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.step.active .step-label { color: #fff; }

/* Content Areas */
.step-content {
    display: none;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-content.active {
    display: block;
}

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

.module-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.attention-box {
    background: rgba(251, 191, 36, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.15);
    border-radius: 20px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.attention-tag {
    background: var(--accent-gold);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.attention-text {
    color: #94a3b8;
    font-size: 0.8rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.yellow-btn {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    color: var(--accent-gold);
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.yellow-btn:hover {
    background: var(--accent-gold);
    color: #000;
}

.input-container {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    transition: color 0.3s;
}

.mr-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1rem 1rem 3rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.mr-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: rgba(0, 0, 0, 0.4);
}

.mr-input:focus + .input-icon {
    color: var(--primary);
}

.activate-btn {
    background: var(--primary);
    color: #020617;
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.activate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--primary-glow);
}

.footer-note {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #475569;
}

.footer-note span {
    display: block;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Toast Notification */
.notification-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--primary);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast::before {
    content: '✅';
    font-size: 1.2rem;
}

/* Admin Specific Styles */
.logo-brand {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.2px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.admin-sidebar {
    width: 260px;
    background: #0f172a; /* Professional Navy */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem 3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapse-toggle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.collapse-toggle:hover {
    background: var(--primary);
    color: #000;
}

/* Collapsed State */
.admin-layout.collapsed .admin-sidebar {
    width: 80px;
}

.admin-layout.collapsed .admin-main {
    margin-left: 80px;
}

.admin-layout.collapsed .logo-brand,
.admin-layout.collapsed .nav-item span {
    display: none;
}

.admin-layout.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}

.admin-layout.collapsed .collapse-toggle {
    transform: rotate(180deg);
}

.admin-layout.collapsed .admin-sidebar {
    padding: 2rem 1rem;
}

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

.nav-item {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.stat-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.admin-toolbar {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    background: var(--zinc-800);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 12px;
    color: #fff;
    font-size: 0.9rem;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.action-btn.copy {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.action-btn.copy:hover {
    background: var(--primary);
    color: #000;
}

/* Admin Login */
.admin-login-page {
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
}

.admin-login-shell {
    width: 100%;
    min-height: calc(100vh - 3rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-card {
    width: min(100%, 440px);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(22px);
}

.admin-login-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 2rem;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #fbbf24);
    color: #020617;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.35rem;
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.24);
}

.brand-name {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-subtitle {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.login-copy {
    margin-bottom: 1.5rem;
}

.login-copy .eyebrow {
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.login-copy h1 {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 0.7rem;
    letter-spacing: 0;
}

.login-copy p:last-child {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.login-alert {
    background: rgba(239, 68, 68, 0.1);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}

.admin-login-form {
    display: grid;
    gap: 1rem;
}

.login-field label {
    display: block;
    color: #cbd5e1;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.login-input-wrap input {
    width: 100%;
    height: 52px;
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    padding: 0 1rem 0 3rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input-wrap input::placeholder {
    color: #64748b;
}

.login-input-wrap input:focus {
    border-color: var(--primary);
    background: rgba(2, 6, 23, 0.78);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.login-input-wrap:focus-within svg {
    color: var(--primary);
}

.admin-login-button {
    width: 100%;
    height: 52px;
    margin-top: 0.25rem;
    background: var(--primary);
    color: #020617;
    border: 0;
    border-radius: 14px;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-login-button:hover {
    background: #34d399;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(16, 185, 129, 0.24);
}

.login-back-link {
    display: block;
    margin-top: 1.25rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-back-link:hover {
    color: var(--primary);
}

@media (max-width: 520px) {
    .admin-login-page {
        padding: 1rem;
    }

    .admin-login-shell {
        min-height: calc(100vh - 2rem);
    }

    .admin-login-card {
        padding: 1.35rem;
        border-radius: 20px;
    }

    .login-copy h1 {
        font-size: 1.65rem;
    }
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
