/* ============================================================
   InternHub — Global Stylesheet
   ============================================================ */

:root {
  --primary:        #4f46e5;
  --primary-dark:   #3730a3;
  --primary-light:  #818cf8;
  --success:        #10b981;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #06b6d4;
  --sidebar-w:      260px;
  --topbar-h:       60px;
  --bg:             #f1f5f9;
  --panel-bg:       #ffffff;
  --border:         #e2e8f0;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --font:           'Inter', sans-serif;
  --radius:         14px;
  --shadow:         0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 24px rgba(0,0,0,0.09);
}

*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 0.92rem; line-height: 1.6; margin: 0; }

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

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w); min-height: 100vh; position: fixed; top: 0; left: 0; z-index: 1040;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 60%, #4f46e5 100%);
  display: flex; flex-direction: column; transition: transform 0.3s ease;
}
.sidebar-brand { padding: 22px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-brand h5 { color: #fff; font-weight: 800; margin: 0; font-size: 1.1rem; }
.sidebar-brand small { color: rgba(255,255,255,0.5); font-size: 0.72rem; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.3); flex-shrink: 0; }
.sidebar-user .user-name { color: #fff; font-weight: 600; font-size: 0.85rem; line-height: 1.3; }
.sidebar-user .user-role { color: rgba(255,255,255,0.55); font-size: 0.75rem; }
.sidebar-nav { flex: 1; padding: 10px 12px; overflow-y: auto; }
.nav-section { display: block; color: rgba(255,255,255,0.35); font-size: 0.68rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; padding: 12px 8px 4px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.875rem; font-weight: 500; margin-bottom: 2px; transition: all 0.2s; }
.sidebar-nav a i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-nav a.active { background: rgba(255,255,255,0.18); color: #fff; font-weight: 600; }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-footer a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.875rem; transition: all 0.2s; }
.sidebar-footer a:hover { background: rgba(239,68,68,0.2); color: #fca5a5; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1039; }

/* ── MAIN CONTENT ── */
.main-content { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: var(--topbar-h); background: var(--panel-bg); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.topbar .page-title { font-weight: 700; font-size: 1rem; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.hamburger { display: none; background: none; border: none; font-size: 1.4rem; color: var(--text); cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1; }
.hamburger:hover { background: var(--bg); }
.notif-btn { position: relative; background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; padding: 6px 10px; border-radius: 10px; line-height: 1; }
.notif-btn:hover { background: var(--bg); color: var(--primary); }
.notif-badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: 0.62rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.content-area { padding: 24px; flex: 1; }

/* ── PANELS ── */
.panel { background: var(--panel-bg); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.panel-header h6 { margin: 0; font-weight: 700; font-size: 0.9rem; }
.panel-body { padding: 18px 20px; }

/* ── STAT CARDS ── */
.stat-card { background: var(--panel-bg); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 10px; }
.stat-icon.indigo { background: #ede9fe; color: var(--primary); }
.stat-icon.green  { background: #d1fae5; color: var(--success); }
.stat-icon.amber  { background: #fef3c7; color: var(--warning); }
.stat-icon.cyan   { background: #cffafe; color: var(--info); }
.stat-icon.red    { background: #fee2e2; color: var(--danger); }
.stat-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

/* ── TASK CARDS ── */
.task-card { background: var(--panel-bg); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 14px; border-left: 4px solid transparent; transition: all 0.2s; }
.task-card:hover { box-shadow: var(--shadow-md); border-left-color: var(--primary); }
.task-card.locked { opacity: 0.65; pointer-events: none; }
.task-order-badge { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 0.82rem; flex-shrink: 0; }

/* ── PROFILE CARD ── */
.profile-card { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow-md); }
.profile-card img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.4); margin-bottom: 14px; }
.profile-card h5 { font-weight: 800; margin-bottom: 4px; }
.profile-card .domain { opacity: 0.8; font-size: 0.85rem; margin-bottom: 10px; }

/* ── CHART ── */
.chart-container { position: relative; height: 200px; }

/* ── TIMELINE ── */
.timeline { border-left: 2px solid var(--border); padding-left: 16px; }
.timeline-item { position: relative; padding-bottom: 12px; }
.timeline-item::before { content: ''; position: absolute; left: -21px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.timeline-item h6 { font-size: 0.8rem; font-weight: 700; margin-bottom: 1px; }
.timeline-item small { color: var(--text-muted); }

/* ── AUTH ── */
.auth-bg { min-height: 100vh; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4f46e5 100%); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 960px; background: var(--panel-bg); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.auth-left { background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%); color: #fff; padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-left h2 { font-weight: 800; margin-bottom: 8px; font-size: 1.6rem; }
.auth-left p { opacity: 0.7; font-size: 0.88rem; margin-bottom: 28px; }
.feature-item { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.88rem; opacity: 0.9; }
.feature-item i { color: #34d399; font-size: 1.1rem; }
.auth-right { padding: 36px 40px; }
.auth-right h3 { font-weight: 800; margin-bottom: 4px; }
.auth-right .subtitle { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 24px; }
.auth-tabs .nav-link { border: none; border-bottom: 3px solid transparent; border-radius: 0; color: var(--text-muted); font-weight: 600; padding: 10px 20px; }
.auth-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: none; }

/* ── OFFER LETTER ── */
.offer-letter-doc { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; }
.letter-header { background: linear-gradient(135deg, #f8faff 0%, #ede9fe 100%); padding: 32px; border-bottom: 2px solid var(--border); }
.letter-body { padding: 32px; line-height: 1.8; }
.letter-body .info-box { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin: 24px 0; }
.letter-footer { margin-top: 40px; padding-top: 20px; border-top: 1px dashed var(--border); }

/* ── CERTIFICATE ── */
.certificate-doc { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-md); }
.cert-border { border: 10px solid var(--primary); border-image: linear-gradient(135deg, var(--primary), var(--warning), var(--primary)) 1; padding: 6px; }
.cert-inner { padding: 40px; text-align: center; background: linear-gradient(160deg, #fefefe 0%, #f8f5ff 100%); }
.cert-top { margin-bottom: 24px; }
.cert-logo { width: 64px; height: 64px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; margin: 0 auto 12px; }
.cert-top h1 { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.cert-sub { color: var(--text-muted); font-size: 0.85rem; }
.cert-title { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); letter-spacing: 2px; text-transform: uppercase; margin: 12px 0 24px; padding: 10px 0; border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.cert-body { max-width: 560px; margin: 0 auto; }
.cert-text { font-size: 0.95rem; color: #374151; margin-bottom: 8px; }
.cert-name { font-size: 2rem; font-weight: 800; color: var(--primary); font-style: italic; margin: 12px 0; border-bottom: 2px solid var(--primary-light); display: inline-block; padding-bottom: 4px; }
.cert-performance { display: inline-block; margin: 16px 0; padding: 10px 24px; background: #ede9fe; border-radius: 30px; font-size: 0.92rem; color: var(--primary-dark); }
.cert-footer { margin-top: 32px; }

/* ── ANIMATIONS ── */
.fade-in { animation: fadeIn 0.5s ease both; }
.fade-in-delay-1 { animation: fadeIn 0.5s 0.1s ease both; }
.fade-in-delay-2 { animation: fadeIn 0.5s 0.2s ease both; }
@keyframes fadeIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }

/* ── UTILS ── */
.min-width-0 { min-width: 0; }

/* ── TABLE ── */
.table th { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: 10px 12px; }
.table td { padding: 10px 12px; vertical-align: middle; }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .sidebar-overlay.show { opacity: 1; pointer-events: all; }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; align-items: center; }
  .auth-left { display: none; }
  .auth-right { padding: 28px 24px; }
}
@media (max-width: 576px) {
  .content-area { padding: 16px; }
  .stat-value { font-size: 1.5rem; }
  .cert-name { font-size: 1.4rem; }
  .cert-title { font-size: 1rem; letter-spacing: 1px; }
}

/* ── PRINT ── */
@media print {
  .sidebar, .topbar, .no-print, .hamburger, .btn, .alert, .dropdown { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .content-area { padding: 0 !important; }
  body { background: #fff; font-size: 11pt; }
  .offer-letter-doc, .certificate-doc { box-shadow: none; border: none; }
  .cert-border { border: 6px solid var(--primary); }
}
