/* ==========================================================================
   Cheapkart B2B Partner Portal Stylesheet
   Super Admin Aesthetic Theme
   ========================================================================== */

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #dcfce7;
    --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --bg-body: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
}

body { 
    background: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.5; 
    min-height: 100vh; 
}

/* ================= LOGIN SCREEN (Super Admin Theme) ================= */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}
.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.login-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
    position: relative;
    z-index: 10;
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border: 2px solid #bbf7d0;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 16px auto;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.15);
}
.login-title { font-size: 24px; font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
.login-subtitle { font-size: 13px; color: #64748b; margin-top: 6px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #0f172a;
}
.form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(16, 185, 129, 0.35);
}
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    box-shadow: none;
    border: 1px solid #cbd5e1;
}
.btn-secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
}

.login-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ================= MAIN PORTAL APP LAYOUT ================= */
.portal-app { display: flex; flex-direction: column; min-height: 100vh; }
.navbar {
    background: #0f172a;
    color: white;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.navbar-brand {
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.navbar-user { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.logout-btn:hover { background: #dc2626; }

.banner-warning {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    color: #b45309;
    padding: 12px 32px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.banner-success {
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    color: #15803d;
    padding: 12px 32px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-body {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 32px;
    flex: 1;
}

/* SUPER ADMIN STYLE NAV TABS */
.nav-tabs {
    display: flex;
    gap: 10px;
    background: #ffffff;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    flex-wrap: wrap;
}
.tab-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tab-btn:hover {
    color: #0f172a;
    background: #f8fafc;
}
.tab-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #ffffff;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
.stat-title { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 30px; font-weight: 800; color: #0f172a; margin-top: 6px; }

/* TABLES */
.table-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th {
    background: #f8fafc;
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
td { padding: 14px 18px; border-bottom: 1px solid #f1f5f9; color: #1e293b; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* STATUS PILLS */
.pill { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; display: inline-block; }
.pill-pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.pill-approved { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pill-rejected { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* CODE SNIPPETS & CONSOLE */
pre {
    background: #0f172a;
    color: #38bdf8;
    padding: 18px;
    border-radius: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    margin-top: 8px;
    border: 1px solid #1e293b;
}
code { font-family: monospace; background: #f1f5f9; color: #0f172a; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

/* SKELETON SHIMMER ROW */
.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================= MY PROFILE & KYC SIDE DRAWER ================= */
.drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 460px;
    max-width: 90vw;
    background: #f8fafc;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.side-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    background: #2563eb;
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.drawer-header-title {
    font-size: 16px;
    font-weight: 800;
    color: #ffffff;
}
.drawer-header-subtitle {
    font-size: 11px;
    color: #bfdbfe;
    margin-top: 2px;
    font-weight: 500;
}
.drawer-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.drawer-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-profile-hero {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.drawer-avatar-circle {
    width: 64px;
    height: 64px;
    background: #0284c7;
    color: white;
    font-size: 26px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25);
}
.drawer-partner-title {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
}
.drawer-partner-email {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    margin-bottom: 12px;
}

.drawer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.drawer-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 12px;
}
.drawer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}
.drawer-field {
    display: flex;
    flex-direction: column;
}
.drawer-field-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}
.drawer-field-value {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
    word-break: break-word;
}

.profile-nav-trigger {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.profile-nav-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}
