/* ── Campus4Tech Platform – Frontend Styles ─────────────────────────── */

:root {
  --c4t-navy:    #0a1628;
  --c4t-blue:    #1a3a6b;
  --c4t-orange:  #ff9900;
  --c4t-white:   #ffffff;
  --c4t-light:   #f4f6fb;
  --c4t-border:  #e2e8f0;
  --c4t-text:    #1e293b;
  --c4t-muted:   #64748b;
  --c4t-success: #16a34a;
  --c4t-danger:  #dc2626;
  --c4t-warn:    #d97706;
  --c4t-info:    #2563eb;
  --c4t-radius:  10px;
  --c4t-shadow:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
}

.c4t-wrap * { box-sizing: border-box; }
.c4t-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--c4t-text); }

/* ── Layout ────────────────────────────────────────────────────────── */
.c4t-platform-layout { display: flex; min-height: 100vh; background: var(--c4t-light); }
.c4t-sidebar {
  width: 240px; background: var(--c4t-navy); flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.c4t-main { flex: 1; overflow-x: hidden; }
.c4t-topbar {
  background: var(--c4t-white); border-bottom: 1px solid var(--c4t-border);
  padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.c4t-content { padding: 24px; }

/* ── Sidebar ───────────────────────────────────────────────────────── */
.c4t-sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.c4t-sidebar-brand .c4t-logo { display: flex; align-items: center; gap: 10px; }
.c4t-sidebar-brand .c4t-logo-icon {
  width: 36px; height: 36px; background: var(--c4t-orange); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--c4t-navy);
}
.c4t-sidebar-brand .c4t-logo-text { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; }
.c4t-sidebar-brand .c4t-logo-sub { color: rgba(255,255,255,.4); font-size: 11px; }
.c4t-nav { padding: 12px 0; flex: 1; }
.c4t-nav-section-label { padding: 12px 20px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.25); }
.c4t-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 20px; cursor: pointer; color: rgba(255,255,255,.65); font-size: 14px; border-left: 3px solid transparent; transition: all .15s; text-decoration: none; }
.c4t-nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.c4t-nav-item.active { color: var(--c4t-orange); border-left-color: var(--c4t-orange); background: rgba(255,153,0,.08); }
.c4t-nav-icon { width: 18px; text-align: center; opacity: .75; }
.c4t-sidebar-user { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.c4t-sidebar-user-info { display: flex; align-items: center; gap: 10px; }
.c4t-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--c4t-blue); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.c4t-user-name { color: #fff; font-size: 13px; font-weight: 500; }
.c4t-user-role { color: rgba(255,255,255,.4); font-size: 11px; }
.c4t-logout-btn { background: none; border: none; color: rgba(255,255,255,.4); font-size: 11px; cursor: pointer; padding: 4px 0 0; display: block; }
.c4t-logout-btn:hover { color: var(--c4t-orange); }

/* ── Top bar ───────────────────────────────────────────────────────── */
.c4t-topbar-title { font-size: 17px; font-weight: 600; color: var(--c4t-navy); }
.c4t-topbar-actions { display: flex; align-items: center; gap: 12px; }
.c4t-topbar-search { height: 36px; padding: 0 12px; border: 1px solid var(--c4t-border); border-radius: var(--c4t-radius); font-size: 13px; width: 220px; outline: none; }
.c4t-topbar-search:focus { border-color: var(--c4t-blue); }

/* ── Stat cards ────────────────────────────────────────────────────── */
.c4t-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 24px; }
.c4t-stat-card { background: var(--c4t-white); border-radius: var(--c4t-radius); padding: 20px; box-shadow: var(--c4t-shadow); }
.c4t-stat-card .c4t-stat-icon { font-size: 24px; margin-bottom: 8px; }
.c4t-stat-card .c4t-stat-val  { font-size: 28px; font-weight: 700; color: var(--c4t-navy); line-height: 1; }
.c4t-stat-card .c4t-stat-lbl  { font-size: 12px; color: var(--c4t-muted); margin-top: 4px; }
.c4t-stat-card.highlight      { background: var(--c4t-navy); }
.c4t-stat-card.highlight .c4t-stat-val { color: var(--c4t-orange); }
.c4t-stat-card.highlight .c4t-stat-lbl { color: rgba(255,255,255,.5); }

/* ── Cards / panels ────────────────────────────────────────────────── */
.c4t-card { background: var(--c4t-white); border-radius: var(--c4t-radius); box-shadow: var(--c4t-shadow); margin-bottom: 20px; }
.c4t-card-header { padding: 16px 20px; border-bottom: 1px solid var(--c4t-border); display: flex; align-items: center; justify-content: space-between; }
.c4t-card-title  { font-size: 15px; font-weight: 600; color: var(--c4t-navy); }
.c4t-card-body   { padding: 20px; }

/* ── Tables ────────────────────────────────────────────────────────── */
.c4t-table-wrap  { overflow-x: auto; }
.c4t-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.c4t-table th { background: var(--c4t-light); padding: 10px 14px; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--c4t-muted); border-bottom: 1px solid var(--c4t-border); font-weight: 600; }
.c4t-table td { padding: 12px 14px; border-bottom: 1px solid var(--c4t-border); vertical-align: middle; }
.c4t-table tr:last-child td { border-bottom: none; }
.c4t-table tr:hover td { background: #f8fafc; }
.c4t-table-actions { display: flex; gap: 6px; }

/* ── Badges ────────────────────────────────────────────────────────── */
.c4t-badge { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.badge-blue    { background: #eff6ff; color: #1d4ed8; }
.badge-green   { background: #f0fdf4; color: #15803d; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-orange  { background: #fff7ed; color: #c2410c; }
.badge-red     { background: #fef2f2; color: #991b1b; }
.badge-gray    { background: #f1f5f9; color: #475569; }
.badge-dark    { background: #1e293b; color: #94a3b8; }
.badge-purple  { background: #faf5ff; color: #7e22ce; }
.badge-teal    { background: #f0fdfa; color: #0f766e; }
.badge-yellow  { background: #fefce8; color: #a16207; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.c4t-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all .15s; text-decoration: none; line-height: 1.3; }
.c4t-btn-primary { background: var(--c4t-navy); color: #fff; }
.c4t-btn-primary:hover { background: var(--c4t-blue); }
.c4t-btn-orange { background: var(--c4t-orange); color: var(--c4t-navy); }
.c4t-btn-orange:hover { opacity: .9; }
.c4t-btn-outline { background: transparent; border: 1px solid var(--c4t-border); color: var(--c4t-text); }
.c4t-btn-outline:hover { border-color: var(--c4t-navy); color: var(--c4t-navy); }
.c4t-btn-danger { background: var(--c4t-danger); color: #fff; }
.c4t-btn-sm { padding: 5px 10px; font-size: 12px; }
.c4t-btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* ── Forms ─────────────────────────────────────────────────────────── */
.c4t-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.c4t-form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.c4t-form-group { margin-bottom: 16px; }
.c4t-form-group.span-2 { grid-column: span 2; }
.c4t-label { display: block; font-size: 12px; font-weight: 600; color: var(--c4t-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.c4t-input, .c4t-select, .c4t-textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--c4t-border); border-radius: 7px;
  font-size: 14px; color: var(--c4t-text); outline: none; transition: border-color .15s;
  font-family: inherit; background: #fff;
}
.c4t-input:focus, .c4t-select:focus, .c4t-textarea:focus { border-color: var(--c4t-blue); box-shadow: 0 0 0 3px rgba(26,58,107,.08); }
.c4t-textarea { resize: vertical; min-height: 80px; }
.c4t-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ── Modal ─────────────────────────────────────────────────────────── */
.c4t-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.c4t-modal { background: #fff; border-radius: 12px; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.c4t-modal-header { padding: 20px 24px; border-bottom: 1px solid var(--c4t-border); display: flex; align-items: center; justify-content: space-between; }
.c4t-modal-title { font-size: 17px; font-weight: 600; color: var(--c4t-navy); }
.c4t-modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--c4t-muted); width: 32px; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.c4t-modal-close:hover { background: var(--c4t-light); }
.c4t-modal-body { padding: 24px; }
.c4t-modal-footer { padding: 16px 24px; border-top: 1px solid var(--c4t-border); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Tabs ──────────────────────────────────────────────────────────── */
.c4t-tabs { display: flex; border-bottom: 1px solid var(--c4t-border); margin-bottom: 20px; gap: 0; }
.c4t-tab { padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--c4t-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s; background: none; border-top: none; border-left: none; border-right: none; }
.c4t-tab.active { color: var(--c4t-navy); border-bottom-color: var(--c4t-orange); }
.c4t-tab:hover:not(.active) { color: var(--c4t-text); }
.c4t-tab-panel { display: none; }
.c4t-tab-panel.active { display: block; }

/* ── Search / filter bar ───────────────────────────────────────────── */
.c4t-filter-bar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.c4t-filter-bar .c4t-input, .c4t-filter-bar .c4t-select { height: 36px; padding: 0 10px; font-size: 13px; flex: 1; min-width: 120px; max-width: 200px; }
.c4t-filter-bar .c4t-btn { height: 36px; }

/* ── Pagination ────────────────────────────────────────────────────── */
.c4t-pagination { display: flex; gap: 4px; margin-top: 16px; justify-content: center; }
.c4t-page-btn { width: 34px; height: 34px; border: 1px solid var(--c4t-border); border-radius: 7px; background: #fff; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.c4t-page-btn.active { background: var(--c4t-navy); color: #fff; border-color: var(--c4t-navy); }

/* ── Login page ────────────────────────────────────────────────────── */
.c4t-login-wrap { min-height: 100vh; display: flex; background: var(--c4t-navy); }
.c4t-login-left { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 2rem; }
.c4t-login-right { width: 460px; background: #fff; display: flex; flex-direction: column; justify-content: center; padding: 3rem; }
.c4t-login-logo { width: 64px; height: 64px; background: var(--c4t-orange); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: var(--c4t-navy); margin-bottom: 1.5rem; }
.c4t-login-brand { font-size: 28px; font-weight: 700; color: #fff; }
.c4t-login-sub { color: rgba(255,255,255,.4); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; margin-bottom: 2.5rem; }
.c4t-login-title { font-size: 24px; font-weight: 700; color: var(--c4t-navy); margin-bottom: 6px; }
.c4t-login-desc  { font-size: 14px; color: var(--c4t-muted); margin-bottom: 2rem; }
.c4t-role-selector { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.5rem; }
.c4t-role-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--c4t-border); background: transparent; font-size: 12px; color: var(--c4t-muted); cursor: pointer; }
.c4t-role-btn.active { background: var(--c4t-navy); color: #fff; border-color: var(--c4t-navy); }
.c4t-login-form .c4t-btn-primary { width: 100%; justify-content: center; height: 44px; font-size: 15px; }
.c4t-login-error { color: var(--c4t-danger); font-size: 13px; margin-top: 10px; display: none; }
.c4t-forgot { font-size: 12px; color: var(--c4t-orange); text-decoration: none; display: block; text-align: right; margin-bottom: 12px; }
.c4t-login-stats { display: flex; gap: 2rem; margin-top: 2rem; }
.c4t-login-stat-num { font-size: 24px; font-weight: 700; color: var(--c4t-orange); }
.c4t-login-stat-lbl { font-size: 11px; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: 1px; }

/* ── Notifications ─────────────────────────────────────────────────── */
.c4t-toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.c4t-toast { background: var(--c4t-navy); color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.2); max-width: 300px; animation: c4t-slide-in .2s ease; }
.c4t-toast.success { background: var(--c4t-success); }
.c4t-toast.error   { background: var(--c4t-danger); }
@keyframes c4t-slide-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Progress bar ──────────────────────────────────────────────────── */
.c4t-progress { height: 6px; background: var(--c4t-border); border-radius: 3px; overflow: hidden; }
.c4t-progress-bar { height: 100%; background: var(--c4t-orange); border-radius: 3px; transition: width .4s ease; }

/* ── Empty states ──────────────────────────────────────────────────── */
.c4t-empty { text-align: center; padding: 48px 20px; color: var(--c4t-muted); }
.c4t-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .3; }
.c4t-empty h3 { font-size: 15px; color: var(--c4t-text); margin-bottom: 6px; }

/* ── Candidate profile ─────────────────────────────────────────────── */
.c4t-profile-header { display: flex; align-items: center; gap: 20px; padding: 24px; background: var(--c4t-navy); border-radius: var(--c4t-radius) var(--c4t-radius) 0 0; }
.c4t-profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--c4t-orange); display: flex; align-items: center; justify-content: center; color: var(--c4t-navy); font-size: 24px; font-weight: 700; flex-shrink: 0; }
.c4t-profile-name  { font-size: 20px; font-weight: 600; color: #fff; }
.c4t-profile-meta  { font-size: 13px; color: rgba(255,255,255,.5); margin-top: 2px; }
.c4t-profile-id    { font-size: 12px; color: var(--c4t-orange); margin-top: 2px; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .c4t-sidebar { display: none; }
  .c4t-login-left { display: none; }
  .c4t-login-right { width: 100%; padding: 2rem; }
  .c4t-form-grid { grid-template-columns: 1fr; }
  .c4t-form-grid.cols-3 { grid-template-columns: 1fr; }
  .c4t-form-group.span-2 { grid-column: span 1; }
  .c4t-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .c4t-stats-grid { grid-template-columns: 1fr 1fr; }
  .c4t-content { padding: 16px; }
  .c4t-modal { max-width: 100%; margin: 0; border-radius: 12px 12px 0 0; }
}

/* ── Mobile sidebar toggle ─────────────────────────────────────────── */
.c4t-mobile-nav-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; }
@media (max-width: 768px) { .c4t-mobile-nav-toggle { display: flex; } }
