/* ============================================================
   GATE 5.0 Academy — Main CSS
   Pure CSS, no Tailwind.
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary:        hsl(213, 94%, 29%);
  --primary-hover:  hsl(213, 94%, 24%);
  --primary-fg:     hsl(213, 94%, 98%);
  --primary-10:     hsla(213, 94%, 29%, 0.10);
  --primary-20:     hsla(213, 94%, 29%, 0.20);
  --accent:         hsl(45, 100%, 55%);
  --accent-fg:      hsl(213, 94%, 12%);
  --background:     hsl(0, 0%, 100%);
  --foreground:     hsl(0, 0%, 9%);
  --card:           hsl(0, 0%, 98%);
  --card-border:    hsl(0, 0%, 94%);
  --sidebar-bg:     hsl(0, 0%, 96%);
  --sidebar-border: hsl(0, 0%, 92%);
  --sidebar-w:      16rem;
  --border:         hsl(0, 0%, 91%);
  --muted:          hsl(213, 6%, 92%);
  --muted-fg:       hsl(213, 6%, 38%);
  --secondary:      hsl(213, 5%, 90%);
  --secondary-fg:   hsl(213, 5%, 12%);
  --input-border:   hsl(0, 0%, 82%);
  --destructive:    hsl(0, 84%, 42%);
  --destructive-fg: hsl(0, 84%, 98%);
  --success:        hsl(142, 71%, 45%);
  --success-10:     hsla(142, 71%, 45%, 0.10);
  --radius:         0.5rem;
  --font:           Inter, 'Open Sans', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font); background: var(--background); color: var(--foreground); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; font-size: 1rem; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.text-muted { color: var(--muted-fg); }
.text-primary { color: var(--primary); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Typography ---------- */
h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; }
h2 { font-size: 1.875rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.15s; border: 1px solid transparent; white-space: nowrap; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-accent { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn-accent:hover { opacity: 0.9; }
.btn-outline { background: transparent; color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost { background: transparent; color: var(--foreground); border-color: transparent; }
.btn-ghost:hover { background: var(--muted); }
.btn-destructive { background: var(--destructive); color: var(--destructive-fg); border-color: var(--destructive); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1.125rem; }
.btn-icon { padding: 0.5rem; min-width: 2.25rem; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; transition: background 0.15s; display: flex; flex-direction: column; }
.card.card-hover:hover { background: hsl(0,0%,96%); }
.card-header { padding: 1.25rem 1.5rem 0; }
.card-content { padding: 1.25rem 1.5rem;}
.calendar.card-content {display: flex; flex-direction: row; gap: 1rem; justify-content: flex-start;}
.card-footer { padding: 0 1.5rem 1.25rem; margin-top: auto; }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.card-desc { font-size: 0.875rem; color: var(--muted-fg); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; }
.badge-default { background: var(--primary); color: var(--primary-fg); }
.badge-secondary { background: var(--secondary); color: var(--secondary-fg); }
.badge-destructive { background: var(--destructive); color: var(--destructive-fg); }
.badge-success { background: #22c55e; color: #fff; }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }

/* ---------- Form Elements ---------- */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.label { font-size: 0.875rem; font-weight: 500; }
.input, .textarea, .select { padding: 0.5rem 0.75rem; border: 1px solid var(--input-border); border-radius: var(--radius); background: var(--background); color: var(--foreground); font-size: 0.875rem; transition: border-color 0.15s, box-shadow 0.15s; width: 100%; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-10); }
.textarea { resize: vertical; min-height: 8rem; }
.select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }
.search-wrap { position: relative; }
.search-wrap .search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; width: 1rem; height: 1rem; }
.search-wrap .input { padding-left: 2.25rem; }

/* ---------- Progress ---------- */
.progress-bar { height: 0.5rem; background: var(--muted); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.3s; }

/* ---------- Avatar ---------- */
.avatar { border-radius: 50%; background: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--muted-fg); flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm  { width: 2rem;   height: 2rem;   font-size: 0.75rem; }
.avatar-md  { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg  { width: 4rem;   height: 4rem;   font-size: 1.25rem; }

/* ---------- Tabs ---------- */
.tabs-list { display: flex; background: var(--muted); border-radius: var(--radius); padding: 0.25rem; gap: 0.25rem; width: fit-content; }
.tab-btn { padding: 0.4rem 1rem; border-radius: calc(var(--radius) - 2px); font-size: 0.875rem; font-weight: 500; cursor: pointer; border: none; background: transparent; color: var(--muted-fg); transition: all 0.15s; white-space: nowrap; }
.tab-btn.active { background: var(--background); color: var(--foreground); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Toast ---------- */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; z-index: 9999; pointer-events: none; }
.toast { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 1rem 1.25rem; min-width: 280px; max-width: 380px; box-shadow: 0 4px 12px rgba(0,0,0,0.12); animation: toastIn 0.3s ease; pointer-events: all; }
.toast-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.toast-desc  { font-size: 0.825rem; color: var(--muted-fg); }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 0.25rem; min-width: 140px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 100; display: none; }
.dropdown-menu.open { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: calc(var(--radius) - 2px); font-size: 0.875rem; cursor: pointer; border: none; background: transparent; color: var(--foreground); width: 100%; text-align: left; transition: background 0.1s; }
.dropdown-item:hover { background: var(--muted); }
.dropdown-item.active { background: var(--accent); color: var(--accent-fg); }

/* ============================================================
   PUBLIC HEADER
   ============================================================ */
.pub-header { position: sticky; top: 0; z-index: 50; background: var(--background); border-bottom: 1px solid var(--border); }
.pub-header .inner { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.pub-header .logo { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; border-radius: var(--radius); transition: background 0.15s; }
.pub-header .logo:hover { background: var(--muted); }
.logo-icon { width: 2rem; height: 2rem; color: var(--primary); }
.logo-text { font-size: 1.125rem; font-weight: 600; }
.logo-sub  { font-size: 0.7rem; color: var(--muted-fg); line-height: 1; }
.pub-nav { display: flex; align-items: center; gap: 1.5rem; }
.pub-nav a { font-size: 0.875rem; font-weight: 500; color: var(--muted-fg); transition: color 0.15s; }
.pub-nav a:hover { color: var(--foreground); }
.pub-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ============================================================
   APP SIDEBAR LAYOUT
   ============================================================ */
.app-layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); display: flex; flex-direction: column; flex-shrink: 0; transition: width 0.25s ease; overflow: hidden; }
.sidebar.collapsed { width: 0; }
.sidebar-header { border-bottom: 1px solid var(--sidebar-border); padding: 1rem; flex-shrink: 0; }
.sidebar-logo { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; border-radius: var(--radius); transition: background 0.15s; }
.sidebar-logo:hover { background: var(--muted); }
.sidebar-logo-name { font-size: 1rem; font-weight: 600; }
.sidebar-logo-sub  { font-size: 0.7rem; color: var(--muted-fg); line-height: 1; }
.sidebar-content { flex: 1; overflow-y: auto; padding: 0.75rem; }
.sidebar-group { margin-bottom: 1.5rem; }
.sidebar-group-label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-fg); padding: 0 0.5rem; margin-bottom: 0.25rem; }
.sidebar-menu { display: flex; flex-direction: column; gap: 0.125rem; }
.sidebar-link { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.75rem; border-radius: calc(var(--radius) - 2px); font-size: 0.875rem; font-weight: 500; color: var(--foreground); transition: background 0.15s; white-space: nowrap; }
.sidebar-link:hover  { background: hsl(213,6%,88%); }
.sidebar-link.active { background: var(--primary); color: var(--primary-fg); }
.sidebar-link svg    { width: 1rem; height: 1rem; flex-shrink: 0; }
.sidebar-footer { border-top: 1px solid var(--sidebar-border); padding: 1rem; flex-shrink: 0; }
.sidebar-user { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 0.7rem; color: var(--muted-fg); }
.sidebar-footer-btns { display: flex; gap: 0.5rem; }
.sidebar-footer-btns .btn { flex: 1; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 199; }
.sidebar-overlay.open { display: block; }
.app-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.app-topbar h1 { font-size: 1.25rem; font-weight: 600; }
.sidebar-toggle { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; cursor: pointer; transition: background 0.15s; }
.sidebar-toggle:hover { background: var(--muted); }
.sidebar-toggle svg { width: 1rem; height: 1rem; }
.app-content { flex: 1; overflow-y: auto; padding: 1.5rem; }
.page-inner  { max-width: 80rem; margin: 0 auto; }
.page-heading { margin-bottom: 1.5rem; }
.page-heading h2 { font-size: 1.875rem; margin-bottom: 0.25rem; }
.page-heading p  { color: var(--muted-fg); }

/* ============================================================
   HOME
   ============================================================ */
.hero { position: relative; background: linear-gradient(135deg, hsl(213, 94%, 29%) 0%, hsla(213, 94%, 29%, 0.8) 100%); color: var(--primary-fg); padding: 6rem 0; overflow: hidden;}
.hero::before { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 10 0 L 0 0 0 10' fill='none' stroke='white' stroke-opacity='.05' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23g)'/%3E%3C/svg%3E"); opacity: 0.3; }
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: 1.5rem; }
.hero > .hero-inner > p { font-size: clamp(1rem, 2vw, 1.35rem); color: hsla(213,94%,98%,0.9); max-width: 42rem; margin: 0 auto 2.5rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-btn-outline { border: 2px solid hsla(213,94%,98%,0.3); color: var(--primary-fg) !important; background: hsla(213,94%,98%,0.05); }
.hero-btn-outline:hover { background: hsla(213,94%,98%,0.12); }
.hero-features { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; max-width: 48rem; margin: 0 auto; }
.hero-feature { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; }
.hero-icon-wrap { width: 4rem; height: 4rem; border-radius: 0.75rem; background: hsla(45,100%,55%,0.2); display: flex; align-items: center; justify-content: center; }
.hero-icon-wrap svg { width: 2rem; height: 2rem; color: var(--accent); }
.hero-feature h3 { font-size: 1.125rem; color: var(--primary-fg); }
.hero-feature p  { font-size: 0.875rem; color: hsla(213,94%,98%,0.8); }
.hero-subtitle {font-size: 1.5rem; line-height: 2rem; margin-bottom: 2rem;}
.section { padding: 4rem 0; }
.section-card-bg { background: var(--card); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p  { font-size: 1.125rem; color: var(--muted-fg); max-width: 42rem; margin: 0 auto; }
.partners-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3rem; max-width: 48rem; margin: 0 auto; }
a.partner-item  { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; color: inherit; transition: transform 0.15s ease; }
a.partner-item:hover { transform: translateY(-2px); }
.partner-item  { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.partner-icon  { width: 5rem; height: 5rem; border-radius: 50%; background: var(--primary-10); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.partner-icon img { width: 100%; height: 100%; object-fit: contain; padding: 0.75rem; }
.partner-icon svg { width: 2.5rem; height: 2.5rem; color: var(--primary); }
.partner-icon-label { font-size: 1.5rem; font-weight: 700; color: var(--primary); line-height: 1; }
.partner-name { font-size: 0.875rem; font-weight: 500; }
.pub-footer { border-top: 1px solid var(--border); padding: 2rem 0; background: var(--card); text-align: center; font-size: 0.875rem; color: var(--muted-fg); }

/* Phase Card */
.grid.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); display: grid; gap: 1.5rem; }
.phase-icon-wrap { width: 3rem; height: 3rem; border-radius: 0.5rem; background: var(--primary-10); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.phase-icon-wrap svg { width: 1.5rem; height: 1.5rem; color: var(--primary); }
.phase-features { display: flex; flex-direction: column; gap: 0.5rem; }
.phase-feature  { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-fg); }
.phase-bullet   { color: var(--primary); flex-shrink: 0; }

/* Progress/Stat Card */
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-bottom: 0.75rem; }
.stat-icon-wrap { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon-wrap svg { width: 1.25rem; height: 1.25rem; }
.stat-icon-primary { background: var(--primary-10); color: var(--primary); }
.stat-icon-accent  { background: hsla(45,100%,55%,0.15); color: hsl(40,90%,40%); }
.stat-icon-success { background: var(--success-10); color: var(--success); }
.stat-label  { font-size: 0.875rem; font-weight: 500; }
.stat-value  { font-size: 1.875rem; font-weight: 700; }
.stat-sub    { font-size: 0.75rem; color: var(--muted-fg); margin-top: 0.25rem; }

/* Event Card */
.event-meta-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-fg); margin-top: 0.375rem; }
.event-meta-row svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* Quick Action */
.quick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); cursor: pointer; transition: background 0.15s; text-decoration: none; color: var(--foreground); font-size: 0.875rem; font-weight: 500; }
.quick-action:hover { background: var(--muted); }
.quick-action svg { width: 1.5rem; height: 1.5rem; }

/* Course Card */
.course-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.course-dur { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--muted-fg); }
.course-dur svg { width: 0.75rem; height: 0.75rem; }
.course-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-fg); }
.course-meta svg { width: 1rem; height: 1rem; }
.course-progress { margin-top: 0.75rem; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.75rem; margin-bottom: 0.4rem; }

/* Mentor Card */
.mentor-header { display: flex; align-items: center; gap: 1rem; }
.mentor-name { font-size: 1.125rem; font-weight: 600; }
.mentor-exp  { font-size: 0.875rem; color: var(--muted-fg); }
.mentor-meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-fg); }

/* Community */
.community-post { display: flex; align-items: flex-start; gap: 0.75rem; }
.community-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.community-user { font-size: 0.875rem; font-weight: 500; }
.community-time { font-size: 0.75rem; color: var(--muted-fg); }
.community-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.375rem; }
.community-body { font-size: 0.875rem; color: var(--muted-fg); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.community-replies { font-size: 0.75rem; color: var(--muted-fg); margin-top: 0.75rem; }

/* Deliverables */
.deliverable-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.deliverable-badges { display: flex; align-items: center; gap: 0.5rem; }
.mentor-comment { background: var(--muted); border-radius: calc(var(--radius) - 2px); padding: 0.75rem; }
.mentor-comment-lbl { font-size: 0.75rem; font-weight: 600; margin-bottom: 0.25rem; }
.mentor-comment-txt { font-size: 0.875rem; color: var(--muted-fg); }

/* News */
.news-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.news-date { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--muted-fg); }
.news-date svg { width: 0.75rem; height: 0.75rem; }

/* Calendar */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.cal-month { font-size: 1rem; font-weight: 600; }
.cal-grid  { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; gap: 20px; }
.cal-dname { font-size: 0.75rem; color: var(--muted-fg); padding: 0.375rem 0; }
.cal-day   { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.875rem; cursor: pointer; transition: background 0.15s; }
.cal-day:hover   { background: var(--muted); }
.cal-day.today   { background: var(--primary); color: var(--primary-fg); font-weight: 600; }
.cal-day.selected { outline: 2px solid var(--primary); }
.cal-day.has-event { font-weight: 700; text-decoration: underline; }
.cal-day.other-month { color: var(--muted-fg); opacity: 0.4; }
.event-item { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 0.75rem 1rem; }
.event-item-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.event-item-title { font-size: 0.875rem; font-weight: 500; }
.event-item-desc  { font-size: 0.75rem; color: var(--muted-fg); }

div#mini-calendar {
    display: flex;
    flex-direction: column;
}


/* Reports */
.report-icon-wrap { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; background: var(--primary-10); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.report-icon-wrap svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.report-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; width: 100%; }
.report-body { display: flex; align-items: flex-start; gap: 0.75rem; flex: 1; }

/* Contact */
.contact-info-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; }
.contact-info-title svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.phone-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.25rem 0; }
.phone-row a { color: var(--primary); }
.phone-row a:hover { text-decoration: underline; }

/* About */
.about-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; text-align: center; }
.about-stat-num { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.about-stat-lbl { font-size: 0.875rem; color: var(--muted-fg); margin-top: 0.25rem; }
.phase-step { display: flex; flex-direction: column; gap: 0.5rem; align-items: center;}
.phase-step-num { width: 3rem; height: 3rem; border-radius: 0.5rem; background: var(--primary-10); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: var(--primary); }

/* Auth */
.auth-wrap { min-height: calc(100vh - 4rem); display: flex; align-items: center; padding: 4rem 0; }
.auth-card { max-width: 28rem; width: 100%; margin: 0 auto; }
.auth-card-wide { max-width: 40rem; }
.reg-progress { display: flex; gap: 0.5rem; margin-top: 1.5rem; }
.reg-bar { height: 0.25rem; flex: 1; border-radius: 999px; background: var(--muted); transition: background 0.3s; }
.reg-bar.active { background: var(--primary); }
.role-option { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; cursor: pointer; transition: border-color 0.15s; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.role-option:hover { border-color: var(--primary); }
.role-option.selected { border-color: var(--primary); }
.role-option input[type=radio] { accent-color: var(--primary); flex-shrink: 0; }
.role-info h4 { font-size: 0.875rem; font-weight: 600; }
.role-info p  { font-size: 0.8rem; color: var(--muted-fg); }
.confirm-box { background: var(--muted); border-radius: var(--radius); padding: 1rem; margin-top: 0.5rem; }
.confirm-box h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; }
.confirm-row { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 0.25rem; }

/* Not Found */
.notfound-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.notfound-code { font-size: 6rem; font-weight: 700; color: var(--primary); line-height: 1; }
.notfound-title { font-size: 1.5rem; font-weight: 600; margin: 1rem 0; }
.notfound-desc  { color: var(--muted-fg); margin-bottom: 2rem; }

/* Admin placeholder */
.admin-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; text-align: center; color: var(--muted-fg); border: 2px dashed var(--border); border-radius: var(--radius); gap: 0.75rem; }
.admin-placeholder svg { width: 3rem; height: 3rem; opacity: 0.4; }

/* News article page */
.article-hero {
  background: linear-gradient(135deg, hsl(213,94%,29%) 0%, hsla(213,94%,29%,0.82) 100%);
  padding: 2.5rem 0 3rem;
  color: var(--primary-fg);
}
.article-breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8125rem; color: hsla(213,94%,98%,0.75);
  margin-bottom: 1rem;
}
.article-breadcrumb a { color: hsla(213,94%,98%,0.75); transition: color 0.15s; text-decoration: none; }
.article-breadcrumb a:hover { color: var(--primary-fg); }
.article-breadcrumb svg { width: 0.875rem; height: 0.875rem; opacity: 0.6; flex-shrink: 0; }
.article-hero .badge { background: hsla(213,94%,98%,0.15); color: var(--primary-fg); border: none; font-size: 0.8rem; margin-bottom: 0.875rem; display: inline-flex; }
.article-hero h1 { font-size: clamp(1.625rem, 3.5vw, 2.25rem); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; color: var(--primary-fg); }
.article-hero-meta { display: flex; align-items: center; gap: 1.25rem; font-size: 0.875rem; color: hsla(213,94%,98%,0.8); flex-wrap: wrap; }
.article-hero-meta svg { width: 0.9rem; height: 0.9rem; }
.article-hero-meta span { display: flex; align-items: center; gap: 0.35rem; }
.article-layout { max-width: 56rem; margin: 0 auto; padding: 2.5rem 0 4rem; }
.article-back { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 500; color: var(--muted-fg); padding: 0.4rem 0; margin-bottom: 2rem; text-decoration: none; transition: color 0.15s; }
.article-back:hover { color: var(--primary); }
.article-back svg { width: 1rem; height: 1rem; }
.article-prose h2 { font-size: 1.125rem; font-weight: 700; margin: 2rem 0 0.625rem; }
.article-prose h3 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.article-prose p  { font-size: 0.9375rem; line-height: 1.8; color: var(--foreground); margin-bottom: 1.125rem; }
.article-prose ul, .article-prose ol { padding-left: 1.375rem; margin-bottom: 1.125rem; }
.article-prose ul li, .article-prose ol li { font-size: 0.9375rem; line-height: 1.8; color: var(--foreground); margin-bottom: 0.25rem; }
.article-prose ul li { list-style: disc; }
.article-prose ol li { list-style: decimal; }
.article-prose blockquote { border-left: 3px solid var(--primary); padding: 0.375rem 0 0.375rem 1.25rem; margin: 1.5rem 0; font-style: italic; color: var(--muted-fg); }
.article-prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.875rem; }
.article-prose th, .article-prose td { border: 1px solid var(--border); padding: 0.625rem 0.75rem; text-align: left; }
.article-prose th { background: var(--muted); font-weight: 600; }
.article-prose strong { font-weight: 700; }
.article-share { display: flex; align-items: center; gap: 0.625rem; padding: 1.5rem 0; border-top: 1px solid var(--border); margin-top: 2rem; flex-wrap: wrap; }
.article-share-label { font-size: 0.875rem; font-weight: 500; color: var(--muted-fg); margin-right: 0.25rem; }
.share-btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.875rem; border-radius: var(--radius); border: 1px solid var(--border); background: transparent; font-size: 0.8125rem; font-weight: 500; cursor: pointer; transition: background 0.15s, border-color 0.15s; color: var(--foreground); }
.share-btn:hover { background: var(--muted); border-color: var(--input-border); }
.share-btn svg { width: 0.9375rem; height: 0.9375rem; }
.share-btn.linkedin { color: #0A66C2; border-color: #0A66C2; }
.share-btn.linkedin:hover { background: rgba(10,102,194,0.07); }
.share-btn.facebook { color: #1877F2; border-color: #1877F2; }
.share-btn.facebook:hover { background: rgba(24,119,242,0.07); }
.related-section { background: var(--card); padding: 3rem 0; border-top: 1px solid var(--border); }
.related-section-inline { background: transparent; padding: 2.5rem 0 0; margin-top: 2.5rem; border-top: 1px solid var(--border); }
.related-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; }
.card-title:hover { color: var(--primary); }
.related-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.15s; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.related-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.09); }
.related-card-body { padding: 1.25rem; flex: 1; }
.related-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.625rem; }
.related-card-date { font-size: 0.75rem; color: var(--muted-fg); white-space: nowrap; }
.related-card-title { font-size: 0.9rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.375rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-excerpt { font-size: 0.8125rem; color: var(--muted-fg); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related-card-footer { padding: 0 1.25rem 1.25rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr) !important; }
}
@media (max-width: 768px) {
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .pub-nav { display: none; }
  .hero { padding: 3rem 0; }
  .hero-features { grid-template-columns: 1fr !important; gap: 1.5rem; }
  .section { padding: 2.5rem 0; }
  .about-stats { grid-template-columns: repeat(3,1fr) !important; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 200; transform: translateX(-100%); transition: transform 0.25s ease; width: var(--sidebar-w) !important; }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.collapsed { transform: translateX(-100%); }
  .app-layout { display: block; height: 100vh; }
  .app-main { height: 100vh; display: flex; flex-direction: column; }
  .tabs-list { width: 100%; overflow-x: auto; }
  .quick-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .about-stats { grid-template-columns: 1fr !important; }
  .phone-row { flex-direction: column; gap: 0.25rem; }
  .hero-features { gap: 1rem; }
}

/* ── Hero icon fix: dark rounded bg, yellow icon ── */
.hero-icon-wrap {
  background: hsla(213, 60%, 15%, 0.5);
  border-radius: 0.75rem;
}
.hero-icon-wrap svg { color: var(--accent); }

/* ── Phase cards: very light grey bg, no visible border ── */
.phase-card {
  background: hsl(0,0%,97%);
  border: 1px solid hsl(0,0%,93%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: background 0.15s;
}
.phase-card:hover { background: hsl(0,0%,94%); }
.phase-card-icon {
  width: 3rem; height: 3rem;
  background: hsl(213,30%,90%);
  border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.phase-card-icon svg { width: 1.4rem; height: 1.4rem; color: var(--primary); }
.phase-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.25rem; letter-spacing: 0.01em; }
.phase-card-desc  { font-size: 0.8rem; color: var(--muted-fg); margin-bottom: 1rem; }
.phase-card-list  { display: flex; flex-direction: column; gap: 0.4rem; }
.phase-card-item  { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; color: var(--foreground); }
.phase-card-item::before { content: '•'; color: var(--primary); flex-shrink: 0; line-height: 1.5; font-size: 1rem; }

/* ── News section: grey bg, cards inside ── */
.news-section { background: hsl(0,0%,96%); }
.news-card-inner {
  background: #fff;
  border: 1px solid hsl(0,0%,91%);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: box-shadow 0.15s;
}
.news-card-inner:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.news-card-meta { display: flex; align-items: center; justify-content: space-between; }
.news-badge {
  background: hsl(0,0%,90%);
  color: hsl(0,0%,30%);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.7rem;
}
.news-date-inline {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.75rem; color: var(--muted-fg);
}
.news-date-inline svg { width: 0.75rem; height: 0.75rem; }
.news-card-title { font-size: 1rem; font-weight: 600; }
.news-card-excerpt { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.5; }

.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    display: grid;
    gap: 1.5rem;
}
.grid.grid-4 { margin-bottom: 1.5rem; display: grid; gap: 1.5rem; grid-template-columns: repeat(4, minmax(0, 1fr));}