/* SoftBix Portal — Light Responsive Theme (all dashboards) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&display=swap');
:root {
    --yellow: #FFC700;
    --yellow-deep: #F5A800;
    --red: #F5A800;
    --green: #0C831F;
    --dark: #1A1B1F;
    --ink: #1A1B1F;
    --text: #1A1B1F;
    --muted: #5B5D67;
    --bg: #FFFFFF;
    --card: #FBFAF7;
    --border: #EEECE4;
    --shadow: 0 4px 20px rgba(26,27,31,.06);
    --radius: 14px;
    --sidebar-w: 260px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #F0F4F8;
    color: var(--text);
    line-height: 1.55;
    font-size: 15px;
    min-height: 100vh;
}
h1,h2,h3 { font-family: 'Baloo 2', cursive; }

a { color: var(--dark); text-decoration: none; }
a:hover { color: var(--red); }

/* ── Auth pages ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, #fff 0%, #f0f4f8 50%, #fff8e1 100%);
}
.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(28px, 5vw, 40px);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}
.auth-logo { font-family: 'Outfit', system-ui, sans-serif; font-size: clamp(26px, 5vw, 32px); font-weight: 800; color: var(--ink); display: block; margin-bottom: 20px; letter-spacing: -0.04em; }
.auth-logo .logo-bulb-wrap i { color: var(--yellow-deep); }
.auth-card h1 { font-size: clamp(20px, 4vw, 24px); margin-bottom: 8px; color: var(--dark); }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-form .form-field { margin-bottom: 16px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.auth-form input {
    width: 100%; padding: 12px 14px; background: #fff;
    border: 2px solid var(--border); border-radius: 10px; color: var(--text); font-size: 15px;
}
.auth-form input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,193,7,.2); }
.btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; background: var(--yellow); color: var(--dark);
    border: none; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 8px;
}
.btn-primary:hover { background: #e6ac00; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }
.alert-success { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; }

/* ── Layout ── */
.portal-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    z-index: 300;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 12px rgba(0,0,0,.04);
    transition: transform .3s ease;
}
.sidebar-logo {
    padding: 0 20px 20px;
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
}
.sidebar-logo span { color: var(--red); }
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 20px; color: var(--muted);
    font-size: 14px; font-weight: 500; transition: .2s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: #fff8e1; color: var(--dark); text-decoration: none;
    border-right: 3px solid var(--yellow);
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: 15px; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border); }

.portal-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 32px);
    min-height: 100vh;
    width: calc(100% - var(--sidebar-w));
    max-width: 100%;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(20px, 3vw, 28px);
    flex-wrap: wrap;
    gap: 12px;
}
.portal-header h1 { font-size: clamp(1.25rem, 3.5vw, 1.6rem); font-weight: 800; color: var(--dark); }
.portal-header .user-info { font-size: 14px; color: var(--muted); }

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: clamp(12px, 2vw, 20px);
    margin-bottom: clamp(20px, 3vw, 28px);
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(16px, 3vw, 22px);
    box-shadow: var(--shadow);
}
.stat-card .num { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; color: var(--red); }
.stat-card .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* ── Cards & tables ── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(16px, 3vw, 24px);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card h2 { font-size: clamp(1rem, 2.5vw, 1.15rem); margin-bottom: 16px; color: var(--dark); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table { width: 100%; border-collapse: collapse; font-size: clamp(12px, 2vw, 14px); min-width: 480px; }
th, td { padding: clamp(8px, 2vw, 12px) clamp(10px, 2vw, 14px); text-align: left; border-bottom: 1px solid #f0f0f0; }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
tr:hover td { background: #fafbfc; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none; transition: .2s; white-space: nowrap;
}
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-yellow { background: var(--yellow); color: var(--dark); }
.btn-yellow:hover { background: #e6ac00; text-decoration: none; color: var(--dark); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #c62828; text-decoration: none; color: #fff; }
.btn-outline { background: #fff; border: 2px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--yellow); color: var(--dark); text-decoration: none; }

/* ── Forms ── */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; background: #fff;
    border: 2px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,193,7,.15);
}
.form-group textarea { min-height: 100px; resize: vertical; }

/* ── Progress & timeline ── */
.progress-bar { height: 8px; background: #edf2f7; border-radius: 4px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); border-radius: 4px; transition: width .3s; }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 20px; padding-left: 20px; }
.timeline-item::before {
    content: ''; position: absolute; left: -22px; top: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--yellow); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--yellow);
}
.timeline-item .date { font-size: 12px; color: var(--muted); }
.timeline-item h4 { font-size: 15px; margin: 4px 0; color: var(--dark); }
.timeline-item p { font-size: 13px; color: var(--muted); }

.empty-state { text-align: center; padding: clamp(32px, 6vw, 48px) 20px; color: var(--muted); }
.empty-state i { font-size: clamp(36px, 8vw, 48px); color: #cbd5e0; margin-bottom: 16px; display: block; }

.pagination { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 13px; color: var(--muted); background: #fff;
}
.pagination a:hover, .pagination .current { background: var(--yellow); color: var(--dark); border-color: var(--yellow); text-decoration: none; }

/* ── Mobile menu ── */
.menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 400;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: var(--shadow);
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 250;
}
.sidebar-overlay.open { display: block; }

/* ── Responsive breakpoints ── */
@media (max-width: 1024px) {
    .portal-main { padding: 20px 16px; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .portal-main {
        margin-left: 0;
        width: 100%;
        padding: 16px 14px;
        padding-top: 56px;
    }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    table { min-width: 520px; }
}

@media (max-width: 480px) {
    .portal-header { flex-direction: column; align-items: flex-start; }
    .btn { padding: 10px 14px; font-size: 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .card { padding: 16px; border-radius: 12px; }
}

@media (max-width: 360px) {
    .stats-grid { grid-template-columns: 1fr; }
    .sidebar { width: min(280px, 88vw); }
}

/* Two-column dashboard layout */
.portal-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(16px, 3vw, 24px);
}

/* SMM pages inside portal — full-width content area */
.smm-panel-page { background: var(--bg) !important; }
.smm-panel-page .portal-main { padding: 0 !important; background: var(--bg); }

/* ── Internship course portal ── */
.portal-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.text-muted { color: var(--muted); font-size: 14px; }
.progress-bar.lg { height: 12px; border-radius: 8px; margin: 12px 0; }
.course-progress-note { font-size: 14px; color: var(--muted); margin-top: 10px; }
.intern-module-card { margin-bottom: 18px; }
.intern-module-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.intern-month { background: var(--yellow); color: var(--dark); font-weight: 800; padding: 8px 12px; border-radius: 10px; font-size: 14px; min-width: 48px; text-align: center; }
.intern-module-head h2 { font-size: 1.15rem; margin-bottom: 4px; }
.intern-module-head p { color: var(--muted); font-size: 14px; margin: 0; }
.intern-module-status { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.intern-module-status.done { color: var(--green); }
.intern-lesson-list { display: flex; flex-direction: column; gap: 8px; }
.intern-lesson-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; transition: .2s; }
.intern-lesson-item:hover { border-color: var(--yellow); background: #fffdf5; }
.intern-lesson-item.done { border-color: #c8e6c9; background: #f1f8f2; }
.intern-lesson-item span { flex: 1; font-weight: 500; }
.intern-lesson-item small { color: var(--muted); }
.intern-module-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.intern-final-card { background: linear-gradient(135deg, #fffdf0, #fff); border: 2px solid var(--yellow); }
.lesson-content-card .lesson-body { line-height: 1.7; }
.lesson-content-card .lesson-body h3, .lesson-content-card .lesson-body h4 { margin: 18px 0 8px; font-family: 'Baloo 2', cursive; }
.lesson-content-card .lesson-body ul, .lesson-content-card .lesson-body ol { margin: 8px 0 16px 20px; }
.lesson-complete-form { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.lesson-done-msg { color: var(--green); font-weight: 600; margin-top: 20px; }
.quiz-form .quiz-question { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.quiz-form .quiz-question h3 { font-size: 1rem; margin-bottom: 12px; }
.quiz-option { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.quiz-option:hover { background: #fffdf5; }
.quiz-option input { margin-top: 3px; }
.quiz-result-card.passed { border: 2px solid #a5d6a7; background: #f1f8f2; }
.quiz-result-card.failed { border: 2px solid #ef9a9a; background: #ffebee; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.certificate-card { padding: 0; overflow: hidden; }
.cert-border { padding: 16px; background: linear-gradient(135deg, #FFC700, #F5A800, #FFC700); }
.cert-inner { background: #fff; padding: clamp(24px, 4vw, 48px); text-align: center; border-radius: 8px; }
.cert-logo { max-height: 56px; margin-bottom: 12px; }
.cert-label { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.cert-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 8px 0; color: var(--dark); }
.cert-sub { color: var(--muted); margin-bottom: 20px; }
.cert-presented { margin-bottom: 8px; }
.cert-name { font-size: clamp(1.4rem, 3vw, 1.8rem); color: #b8860b; margin-bottom: 16px; }
.cert-body { max-width: 620px; margin: 0 auto 24px; line-height: 1.7; color: var(--text); }
.cert-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin: 24px 0; font-size: 14px; }
.cert-meta span { display: block; color: var(--muted); font-size: 12px; }
.cert-signatures { display: flex; justify-content: space-around; gap: 40px; margin-top: 32px; }
.cert-line { width: 160px; height: 1px; background: var(--dark); margin: 0 auto 8px; }
.cert-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.verify-details p { margin-bottom: 10px; font-size: 15px; }
.inline-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form-row input { margin-bottom: 0; flex: 1; min-width: 140px; }
@media print {
    .sidebar, .menu-toggle, .sidebar-overlay, .cert-actions, .portal-header a { display: none !important; }
    .portal-main { margin: 0 !important; padding: 0 !important; width: 100% !important; }
    .certificate-card { box-shadow: none; border: none; }
}