/* ==========================================================================
   WHIP Admin — Sidebar Layout
   ========================================================================== */

:root {
    --admin-sidebar-width: 250px;
    --admin-sidebar-bg: #1e2a3a;
    --admin-sidebar-text: #a0aec0;
    --admin-sidebar-active: #3993e1;
    --admin-topbar-height: 56px;
    --admin-content-bg: #f5f7fa;
    --whip-primary: #253993;
    --whip-cta: #3993e1;
}

/* --- Base --- */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    background: var(--admin-content-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: #1a1a1a;
}

/* --- Layout --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    display: flex;
    flex-direction: column;
}

/* --- Sidebar --- */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar-bg);
    color: var(--admin-sidebar-text);
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.admin-sidebar-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-logo img {
    height: 32px;
    width: auto;
}

.admin-badge {
    background: var(--whip-cta);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Navigation --- */
.admin-nav {
    padding: 0.75rem 0;
}

.admin-nav-section {
    padding: 1rem 1.25rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.admin-nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.admin-nav-item.active {
    color: #fff;
    background: rgba(57,147,225,0.15);
    border-left-color: var(--admin-sidebar-active);
}

.admin-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Top Bar --- */
.admin-topbar {
    height: var(--admin-topbar-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-sidebar-toggle {
    color: #1a1a1a;
    font-size: 1.25rem;
    padding: 0;
}

/* --- Content --- */
.admin-content {
    padding: 1.5rem;
    flex: 1;
}

/* --- Stat Cards --- */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.15s ease;
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 0.25rem;
}

/* --- Tables --- */
.admin-table {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.admin-table .table {
    margin-bottom: 0;
}

.admin-table .table th {
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #718096;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.admin-table .table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

/* --- Badges --- */
.badge-new { background: #3993e1; }
.badge-contacted { background: #805ad5; }
.badge-negotiating { background: #d69e2e; }
.badge-won { background: #38a169; }
.badge-lost { background: #e53e3e; }
.badge-unread { background: #3993e1; }
.badge-read { background: #718096; }
.badge-responded { background: #38a169; }

/* --- Page Header --- */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.admin-page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* --- Forms --- */
.admin-form-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }
}

/* --- Login Page (standalone, no sidebar) --- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e2a3a 0%, #253993 100%);
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .login-logo img {
    height: 40px;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #a0aec0;
    font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.btn-google {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1a1a1a;
    font-weight: 500;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.btn-google:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}
