/* ===================================================
   COMPASS Mentor - Main Stylesheet
   Design: Trustworthy, bright blue, educational
   =================================================== */

/* ---- CSS Variables ---- */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --primary-soft: #EFF6FF;
  --accent: #60A5FA;
  --accent-sky: #BAE6FD;
  --success: #16A34A;
  --success-light: #DCFCE7;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --text-main: #1E293B;
  --text-sub: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --bg: #F8FAFC;
  --bg-white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(37,99,235,0.10);
  --shadow-lg: 0 8px 32px rgba(37,99,235,0.14);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font: 'Noto Sans JP', 'Inter', sans-serif;
  --transition: 0.2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text-main);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* ---- Typography ---- */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.25; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.1rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
p { margin-bottom: 0; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-muted { color: var(--text-muted); }
.text-sub { color: var(--text-sub); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* ---- Layout ---- */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 720px; }
.container-lg { max-width: 1300px; }

/* ---- Header ---- */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.header-logo { display: flex; align-items: center; gap: 4px; text-decoration: none; }
.header-logo img { height: 40px; width: auto; display: block; object-fit: contain; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.header-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sub);
  transition: all var(--transition);
}
.header-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.header-nav .btn-primary { color: #fff; background: var(--primary); }
.header-nav .btn-primary:hover { background: var(--primary-dark); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-main); border-radius: 2px; transition: all var(--transition); }
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 12px 20px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 12px 0; border-bottom: 1px solid var(--border-light); font-weight: 500; color: var(--text-main); }

/* ---- Footer ---- */
.site-footer {
  background: var(--text-main);
  color: #94A3B8;
  padding: 48px 0 24px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo { margin-bottom: 12px; filter: brightness(10); opacity: 0.9; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; margin-top: 8px; }
.footer-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; font-weight: 600; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #94A3B8; font-size: 0.85rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: #94A3B8; }
.footer-bottom a:hover { color: #fff; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover { background: var(--primary-light); }
.btn-secondary {
  background: var(--border-light);
  color: var(--text-sub);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--border); color: var(--text-main); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 15px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Cards ---- */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-body { padding: 24px; }
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: var(--bg-white);
}
.card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--border-light);
}
.card-hover { transition: all var(--transition); }
.card-hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---- Mentor Cards ---- */
.mentor-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}
.mentor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.mentor-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--primary-soft);
}
.mentor-card-avatar {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--primary);
}
.mentor-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.mentor-card-name { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.mentor-card-univ { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 12px; }
.mentor-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mentor-card-bio {
  font-size: 0.83rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mentor-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.mentor-card-price { font-size: 0.85rem; font-weight: 700; color: var(--primary); }

/* ---- Tags & Badges ---- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: var(--success-light); color: var(--success); }
.tag-yellow { background: var(--warning-light); color: #92400E; }
.tag-gray { background: var(--border-light); color: var(--text-sub); }
.tag-red { background: var(--danger-light); color: var(--danger); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-verified { background: var(--success-light); color: var(--success); }
.badge-pending { background: var(--warning-light); color: #92400E; }
.badge-rejected { background: var(--danger-light); color: var(--danger); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* ---- Status indicators ---- */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-dot-green { background: var(--success); }
.status-dot-yellow { background: var(--warning); }
.status-dot-red { background: var(--danger); }
.status-dot-blue { background: var(--primary); }
.status-dot-gray { background: var(--text-muted); }

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 3px; }
.form-label .optional { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; margin-left: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  color: var(--text-main);
  background: var(--bg-white);
  transition: all var(--transition);
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--danger); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkbox-group, .radio-group { display: flex; flex-direction: column; gap: 10px; }
.checkbox-label, .radio-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-main);
}
.checkbox-label input, .radio-label input { margin-top: 3px; flex-shrink: 0; accent-color: var(--primary); }

/* ---- Alert / Notice ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
}
.alert-info { background: var(--primary-light); border-color: var(--accent); color: var(--primary-dark); }
.alert-success { background: var(--success-light); border-color: #86EFAC; color: #14532D; }
.alert-warning { background: var(--warning-light); border-color: #FCD34D; color: #78350F; }
.alert-danger { background: var(--danger-light); border-color: #FCA5A5; color: #7F1D1D; }
.alert i { flex-shrink: 0; margin-top: 2px; }

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 12px 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-sub); }
.breadcrumb .sep { color: var(--border); }

/* ---- Page Header ---- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #1E40AF 100%);
  color: #fff;
  padding: 48px 0;
  margin-bottom: 32px;
}
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,0.85); font-size: 1.05rem; }

/* ---- Section Headers ---- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-sub); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
.section-title-line {
  display: inline-block;
  width: 48px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 16px auto 0;
  display: block;
}

/* ---- Step indicator ---- */
.steps { display: flex; gap: 0; position: relative; margin-bottom: 32px; }
.steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
}
.step.active .step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.done .step-num { background: var(--success); border-color: var(--success); color: #fff; }
.step-label { font-size: 0.78rem; color: var(--text-muted); text-align: center; }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.done .step-label { color: var(--success); }

/* ---- Stat Cards ---- */
.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  flex-shrink: 0;
}
.stat-icon-warning { background: var(--warning-light); color: var(--warning); }
.stat-icon-danger { background: var(--danger-light); color: var(--danger); }
.stat-icon-success { background: var(--success-light); color: var(--success); }
.stat-info { flex: 1; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text-main); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  background: var(--bg);
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--primary-soft); }

/* ---- Divider ---- */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.divider-dashed { border-top: 1px dashed var(--border); margin: 24px 0; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; color: var(--border); }
.empty-state p { font-size: 0.9rem; margin-top: 8px; }

/* ---- Loading spinner ---- */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Toast / Notification ---- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-danger { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.05rem;
}
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text-main); }

/* ---- Section padding ---- */
.section { padding: 64px 0; }
.section-lg { padding: 96px 0; }
.section-sm { padding: 40px 0; }
.section-alt { background: var(--bg-white); }
.section-blue { background: linear-gradient(135deg, var(--primary) 0%, #1E40AF 100%); color: #fff; }
.section-soft { background: var(--primary-soft); }

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

/* ---- Sidebar Layout ---- */
.sidebar-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  gap: 0;
}
.admin-sidebar {
  background: var(--text-main);
  min-height: 100vh;
  padding: 0;
  position: sticky;
  top: 0;
  overflow-y: auto;
  height: 100vh;
}
.admin-sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-sidebar-logo img { height: 32px; filter: brightness(10); }
.admin-sidebar-logo span { color: #fff; font-size: 0.8rem; font-weight: 600; opacity: 0.7; }
.admin-nav { padding: 16px 0; }
.admin-nav-section { padding: 10px 20px 4px; font-size: 0.72rem; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.08em; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #94A3B8;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,0.07); }
.admin-nav a.active { color: #fff; background: rgba(37,99,235,0.2); border-left-color: var(--primary); }
.admin-nav a i { width: 18px; text-align: center; }
.admin-content { background: var(--bg); padding: 28px; overflow-x: hidden; }
.admin-page-header { margin-bottom: 28px; }
.admin-page-header h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; }
.admin-page-header p { color: var(--text-sub); font-size: 0.9rem; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab-item {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab-item:hover { color: var(--primary); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Chat ---- */
.chat-layout { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 65px); }
.chat-sidebar { border-right: 1px solid var(--border); background: var(--bg-white); overflow-y: auto; }
.chat-sidebar-header { padding: 18px 20px; border-bottom: 1px solid var(--border); font-weight: 700; }
.chat-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.chat-item:hover, .chat-item.active { background: var(--primary-soft); }
.chat-item-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
  flex-shrink: 0;
}
.chat-item-info { flex: 1; min-width: 0; }
.chat-item-name { font-size: 0.9rem; font-weight: 600; color: var(--text-main); }
.chat-item-preview { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item-time { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }
.chat-main { display: flex; flex-direction: column; background: var(--bg); }
.chat-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}
.chat-booking-info {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  flex-shrink: 0;
}
.chat-booking-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.chat-booking-item { display: flex; align-items: center; gap: 6px; color: var(--text-sub); }
.meet-url-bar {
  background: var(--success-light);
  border: 1px solid #86EFAC;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.82rem;
}
.meet-url-bar a { color: var(--success); font-weight: 600; word-break: break-all; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.message { max-width: 72%; }
.message.self { align-self: flex-end; }
.message.other { align-self: flex-start; }
.message.system { align-self: center; max-width: 90%; }
.message-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.55;
}
.message.self .message-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.message.other .message-bubble { background: var(--bg-white); border: 1px solid var(--border); color: var(--text-main); border-bottom-left-radius: 4px; }
.message.system .message-bubble {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 8px;
  font-size: 0.8rem;
  text-align: center;
  padding: 8px 16px;
  border: 1px solid var(--accent-sky);
}
.message-time { font-size: 0.7rem; color: var(--text-muted); margin-top: 4px; }
.message.self .message-time { text-align: right; }
.chat-input-area {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  flex-shrink: 0;
}
.chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-input-row textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  font-family: var(--font);
  color: var(--text-main);
  transition: border-color var(--transition);
}
.chat-input-row textarea:focus { outline: none; border-color: var(--primary); }
.chat-input-actions { display: flex; gap: 6px; align-items: center; margin-top: 8px; }

/* ---- Utility ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-1 { gap: 4px; }
.flex-gap-2 { gap: 8px; }
.flex-gap-3 { gap: 12px; }
.flex-gap-4 { gap: 16px; }
.align-center { align-items: center; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.block { display: block; }
.inline-block { display: inline-block; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.rounded-full { border-radius: 9999px; }
.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 200px 1fr; }
  .chat-layout { grid-template-columns: 280px 1fr; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-mentor { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .chat-sidebar.show { display: block; position: fixed; inset: 0; z-index: 200; }
  .form-row { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; position: fixed; inset: 0; z-index: 200; }
  .admin-sidebar.open { display: block; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .btn-lg { padding: 13px 24px; }
}

/* ---- Animations ---- */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.slide-up { animation: slideUp 0.35s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---- Avatar ---- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-md { width: 48px; height: 48px; font-size: 1rem; }
.avatar-lg { width: 80px; height: 80px; font-size: 1.5rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2rem; }

/* ---- Filter sidebar ---- */
.filter-sidebar {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 80px;
}
.filter-sidebar h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; }
.filter-group { margin-bottom: 20px; }
.filter-group-title { font-size: 0.8rem; font-weight: 600; color: var(--text-sub); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.filter-check { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 0.875rem; cursor: pointer; }
.filter-check input { accent-color: var(--primary); }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 24px 0; }
.page-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-sub);
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
