/* ============================================================
   Meeting Management System — Main Stylesheet
   Aastha Saksham Group | Brand: #F56A00 / #006B35
   ============================================================ */

:root {
  --orange:       #F56A00;
  --orange-light: #ff8c2f;
  --orange-dark:  #c45500;
  --green:        #006B35;
  --green-light:  #008f47;
  --green-dark:   #004d26;
  --black:        #111111;
  --sidebar-bg:   #0f1923;
  --sidebar-w:    260px;
  --navbar-h:     64px;
  --white:        #ffffff;
  --light-bg:     #f5f6fa;
  --card-bg:      #ffffff;
  --text-primary: #1a1a2e;
  --text-muted:   #6c757d;
  --border:       #e8ecf0;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.06);
  --shadow-md:    0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.15);
  --radius:       12px;
  --radius-lg:    18px;
  --transition:   all .25s ease;
}

[data-theme="dark"] {
  --light-bg:    #0d1117;
  --card-bg:     #161b22;
  --text-primary:#e6edf3;
  --text-muted:  #8b949e;
  --border:      #21262d;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --shadow-md:   0 4px 20px rgba(0,0,0,.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
  background: var(--light-bg);
  color: var(--text-primary);
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand-name { color: #fff; font-weight: 700; font-size: .88rem; display: block; line-height: 1.2; }
.brand-sub  { color: rgba(255,255,255,.45); font-size: .7rem; display: block; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.06); margin: 4px 0; }

.sidebar-section { padding: 6px 0; }
.sidebar-section-title {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,.45);
  padding: 8px 22px 4px;
  text-transform: uppercase;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .855rem;
  font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
  position: relative;
  margin: 2px 10px;
  border-radius: 8px;
}
.sidebar-link i { width: 18px; text-align: center; font-size: .9rem; }
.sidebar-link:hover {
  color: #fff;
  background: rgba(245,106,0,.15);
}
.sidebar-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 4px 15px rgba(245,106,0,.35);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 60%;
  background: var(--orange-light);
  border-radius: 0 4px 4px 0;
}
.text-danger-soft { color: rgba(255,99,99,.8) !important; }
.text-danger-soft:hover { color: #ff6363 !important; background: rgba(255,99,99,.12) !important; }

.sidebar-footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); }
.sidebar-user-name { color: #fff; font-size: .8rem; font-weight: 600; }
.sidebar-user-role { color: rgba(255,255,255,.4); font-size: .7rem; }

/* collapsed sidebar */
.sidebar.collapsed { width: 70px; }
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-section-title,
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-footer .sidebar-user div { display: none; }
.sidebar.collapsed .sidebar-link { justify-content: center; padding: 12px; }
.sidebar.collapsed .sidebar-link i { width: auto; font-size: 1.1rem; }
.sidebar.collapsed .sidebar-logo { width: 34px; height: 34px; }

/* ===================== MAIN WRAPPER ===================== */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: var(--transition);
}
.main-wrapper.sidebar-collapsed { margin-left: 70px; }

/* ===================== TOP NAVBAR ===================== */
.top-navbar {
  position: sticky;
  top: 0;
  height: var(--navbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 900;
  box-shadow: var(--shadow-sm);
  transition: background .3s;
}
.navbar-left, .navbar-right { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); font-size: 1.1rem;
  transition: var(--transition);
}
.sidebar-toggle:hover { background: var(--light-bg); }
.page-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.nav-icon-btn {
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 1rem;
  transition: var(--transition); position: relative;
}
.nav-icon-btn:hover { background: var(--light-bg); color: var(--orange); }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--orange); color: #fff;
  font-size: .6rem; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  padding: 0 3px;
}
.nav-user-btn {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 10px;
  transition: var(--transition);
}
.nav-user-btn:hover { background: var(--light-bg); }
.nav-user-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); }
.nav-user-name { font-size: .85rem; font-weight: 600; color: var(--text-primary); }

/* ===================== DROPDOWNS ===================== */
.notif-dropdown {
  width: 360px !important;
  padding: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  background: var(--card-bg) !important;
}
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: .9rem; color: var(--text-primary);
}
.mark-all-read { font-size: .78rem; color: var(--orange); text-decoration: none; }
.notif-body { max-height: 360px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--transition);
}
.notif-item:hover { background: var(--light-bg); }
.notif-item.unread { background: rgba(245,106,0,.05); }
.notif-item.unread::before {
  content: '';
  display: inline-block; width: 6px; height: 6px;
  background: var(--orange); border-radius: 50%;
  margin-top: 6px; flex-shrink: 0;
}
.notif-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(245,106,0,.1); display: flex; align-items: center; justify-content: center; color: var(--orange); flex-shrink: 0; }
.notif-title { font-size: .82rem; font-weight: 600; color: var(--text-primary); }
.notif-msg { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.notif-time { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }
.notif-footer { padding: 10px; text-align: center; border-top: 1px solid var(--border); }
.notif-footer a { font-size: .82rem; color: var(--orange); text-decoration: none; font-weight: 600; }

.user-dropdown { width: 220px; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-lg) !important; background: var(--card-bg) !important; }
.user-dropdown .dropdown-header { padding: 12px 16px; }
.user-dropdown .dropdown-header strong { display: block; font-size: .88rem; color: var(--text-primary); }
.user-dropdown .dropdown-header small { color: var(--text-muted); font-size: .75rem; }
.user-dropdown .dropdown-item { font-size: .85rem; padding: 8px 16px; color: var(--text-primary); }
.user-dropdown .dropdown-item:hover { background: var(--light-bg); color: var(--orange); }

/* ===================== PAGE CONTENT ===================== */
.page-content { padding: 24px; }

/* ===================== CARDS ===================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  font-weight: 700;
  font-size: .95rem;
}

/* ===================== STAT CARDS ===================== */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: .08;
}
.stat-card-orange::after { background: var(--orange); }
.stat-card-green::after  { background: var(--green); }
.stat-card-blue::after   { background: #0d6efd; }
.stat-card-purple::after { background: #6f42c1; }

.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 14px;
}
.stat-icon-orange { background: rgba(245,106,0,.12); color: var(--orange); }
.stat-icon-green  { background: rgba(0,107,53,.12);  color: var(--green); }
.stat-icon-blue   { background: rgba(13,110,253,.12); color: #0d6efd; }
.stat-icon-purple { background: rgba(111,66,193,.12); color: #6f42c1; }

.stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; }
.stat-change { font-size: .78rem; margin-top: 10px; display: flex; align-items: center; gap: 4px; }
.stat-change.up   { color: var(--green); }
.stat-change.down { color: #dc3545; }

/* ===================== BUTTONS ===================== */
.btn-orange {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff; border: none; border-radius: 10px;
  font-weight: 600; padding: 10px 22px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(245,106,0,.3);
}
.btn-orange:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,106,0,.4); color: #fff; }
.btn-green {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; border: none; border-radius: 10px;
  font-weight: 600; padding: 10px 22px;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0,107,53,.3);
}
.btn-green:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,107,53,.4); color: #fff; }
.btn-outline-orange {
  border: 2px solid var(--orange); color: var(--orange);
  border-radius: 10px; font-weight: 600; padding: 8px 20px;
  background: transparent; transition: var(--transition);
}
.btn-outline-orange:hover { background: var(--orange); color: #fff; }

/* ===================== BADGES ===================== */
.status-badge { padding: 5px 12px; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-scheduled  { background: rgba(13,110,253,.12);  color: #0d6efd; }
.badge-ongoing    { background: rgba(0,107,53,.12);    color: var(--green); }
.badge-completed  { background: rgba(25,135,84,.12);   color: #198754; }
.badge-cancelled  { background: rgba(220,53,69,.12);   color: #dc3545; }
.badge-postponed  { background: rgba(255,193,7,.12);   color: #b38600; }
.badge-active     { background: rgba(0,107,53,.12);    color: var(--green); }
.badge-inactive   { background: rgba(108,117,125,.12); color: #6c757d; }
.badge-priority-low    { background: rgba(108,117,125,.12); color: #6c757d; }
.badge-priority-medium { background: rgba(13,110,253,.12);  color: #0d6efd; }
.badge-priority-high   { background: rgba(245,106,0,.12);   color: var(--orange); }
.badge-priority-urgent { background: rgba(220,53,69,.12);   color: #dc3545; }

/* ===================== TABLES ===================== */
.table-card { background: var(--card-bg); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.table-card-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.table-card-title { font-weight: 700; font-size: .95rem; color: var(--text-primary); }
table.dataTable { color: var(--text-primary) !important; }
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background: var(--light-bg); border: 1px solid var(--border);
  color: var(--text-primary); border-radius: 8px; padding: 6px 10px;
}
.table > tbody > tr:hover td { background: rgba(245,106,0,.04); }
.table-hover tbody tr:hover { --bs-table-accent-bg: rgba(245,106,0,.04); }

/* ===================== FORMS ===================== */
.form-control, .form-select {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: .9rem;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(245,106,0,.15);
  background: var(--card-bg);
  color: var(--text-primary);
}
.form-label { font-weight: 600; font-size: .85rem; color: var(--text-primary); margin-bottom: 6px; }
.input-group-text { background: var(--light-bg); border: 1.5px solid var(--border); color: var(--text-muted); }

/* ===================== MEET LINK BUTTON ===================== */
.join-meet-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #00897b, #00695c);
  color: #fff; border: none; border-radius: 10px;
  padding: 8px 18px; font-weight: 600; font-size: .85rem;
  text-decoration: none; transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0,137,123,.3);
}
.join-meet-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,137,123,.4); color: #fff; }
.join-meet-btn img { width: 18px; }

/* ===================== CALENDAR ===================== */
.fc { font-family: 'Inter', sans-serif; color: var(--text-primary); }
.fc .fc-toolbar-title { font-size: 1.1rem; font-weight: 700; }
.fc .fc-button-primary { background: var(--orange) !important; border-color: var(--orange) !important; border-radius: 8px !important; }
.fc .fc-daygrid-event { border-radius: 6px; font-size: .78rem; }

/* ===================== AVATAR ===================== */
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.avatar-sm { width: 30px; height: 30px; }
.avatar-lg { width: 54px; height: 54px; }

/* ===================== ACTIVITY TIMELINE ===================== */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--orange); border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--orange);
}
.timeline-time { font-size: .72rem; color: var(--text-muted); margin-bottom: 2px; }
.timeline-content { font-size: .85rem; color: var(--text-primary); }

/* ===================== LOADING OVERLAY ===================== */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--sidebar-bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; transition: opacity .4s;
}
.loading-overlay.hide { opacity: 0; pointer-events: none; }
.loading-spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 4px solid rgba(245,106,0,.2);
  border-top-color: var(--orange);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-logo { width: 80px; border-radius: 12px; }

/* ===================== MISC ===================== */
.text-orange { color: var(--orange) !important; }
.text-green  { color: var(--green)  !important; }
.bg-orange   { background: var(--orange) !important; }
.bg-green    { background: var(--green)  !important; }
.border-orange { border-color: var(--orange) !important; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title  { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }

/* ===================== GLASSMORPHISM ===================== */
.glass {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  .page-content { padding: 16px; }
}
@media (max-width: 575px) {
  .stat-value { font-size: 1.6rem; }
  .top-navbar { padding: 0 14px; }
  .notif-dropdown { width: 300px !important; }
}

/* ===================== DARK MODE OVERRIDES ===================== */
[data-theme="dark"] .top-navbar    { background: #161b22; border-color: #21262d; }
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .table-card   { background: #161b22; border-color: #21262d; }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select  { background: #0d1117; border-color: #21262d; color: #e6edf3; }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { background: #0d1117; color: #e6edf3; }
[data-theme="dark"] .input-group-text { background: #21262d; border-color: #21262d; color: #8b949e; }
[data-theme="dark"] table.dataTable { background: #161b22; }
[data-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input { background: #0d1117; border-color: #21262d; color: #e6edf3; }
[data-theme="dark"] .notif-dropdown,
[data-theme="dark"] .user-dropdown { background: #161b22 !important; border-color: #21262d !important; }
