/* ==========================================================================
   CSS RESET & VARIABLES SYSTEM
   ========================================================================== */
:root {
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Theme: Light Lavender/Gray Premium */
  --bg-primary: #f5f6fa;
  --bg-sidebar: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-color: rgba(226, 232, 240, 0.8);
  
  --text-main: #1e1b4b;
  --text-muted: #64748b;
  
  /* Vibrant Palette */
  --primary: #7c3aed; /* Velvet Purple */
  --primary-hover: #6d28d9;
  --primary-light: rgba(124, 58, 237, 0.1);
  
  --secondary: #06b6d4; /* Teal */
  --success: #10b981; /* Emerald Green */
  --warning: #f59e0b; /* Amber */
  --danger: #ef4444; /* Rose Red */
  
  --card-shadow: 0 10px 30px -5px rgba(124, 58, 237, 0.05), 
                 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  --glass-blur: blur(12px);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Overrides */
body.dark-mode {
  --bg-primary: #0f0a1c;
  --bg-sidebar: #171126;
  --bg-card: rgba(30, 23, 46, 0.7);
  --border-color: rgba(255, 255, 255, 0.05);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --primary: #a78bfa;
  --primary-hover: #c084fc;
  --primary-light: rgba(167, 139, 250, 0.15);
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3), 
                 0 1px 3px 0 rgba(255, 255, 255, 0.02);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   UTILITY & COMPONENT STYLES
   ========================================================================== */
.glass {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.hidden {
  display: none !important;
}

.btn-primary {
  font-family: var(--font-title);
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.btn-secondary {
  font-family: var(--font-title);
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-success {
  font-family: var(--font-title);
  background: var(--success);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-text:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   LOGIN SCREEN LAYOUT
   ========================================================================== */
.login-wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top right, var(--primary-light), transparent 50%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.05), transparent 50%);
}

.login-card {
  width: 100%;
  max-width: 480px;
  padding: 40px;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.login-header h2 {
  font-family: var(--font-title);
  font-size: 28px;
  margin-bottom: 8px;
}

.login-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.input-icon-wrapper input,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 24px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.login-options a {
  color: var(--primary);
  font-weight: 600;
}

.login-wrapper button {
  width: 100%;
  justify-content: center;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   CORE DASHBOARD WRAPPER
   ========================================================================== */
.dashboard-wrapper {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* 1. Sidebar Design */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition);
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.menu-label {
  font-family: var(--font-title);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 20px 0 8px 12px;
  font-weight: 700;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 4px;
  transition: var(--transition);
}

.menu-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.menu-item:hover, .menu-item.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

.menu-item.active {
  font-weight: 700;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  transition: var(--transition);
}
.theme-toggle:hover {
  background: var(--border-color);
  color: var(--text-main);
}

/* 2. Top Header */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.topbar {
  height: 72px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  transition: var(--transition);
}

.topbar-search {
  position: relative;
  width: 320px;
}

.topbar-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.topbar-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  outline: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}
.action-btn:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-size: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
}

.badge-blue {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  font-size: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  padding: 6px 12px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition);
}
.user-profile:hover {
  background: var(--bg-primary);
}

.user-profile img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.profile-dropdown-icon {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-dropdown {
  position: absolute;
  top: 52px;
  right: 0;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 8px;
  width: 160px;
  display: none;
  z-index: 20;
}
.user-profile:hover .profile-dropdown {
  display: block;
}

.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main);
  transition: var(--transition);
}
.profile-dropdown a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   PANELS & VIEWS COMMON SETUP
   ========================================================================== */
#content-area {
  padding: 32px;
  flex: 1;
}

.content-panel {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.content-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.panel-header h1 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.panel-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.date-badge {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

/* ==========================================================================
   WIDGETS, STATISTICS CARDS & CHARTS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}

.stat-info h3 {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-info h2 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.trend {
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.trend.positive { color: var(--success); }
.trend.negative { color: var(--danger); }
.trend.neutral { color: var(--text-muted); }

/* Glow Accents */
.purple-glow .stat-icon { background: rgba(124, 58, 237, 0.1); color: #7c3aed; }
.purple-glow::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: rgba(124, 58, 237, 0.05); filter: blur(30px); border-radius: 50%; }

.blue-glow .stat-icon { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.blue-glow::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: rgba(6, 182, 212, 0.05); filter: blur(30px); border-radius: 50%; }

.orange-glow .stat-icon { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.orange-glow::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: rgba(245, 158, 11, 0.05); filter: blur(30px); border-radius: 50%; }

.green-glow .stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.green-glow::after { content: ''; position: absolute; top: -50px; right: -50px; width: 100px; height: 100px; background: rgba(16, 185, 129, 0.05); filter: blur(30px); border-radius: 50%; }

/* Charts Layout */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
}

.chart-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.chart-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

.chart-legend {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.teacher { background: #7c3aed; }
.dot.student { background: #06b6d4; }

.chart-body {
  flex: 1;
  position: relative;
  min-height: 260px;
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .details-grid { grid-template-columns: 1fr; }
}

.table-card, .list-card {
  padding: 24px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

tr:last-child td {
  border-bottom: none;
}

.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-status.present { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-status.absent { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-status.late { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-status.leave { background: rgba(6, 182, 212, 0.1); color: var(--secondary); }

/* Table Filters Card */
.filter-card {
  padding: 20px;
  margin-bottom: 24px;
}

.filters-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group.font-search {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.filter-group select, .filter-group input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  outline: none;
}

.search-input-wrapper {
  position: relative;
}
.search-input-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-input-wrapper input {
  padding-left: 36px !important;
}

/* ==========================================================================
   FEED & ANNOUNCEMENT CARDS
   ========================================================================== */
.feed-card {
  padding: 24px;
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-item {
  display: flex;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.feed-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.6);
}

.feed-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.feed-content h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.feed-content p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}

.feed-time {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   NOTICES & EVENTS SPLIT LAYOUT
   ========================================================================== */
.notices-events-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.notices-events-split .card {
  padding: 24px;
}

/* ==========================================================================
   REPORTS EXPORT LAYOUT
   ========================================================================== */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.report-box {
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.report-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  margin-bottom: 20px;
}

.report-box h3 {
  font-family: var(--font-title);
  font-size: 18px;
  margin-bottom: 10px;
}

.report-box p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.download-report-btn {
  width: 100%;
  justify-content: center;
}

/* ==========================================================================
   CLASSES & SUBJECTS GRID
   ========================================================================== */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.class-card {
  padding: 24px;
}

.class-card h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  margin-bottom: 8px;
}

/* ==========================================================================
   CHAT MODULE WINDOW LAYOUT
   ========================================================================== */
.chat-container-box {
  height: calc(100vh - 180px);
  display: flex;
  overflow: hidden;
}

.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.chat-sidebar h3 {
  font-family: var(--font-title);
  font-size: 18px;
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--border-color);
}

.chat-users-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.chat-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: var(--transition);
}
.chat-user-item:hover, .chat-user-item.active {
  background: var(--primary-light);
}

.chat-user-item img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-user-info {
  flex: 1;
}

.chat-user-name {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.chat-user-lastmsg {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.2);
}

.chat-main-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
}
.chat-main-placeholder i {
  font-size: 64px;
  margin-bottom: 16px;
  color: var(--primary-light);
}

.chat-main-active {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-active-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-sidebar);
}

.avatar-and-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-and-name img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-and-name h4 {
  font-family: var(--font-title);
  font-size: 15px;
}
.avatar-and-name span {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-messages-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message-bubble {
  max-width: 60%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

.message-bubble.sent {
  background: var(--primary);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message-bubble.received {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 9px;
  display: block;
  text-align: right;
  margin-top: 4px;
  opacity: 0.7;
}

.chat-input-bar {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  display: flex;
  gap: 16px;
}

.chat-input-bar input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-main);
  outline: none;
}

/* ==========================================================================
   MODAL WINDOW DIALOGS
   ========================================================================== */
.modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 10, 28, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  animation: fadeIn 0.3s ease;
}

.modal-box {
  width: 100%;
  max-width: 640px;
  padding: 32px;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-family: var(--font-title);
  font-size: 22px;
}

.close-modal-icon {
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}
.close-modal-icon:hover {
  color: var(--text-main);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.report-meta {
  margin-bottom: 20px;
  color: var(--text-muted);
  display: flex;
  gap: 24px;
  font-size: 14px;
}

/* Action button configurations */
.actions-cell {
  display: flex;
  gap: 8px;
}
.btn-action-delete {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
}
.btn-action-edit {
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
}
