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

:root {
  --primary: #e8650a;
  --primary-dark: #c4540a;
  --primary-light: #fff3ec;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-gray: #f9fafb;
  --border: #e5e7eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.15);
  --radius: 12px;
}

body { font-family: 'Inter', -apple-system, Segoe UI, Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; border: none; transition: all 0.2s; cursor: pointer; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }

/* ── Card ── */
.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

/* ── Badges ── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-completed { background: #dbeafe; color: #1e40af; }
.badge-rescheduled { background: #ede9fe; color: #5b21b6; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 14px; transition: border-color 0.2s; background: white;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }

/* ── Grids ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Utilities ── */
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.gap-2 { gap: 16px; }
.text-muted { color: var(--text-light); font-size: 13px; }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }

/* ── Alerts / flash messages ── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #ecfdf5; color: #16a34a; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ══════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════ */
.nav { background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 200; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo { height: 42px; width: 42px; object-fit: contain; flex-shrink: 0; }
.nav-brand-text { font-weight: 800; font-size: 15px; line-height: 1.2; color: #1a1a2e; }
.nav-brand-sub { font-size: 11px; color: #e8650a; font-weight: 600; }
.nav-desktop { display: flex; align-items: center; gap: 22px; }
.nav-link { font-size: 14px; font-weight: 500; color: #374151; display: inline-flex; align-items: center; gap: 4px; }
.nav-logout { background: none; border: none; font-size: 14px; font-weight: 500; color: #ef4444; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-ham { display: none; background: none; border: none; color: #374151; padding: 4px; cursor: pointer; font-size: 22px; }
@media (max-width: 768px) {
  .nav-desktop { display: none !important; }
  .nav-ham { display: flex !important; }
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer { background: #1a1a2e; color: #9ca3af; padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-heading { color: white; font-weight: 700; margin-bottom: 16px; font-size: 15px; }
.footer-desc { font-size: 13px; line-height: 1.7; }
.footer-linklist { display: flex; flex-direction: column; gap: 8px; }
.footer-link { color: #9ca3af; font-size: 13px; }
.footer-contactlist { display: flex; flex-direction: column; gap: 10px; }
.footer-contactitem { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; text-align: center; font-size: 12px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ══════════════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════════════ */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.5); opacity: 0; } }

.hero-section { background: linear-gradient(135deg, #fff8f3 0%, #ffffff 65%); padding: 100px 0 80px; position: relative; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; }
.hero-inner { display: flex; align-items: center; gap: 60px; flex-wrap: wrap; }
.hero-content { flex: 1; min-width: 300px; }
.hero-badge { display: inline-block; background: linear-gradient(135deg,#fff3ec,#ffe8d6); color: #e8650a; padding: 7px 20px; border-radius: 20px; font-size: 13px; font-weight: 700; margin-bottom: 22px; border: 1px solid #fcd9c0; }
.hero-title { font-size: 46px; font-weight: 900; line-height: 1.12; margin-bottom: 18px; color: #1a1a2e; }
.hero-sub { font-size: 17px; color: #6b7280; margin-bottom: 32px; line-height: 1.75; max-width: 480px; }
.trust-row { display: flex; gap: 10px; flex-wrap: wrap; }
.trust-badge { background: #f3f4f6; color: #374151; padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.hero-right { flex: 1; min-width: 260px; display: flex; justify-content: center; }
.hero-img-wrap { position: relative; width: 340px; height: 380px; }
.pulse-ring { position: absolute; inset: -16px; border-radius: 50%; border: 2px solid rgba(232,101,10,0.3); animation: pulse-ring 2.5s ease-out infinite; }
.hero-img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; box-shadow: 0 30px 80px rgba(232,101,10,0.2); position: absolute; inset: 0; }
.float-badge { position: absolute; background: white; border-radius: 12px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); animation: float 3s ease-in-out infinite; }

.stats-bar { background: white; border-bottom: 1px solid #f3f4f6; padding: 28px 0; box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
.stats-row { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: wrap; }
.stat-item { text-align: center; padding: 0 48px; }
.stat-num { font-size: 34px; font-weight: 900; color: #e8650a; }
.stat-label { font-size: 13px; color: #6b7280; margin-top: 2px; }
.stat-divider { width: 1px; height: 48px; background: #e5e7eb; }

.section { padding: 90px 0; }
.section-tag { display: inline-block; background: #fff3ec; color: #e8650a; padding: 4px 16px; border-radius: 20px; font-size: 11px; font-weight: 800; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1.5px; }
.section-title { font-size: 34px; font-weight: 900; color: #1a1a2e; margin-bottom: 12px; }
.section-sub { color: #6b7280; font-size: 16px; }
.section-center { text-align: center; margin-bottom: 52px; }

.step-card { background: white; border-radius: 20px; padding: 36px 24px; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.07); position: relative; transition: transform 0.2s, box-shadow 0.2s; }
.step-card:hover { transform: translateY(-4px); }
.step-num { position: absolute; top: -14px; left: 20px; color: white; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.step-icon-box { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

.psy-card { background: white; border-radius: 20px; padding: 28px; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.07); transition: transform 0.25s, box-shadow 0.25s; }
.psy-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.12) !important; }
.psy-avatar-wrap { position: relative; width: 120px; height: 120px; margin: 0 auto 16px; }
.psy-avatar { width: 120px; height: 120px; border-radius: 50%; background: #fff3ec; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 4px solid #e8650a; font-size: 44px; }
.psy-avatar img { width: 100%; height: 100%; object-fit: cover; }
.psy-online { position: absolute; bottom: 6px; right: 6px; width: 16px; height: 16px; border-radius: 50%; background: #10b981; border: 3px solid white; }

.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; }
.service-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.07); display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(232,101,10,0.18); }
.service-card:hover .svc-btn { background: #c4540a; }
.service-img-wrap { position: relative; height: 180px; overflow: hidden; }
.service-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.service-img-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.35)); }
.service-icon-float { position: absolute; bottom: 12px; left: 16px; font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.service-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.service-title { font-weight: 800; font-size: 16px; margin-bottom: 10px; color: #1a1a2e; }
.service-desc { color: #6b7280; font-size: 13px; line-height: 1.75; flex: 1; margin-bottom: 18px; }
.svc-btn { display: inline-flex; align-items: center; gap: 7px; color: white; background: #e8650a; padding: 9px 20px; border-radius: 10px; font-weight: 700; font-size: 13px; align-self: flex-start; transition: background 0.2s; }

.why-section { position: relative; padding: 90px 0; overflow: hidden; background: #0f172a; }
.why-bg { position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 50%, rgba(232,101,10,0.12) 0%, transparent 60%), radial-gradient(circle at 80% 20%, rgba(99,102,241,0.1) 0%, transparent 50%); }
.why-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; padding: 32px; transition: all 0.25s; position: relative; z-index: 1; }
.why-card:hover { border-color: rgba(232,101,10,0.4); background: rgba(255,255,255,0.08); }
.why-icon-box { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; font-size: 26px; }

.testimonial-card { background: white; border-radius: 20px; padding: 28px; box-shadow: 0 4px 24px rgba(0,0,0,0.07); position: relative; overflow: hidden; }
.quote-icon { position: absolute; top: 12px; right: 20px; font-size: 72px; color: #f3f4f6; font-family: Georgia, serif; line-height: 1; }
.testimonial-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#e8650a,#ff8c42); color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }

.cta-section { position: relative; padding: 100px 0; overflow: hidden; background: linear-gradient(135deg, #e8650a 0%, #c4540a 50%, #ff8c42 100%); }
.cta-overlay { position: absolute; inset: 0; background-image: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%); }

.contact-item { display: flex; align-items: flex-start; gap: 16px; }
.contact-icon { width: 52px; height: 52px; border-radius: 14px; background: #fff3ec; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(232,101,10,0.15); font-size: 22px; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE — home page
══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .btn { font-size: 13px; padding: 9px 18px; }
  .flex-between { flex-direction: column; align-items: flex-start; }
  .mobile-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 560px; }
  .hero-section { padding: 60px 0 50px !important; }
  .hero-title { font-size: 30px !important; }
  .hero-img-wrap { width: 260px !important; height: 280px !important; }
  .stats-row { gap: 0 !important; flex-wrap: wrap !important; }
  .stat-item { padding: 12px 24px !important; }
  .why-grid { grid-template-columns: 1fr !important; }
  .section { padding: 60px 0 !important; }
}
@media (max-width: 480px) {
  .btn-sm { padding: 5px 11px; font-size: 12px; }
  .hero-title { font-size: 26px !important; }
  .hero-img-wrap { width: 220px !important; height: 240px !important; }
  .float-badge { display: none !important; }
  .stat-item { padding: 10px 16px !important; }
}

/* ── Dashboard sidebar overlay on mobile ── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; }
@media (max-width: 768px) { .sidebar-overlay.active { display: block; } }

/* ══════════════════════════════════════════════════════
   DASHBOARD LAYOUT (student/psychologist/admin)
══════════════════════════════════════════════════════ */
.dash-wrap { display: flex; min-height: 100vh; background: var(--bg-gray); }
.dash-sidebar { width: 240px; background: #1a1a2e; color: #d1d5db; flex-shrink: 0; padding: 20px 0; }
.dash-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 12px; }
.dash-nav-link { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #d1d5db; font-size: 14px; font-weight: 500; }
.dash-nav-link:hover, .dash-nav-link.active { background: rgba(232,101,10,0.15); color: #ff8c42; border-right: 3px solid #e8650a; }
.dash-nav-logout { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #f87171; font-size: 14px; font-weight: 500; background: none; border: none; width: 100%; text-align: left; cursor: pointer; }
.dash-main { flex: 1; min-width: 0; padding: 28px; }
.dash-topbar { display: none; align-items: center; justify-content: space-between; background: white; padding: 12px 16px; box-shadow: var(--shadow); margin-bottom: 16px; border-radius: 8px; }
@media (max-width: 768px) {
  .dash-sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 200; transform: translateX(-100%); transition: transform 0.25s ease; overflow-y: auto; }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-topbar { display: flex; }
  .dash-main { padding: 16px; }
}

table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; color: var(--text-light); border-bottom: 2px solid var(--border); padding: 8px 10px; }
table.data-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data-table tr:last-child td { border-bottom: none; }

/* ══════════════════════════════════════════════════════
   PRINT-READY SESSION REPORT
══════════════════════════════════════════════════════ */
.report-page { max-width: 760px; margin: 24px auto; background: white; }
.report-header { background: #e8650a; color: white; padding: 24px 32px; text-align: center; }
.report-header h1 { font-size: 20px; margin-bottom: 4px; }
.report-header .sub { font-size: 13px; opacity: .9; }
.report-meta { text-align: right; color: #6b7280; font-size: 11.5px; padding: 8px 32px 0; }
.report-body { padding: 24px 32px 40px; }
.report-section-title { color: #1a1a2e; font-size: 15px; font-weight: 700; border-bottom: 1px solid #e5e7eb; padding-bottom: 6px; margin: 22px 0 12px; }
.report-section-title.accent { color: #e8650a; font-size: 14px; }
.report-row { font-size: 13.5px; margin-bottom: 6px; }
.report-row strong { color: #1a1a2e; }
.report-footer { color: #9ca3af; font-size: 11px; font-style: italic; margin-top: 30px; border-top: 1px solid #e5e7eb; padding-top: 14px; }
.report-print-bar { max-width: 760px; margin: 0 auto; padding: 12px 32px; text-align: right; }
@media print {
  .report-print-bar, .nav, .footer { display: none !important; }
  .report-page { margin: 0; max-width: none; }
}

/* ══════════════════════════════════════════════════════
   STUDENT SEARCH (result-grabbing API integration)
══════════════════════════════════════════════════════ */
.ss-profile-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.ss-avatar { width: 110px; height: 140px; border-radius: 6px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; flex-shrink: 0; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.ss-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.ss-name { font-size: 19px; font-weight: 700; margin-top: 6px; }
.ss-htno { color: var(--text-light); font-size: 13.5px; font-family: monospace; margin-top: 2px; }
.ss-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.ss-info-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-light); font-weight: 600; }
.ss-info-value { font-size: 14.5px; margin-top: 2px; word-break: break-word; }
.ss-info-value.empty { color: var(--text-light); font-style: italic; }
.ss-stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.ss-stat-tile { flex: 1; min-width: 130px; background: #eff6ff; border-radius: 8px; padding: 14px 16px; text-align: center; }
.ss-stat-tile .ss-stat-value { font-size: 22px; font-weight: 700; color: var(--primary); }
.ss-stat-tile .ss-stat-label { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.ss-stat-tile.err { background: #fef2f2; }
.ss-stat-tile.err .ss-stat-value { color: var(--danger); }
.ss-badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 100px; }
.ss-badge.P { background: #ecfdf5; color: #16a34a; }
.ss-badge.F { background: #fef2f2; color: #dc2626; }
.ss-badge.other { background: #f1f5f9; color: var(--text-light); }
.ss-attempts-list { color: var(--text-light); font-size: 12px; margin-top: 3px; }
.ss-failed-codes { font-size: 13px; margin-top: 8px; color: var(--danger); }
