/* Teacher CRM - Main Stylesheet */
:root {
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active: #0d9488;
  --font: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
body { font-family: var(--font); background: #f8fafc; color: #1e293b; margin: 0; }

/* ── Sidebar ── */
#sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid #1e293b;
}
.brand-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.brand-name { color: #f1f5f9; font-weight: 700; font-size: 15px; }
.brand-role { color: var(--sidebar-text); font-size: 11px; }

.sidebar-nav { list-style: none; padding: 12px 8px; margin: 0; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--sidebar-text); text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.sidebar-nav li a:hover { background: #1e293b; color: #e2e8f0; }
.sidebar-nav li a.active { background: var(--primary); color: #fff; }
.sidebar-nav li a i { font-size: 16px; width: 20px; }

.sidebar-footer { padding: 12px 12px 16px; border-top: 1px solid #1e293b; }
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.user-name { color: #e2e8f0; font-size: 13px; font-weight: 600; }
.user-email { color: var(--sidebar-text); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.btn-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  color: #f87171; text-decoration: none; font-size: 13px;
  transition: background 0.15s;
}
.btn-logout:hover { background: #1e293b; color: #f87171; }

/* ── Main Content ── */
#main-content { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky; top: 0; z-index: 100;
}
.page-content { max-width: 1400px; }

/* ── Cards ── */
.card { border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.card-header { background: #fff; border-bottom: 1px solid #e2e8f0; font-weight: 600; }
.stat-card { border-radius: 12px; padding: 20px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-label { font-size: 13px; color: #64748b; }
.stat-card .stat-icon { font-size: 28px; opacity: 0.8; }

/* ── Badges ── */
.badge { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-primary { background: #ccfbf1; color: #134e4a; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ── Tables ── */
.table { font-size: 13.5px; }
.table th { font-weight: 600; color: #475569; background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ── Forms ── */
.form-label { font-weight: 500; font-size: 13px; color: #374151; }
.form-control, .form-select { font-size: 13.5px; border-radius: 8px; border-color: #d1d5db; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.1); }

/* ── Buttons ── */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn { border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.btn-sm { font-size: 12px; padding: 4px 10px; }

/* ── Modal ── */
.modal-header { border-bottom: 1px solid #e2e8f0; }
.modal-footer { border-top: 1px solid #e2e8f0; }
.modal-content { border-radius: 16px; border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }

/* ── Attendance status buttons ── */
.btn-present { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.btn-present.active, .btn-present:hover { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-absent { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.btn-absent.active, .btn-absent:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-late { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.btn-late.active, .btn-late:hover { background: #d97706; color: #fff; border-color: #d97706; }
.btn-excused { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.btn-excused.active, .btn-excused:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ── Misc ── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: #0f172a; margin: 0; }
.page-header p { color: #64748b; font-size: 13.5px; margin: 4px 0 0; }
.empty-state { text-align: center; padding: 48px 24px; color: #94a3b8; }
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.search-box { max-width: 320px; }
.action-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.schedule-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.rescheduled-badge { background: #fef3c7; color: #92400e; }
.overdue-badge { background: #fee2e2; color: #991b1b; }

/* ── Login Page ── */
.login-page { min-height: 100vh; background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0d9488 100%); }
.login-card { max-width: 420px; width: 100%; border-radius: 20px; }

/* ── Responsive ── */
@media (max-width: 991px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.show { transform: translateX(0); }
  #main-content { margin-left: 0; }
}

/* ── WhatsApp button ── */
.btn-whatsapp { background: #25d366; color: #fff; border: none; }
.btn-whatsapp:hover { background: #128c7e; color: #fff; }

/* ── Student profile ── */
.profile-section { border-left: 3px solid var(--primary); padding-left: 12px; margin-bottom: 20px; }
.profile-section h6 { color: var(--primary); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Homework status colors ── */
.hw-assigned  { border-left: 3px solid #3b82f6; }
.hw-submitted { border-left: 3px solid #8b5cf6; }
.hw-reviewed  { border-left: 3px solid #f59e0b; }
.hw-completed { border-left: 3px solid #10b981; }
.hw-overdue   { border-left: 3px solid #ef4444; }

/* ── Zoom meeting cards ── */
.meeting-card { border-radius: 12px; border: 1px solid #e2e8f0; }
.meeting-card .join-btn { background: #2563eb; color: #fff; }
.meeting-card .join-btn:hover { background: #1d4ed8; color: #fff; }

/* Fix modal scroll issue */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}
:root {
    --primary: #4f46e5;
    --primary-light: #eef2ff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --radius: 14px;
}

/* Clean background */
body {
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* Headings */
h1, h2, h3, h4 {
    font-weight: 600;
}

/* Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: 0.25s;
}

.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Header */
.card-header-custom {
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

/* Tabs (clean underline style) */
.nav-tabs {
    border-bottom: 1px solid var(--border);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: transparent;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: #4338ca;
}

/* Stats cards (simple color accent) */
.stat-card {
    border-left: 4px solid var(--primary);
    background: white;
    border-radius: var(--radius);
}

/* Tables */
.table thead th {
    background: #f1f5f9;
    color: var(--text-muted);
    font-weight: 600;
}

.table tbody tr {
    background: white;
    transition: 0.2s;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* Remove heavy animations */
.animate-card {
    animation: none;
}