/* CogniLearn Theme Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-green: #0A4D34;
    --primary-green-hover: #073524;
    --accent-lime: #82CD09;
    --bg-light: #f8fafc;
    --grid-color: #f1f5f9;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    background-image: 
        linear-gradient(var(--grid-color) 1.5px, transparent 1.5px),
        linear-gradient(90deg, var(--grid-color) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    margin: 0;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    background-color: #ffffff;
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.logo-section svg {
    color: var(--primary-green);
}

.logo-text {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-dark);
    line-height: 1.1;
}

.logo-subtext {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item:hover:not(.disabled) {
    background-color: #f1f5f9;
    color: var(--primary-green);
}

.nav-item.active {
    background-color: var(--primary-green);
    color: #ffffff;
}

.nav-item.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

.logout-btn {
    background-color: #ffeef0;
    color: #dc2626;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: #fecdd3;
    color: #b91c1c;
}

/* Card layout adjustments */
.card-custom {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Banner Styling */
.banner-green {
    background: radial-gradient(circle at 10% 20%, var(--primary-green) 0%, #053322 90%);
    color: #ffffff;
    border-radius: 16px;
    padding: 2.25rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.banner-badge {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.banner-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.banner-subtitle {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

.btn-lime {
    background-color: var(--accent-lime);
    color: var(--primary-green-hover);
    border: none;
    font-weight: 700;
    padding: 0.65rem 1.75rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.btn-lime:hover {
    background-color: #92e00c;
    color: #000;
    transform: translateY(-1px);
}

.btn-outline-white {
    background-color: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-weight: 600;
    padding: 0.65rem 1.75rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.btn-outline-white:hover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.progress-banner-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    color: var(--text-dark);
    box-shadow: var(--shadow-soft);
}

/* Warnings and Alerts */
.warning-banner {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #b45309;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.warning-banner-text {
    font-weight: 600;
    font-size: 0.95rem;
}

.warning-banner-title {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

/* Form Styles */
.form-label-custom {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-control-custom {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-custom:focus {
    background-color: #ffffff;
    border-color: var(--primary-green);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(10, 77, 52, 0.1);
}

/* Authentication Page Styling */
.auth-container {
    max-width: 500px;
    margin: 4rem auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.auth-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 2.5rem;
}

.btn-primary-green {
    background-color: var(--primary-green);
    color: #ffffff;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-primary-green:hover {
    background-color: var(--primary-green-hover);
    color: #ffffff;
}

/* Onboarding Step Tracker Widget */
.step-tracker-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step-tracker-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-tracker-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-tracker-dot.completed {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.step-tracker-dot.active {
    background-color: #82CD09;
    color: #1e293b;
    border: 1px solid #82CD09;
}

.step-tracker-dot.locked {
    background-color: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #cbd5e1;
}

.step-tracker-content {
    flex-grow: 1;
}

.step-tracker-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.step-tracker-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.badge-custom {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    display: inline-block;
}

.badge-custom.completed {
    background-color: #ecfdf5;
    color: #065f46;
}

.badge-custom.pending {
    background-color: #fef9c3;
    color: #854d0e;
}

.badge-custom.locked {
    background-color: #f1f5f9;
    color: #64748b;
}

.badge-custom.rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ID Card Styles for Print */
.id-card-frame {
    width: 350px;
    height: 220px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.id-card-header {
    background-color: var(--primary-green);
    color: #ffffff;
    padding: 0.75rem 1rem;
    height: 48px;
    border-bottom: 3px solid var(--accent-lime);
}

.id-card-body {
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
    height: calc(100% - 48px);
}

.id-card-photo {
    width: 80px;
    height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: #f1f5f9;
    background-size: cover;
    background-position: center;
}

.id-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Admin Metric Widget */
.metric-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
}

.metric-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary-green);
}

.metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Profile Photo Preview Widget */
.photo-upload-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px dashed var(--border-color);
    padding: 1.5rem;
    border-radius: 12px;
    background-color: #f8fafc;
}

.photo-preview-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #cbd5e1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-green);
    flex-shrink: 0;
}

.photo-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Multi-step Navigation tab highlights */
.wizard-step-header {
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    padding-bottom: 0.5rem;
    cursor: default;
}

.wizard-step-header.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
}

.wizard-step-header.completed {
    color: var(--accent-lime);
}

/* Mobile elements hidden by default on desktop */
.sidebar-backdrop {
    display: none;
}

/* Responsive media queries for Mobile, Tablet, and TV */

/* Tablets & Mobile */
@media (max-width: 767.98px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }
    .logo-section {
        margin-bottom: 1rem;
    }
    main {
        padding: 1rem !important;
    }
    .banner-title {
        font-size: 1.5rem;
    }
    .banner-subtitle {
        font-size: 0.85rem;
    }
    .auth-container {
        margin: 1.5rem auto;
        padding: 10px;
    }
    .auth-card {
        padding: 1.5rem;
    }
    .metrics-grid, .metrics-container {
        grid-template-columns: 1fr !important;
    }
    /* Responsive tables */
    .table:not(.table-inline) {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Collapsible Drawer Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        z-index: 1050;
        background-color: #ffffff;
        box-shadow: 0 0 15px rgba(0,0,0,0.15);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        display: flex !important;
    }
    .sidebar.show {
        transform: translateX(0) !important;
    }
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px);
        z-index: 1040;
        display: none;
    }
    .sidebar-backdrop.show {
        display: block;
    }
}

/* TV & Large Displays */
@media (min-width: 1920px) {
    body {
        font-size: 18px;
    }
    .container-fluid {
        max-width: 1800px;
        margin: 0 auto;
    }
    .sidebar {
        padding: 2.5rem 1.5rem;
    }
    .logo-text {
        font-size: 1.6rem;
    }
    .nav-item {
        font-size: 1.1rem;
        padding: 1.1rem 1.5rem;
    }
    .banner-title {
        font-size: 2.5rem;
    }
    .banner-subtitle {
        font-size: 1.1rem;
        max-width: 800px;
    }
}
