/* assets/css/style.css — Summer Internship Registration */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

/* Global heading styles */
h1 {
    font-family: 'Poppins', var(--font-display);
    font-weight: 700;
    margin: 0 0 12px 0;
}

:root {
    --navy:    #0A1628;
    --navy2:   #0F2044;
    --blue:    #3B82F6;
    --blue2:   #2563EB;
    --emerald: #10B981;
    --purple:  #8B5CF6;
    --amber:   #F59E0B;
    --red:     #EF4444;
    --soft:    #F8FAFC;
    --muted:   #94A3B8;
    --border:  #1E3A5F;
    --card:    #0D1F3C;
    --text:    #E2E8F0;
    --shadow:  0 4px 24px rgba(0,0,0,0.35);
    --radius:  14px;
    --font-display: 'Poppins', 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--navy);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── LAYOUT ── */
.page-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    background: var(--navy2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform .3s ease;
}

.sidebar-logo {
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo h2 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.sidebar-logo span { color: var(--blue); }
.sidebar-logo p { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .5px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 12px 12px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
    margin-bottom: 2px;
}
.nav-link i { width: 18px; font-size: 15px; }
.nav-link:hover { background: rgba(59,130,246,.1); color: var(--blue); }
.nav-link.active { background: rgba(59,130,246,.15); color: var(--blue); font-weight: 600; }
.nav-link.active i { color: var(--blue); }

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px; color: #fff;
    flex-shrink: 0;
}
.user-info p { font-size: 13px; font-weight: 600; color: #fff; }
.user-info span { font-size: 11px; color: var(--muted); }
.logout-btn {
    margin-left: auto;
    color: var(--muted);
    text-decoration: none;
    font-size: 16px;
    transition: color .2s;
}
.logout-btn:hover { color: var(--red); }

.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--navy2);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar h1 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 13px; color: var(--muted); }

.content-area { padding: 32px; flex: 1; }

/* ── CARDS ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.stat-card.blue::before  { background: var(--blue); }
.stat-card.green::before { background: var(--emerald); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.amber::before { background: var(--amber); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.stat-card.blue .stat-icon   { background: rgba(59,130,246,.15); color: var(--blue); }
.stat-card.green .stat-icon  { background: rgba(16,185,129,.15); color: var(--emerald); }
.stat-card.purple .stat-icon { background: rgba(139,92,246,.15); color: var(--purple); }
.stat-card.amber .stat-icon  { background: rgba(245,158,11,.15); color: var(--amber); }

.stat-value {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.stat-label { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 500; }

/* ── SECTION CARD ── */
.section-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.section-header h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.section-body { padding: 24px; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    
    border-left: 1px solid rgba(30,58,95,.9);
    
    min-height: 76px;
}

.detail-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59,130,246,.12);
    color: var(--blue);
    font-size: 15px;
}

.detail-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    word-break: break-word;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all .2s;
    white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue2); }
.btn-success { background: var(--emerald); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover  { background: #DC2626; }
.btn-warning { background: var(--amber); color: #000; }
.btn-warning:hover { background: #D97706; }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { background: rgba(255,255,255,.05); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── TABLE ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(30,58,95,.5);
    color: var(--text);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(59,130,246,.04); }

/* ── FORMS ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--muted);
}

input[type=text], input[type=email], input[type=password],
input[type=date], select, textarea {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
select option {
    background: #ffffff;
    color: #000000;
}
select option:checked {
    background: #dbeafe;
    color: #000000;
}
textarea { resize: vertical; min-height: 100px; }

.radio-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.radio-option {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; font-size: 14px;
}
.radio-option input[type=radio] { width: 16px; height: 16px; accent-color: var(--blue); }

/* ── TOGGLE ── */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,.1);
    border-radius: 24px;
    transition: .3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--emerald); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── ALERTS ── */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.3); color: #6EE7B7; }
.alert-error   { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #FCA5A5; }
.alert-info    { background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.3); color: #93C5FD; }

/* ── BADGE ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}
.badge-blue   { background: rgba(59,130,246,.2); color: var(--blue); }
.badge-green  { background: rgba(16,185,129,.2); color: var(--emerald); }
.badge-purple { background: rgba(139,92,246,.2); color: var(--purple); }
.badge-gray   { background: rgba(100,116,139,.2); color: var(--muted); }

/* ── ACTION BUTTONS IN TABLE ── */
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── LOGIN / REGISTER PAGE ── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}
.auth-left {
    flex: 0 0 50%;
    background: linear-gradient(135deg, var(--navy2) 0%, #0B1E3D 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}
.auth-left::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,.12) 0%, transparent 70%);
    top: -100px; right: -100px;
    pointer-events: none;
}
.auth-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(16,185,129,.1) 0%, transparent 70%);
    bottom: -50px; left: -50px;
    pointer-events: none;
}
.auth-brand {
    text-align: center;
    position: relative;
    z-index: 1;
}
.auth-brand .logo-icon {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    margin: 0 auto 28px;
    box-shadow: 0 8px 32px rgba(59,130,246,.4);
}
.auth-brand h1 {
    font-family: 'Poppins', var(--font-display);
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 12px;
}
.auth-brand h1 span { color: var(--blue); }
.auth-brand p { color: var(--muted); font-size: 15px; max-width: 320px; margin: 0 auto; }

.auth-features { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 340px; }
.auth-feature {
    display: flex; align-items: center; gap: 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
}
.auth-feature i { font-size: 20px; color: var(--blue); width: 24px; text-align: center; }
.auth-feature p { font-size: 13px; color: #CBD5E1; font-weight: 500; }

.auth-right {
    flex: 0 0 50%;
    width: 50%;
    background: var(--card);
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.auth-form-box { width: 100%; }
.auth-form-box h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.auth-form-box p { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.auth-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,.05);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: var(--muted);
    transition: all .2s;
}
.auth-tab.active { background: var(--blue); color: #fff; }

.auth-form-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.auth-link-row {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 22px;
}

.auth-link-row a {
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* ── COURSE CARDS GRID ── */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.course-card {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.course-card h4 { font-weight: 600; font-size: 15px; color: #fff; }
.course-card span { font-size: 13px; color: var(--muted); }
.course-card-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ── DOCUMENT PREVIEW ── */
.doc-preview {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    color: #1a1a1a;
    min-height: 400px;
    position: relative;
}
.doc-preview img.letterpad {
    width: 100%; height: 200px;
    object-fit: cover;
    display: block;
}
.doc-preview-body { padding: 32px; font-family: 'Georgia', serif; line-height: 1.8; }

/* ── SEARCH BAR ── */
.search-bar {
    position: relative;
    max-width: 320px;
}
.search-bar i {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 14px;
}
.search-bar input { padding-left: 36px; }

/* ── EMPTY STATE ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-state p { font-size: 15px; }

/* ── MODAL ── */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--navy2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #fff;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ── UPLOAD BOX ── */
.upload-box {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.upload-box:hover { border-color: var(--blue); background: rgba(59,130,246,.05); }
.upload-box i { font-size: 32px; color: var(--muted); margin-bottom: 12px; }
.upload-box p { font-size: 14px; color: var(--muted); }
.upload-box small { font-size: 12px; color: rgba(148,163,184,.6); }
.upload-preview { max-width: 100%; border-radius: 8px; margin-top: 12px; max-height: 180px; object-fit: cover; display: none; }

/* ── MOBILE SIDEBAR ── */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .auth-left { display: none; }
    .auth-right { width: 100%; border-left: none; }
    .content-area { padding: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .auth-right { padding: 32px 24px; }
}

/* ── MOBILE-FIRST OVERRIDES ── */
.page-wrapper {
    display: block;
    min-height: 100vh;
}

.sidebar {
    width: min(84vw, 320px);
    transform: translateX(-100%);
    box-shadow: 24px 0 48px rgba(0, 0, 0, 0.35);
}

.sidebar.open {
    transform: translateX(0);
}

.main-content {
    margin-left: 0;
    min-height: 100vh;
}

.topbar {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar > div {
    min-width: 0;
}

.topbar h1 {
    font-size: clamp(18px, 4.8vw, 24px);
}

.topbar-right {
    margin-left: auto;
    gap: 8px;
}

.content-area {
    padding: 16px;
}

.section-header {
    flex-direction: column;
    align-items: flex-start;
}

.section-body {
    padding: 20px;
}

.section-card > .section-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stats-grid,
.detail-grid,
.form-grid,
.course-grid,
.split-layout,
.split-layout-wide,
.template-grid,
.grid-two-up,
.doc-stats-grid,
.kpi-grid,
.info-grid,
.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.stats-grid { margin-bottom: 24px; }

.stat-card {
    padding: 20px;
}

.stat-value {
    font-size: clamp(26px, 8vw, 36px);
}

.detail-item {
    min-height: 0;
    padding: 14px 16px;
}

.auth-page {
    display: block;
    min-height: 100vh;
}

.auth-left {
    display: none;
}

.auth-right {
    width: 100%;
    min-height: 100vh;
    border-left: none;
    padding: 24px 16px;
}

.auth-form-box {
    max-width: 560px;
    margin: 0 auto;
}

.auth-form-box h2 {
    font-size: 22px;
}

.auth-tabs {
    margin-bottom: 20px;
}

.data-table {
    min-width: 640px;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-center {
    text-align: center;
}

.action-grid .btn {
    width: 100%;
    justify-content: center;
}

@media (min-width: 600px) {
    .stats-grid,
    .action-grid,
    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 720px) {
    .form-grid,
    .detail-grid,
    .course-grid,
    .split-layout,
    .grid-two-up,
    .template-grid,
    .doc-stats-grid,
    .kpi-grid,
    .split-layout-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-header {
        flex-direction: row;
        align-items: center;
    }
}

@media (min-width: 960px) {
    .page-wrapper {
        display: flex;
    }

    .sidebar {
        width: 260px;
        transform: none;
        box-shadow: none;
    }

    .main-content {
        margin-left: 260px;
    }

    .topbar {
        padding: 16px 32px;
        flex-wrap: nowrap;
    }

    .content-area {
        padding: 32px;
    }

    .auth-page {
        display: flex;
    }

    .auth-left {
        display: flex;
        flex: 0 0 50%;
    }

    .auth-right {
        width: 50%;
        min-height: auto;
        border-left: 1px solid var(--border);
        padding: 48px 40px;
    }

    .sidebar-toggle {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-stats-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .course-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
