@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');
@import url('./toast.css');
@import url('./modal.css');

:root {
  --primary: #0B0F14;
  --surface: #0F141B;
  --surface-2: #151B24;
  --surface-3: #1A222D;
  --border: #1F2733;
  --border-light: #2A3544;
  --text: #F5F7FA;
  --muted: #B3BAC7;
  --accent: #00E6A7;
  --accent2: #7C3AED;
  --gold: #FFD700;
  --silver: #C0C0C0;
  --bronze: #CD7F32;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #eab308;
  --grad-accent: linear-gradient(135deg, #00E6A7 0%, #7C3AED 100%);
  --grad-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Starfield Background Canvas - Optimized */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  will-change: contents;
  contain: strict;
}

/* Glass Morphism - Optimized */
.glass {
  background: rgba(15, 20, 27, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  will-change: transform;
  contain: layout style paint;
}

.glass-strong {
  background: rgba(15, 20, 27, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  will-change: transform;
  contain: layout style paint;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

/* Login Page */
.login-box {
  max-width: 480px;
  margin: 10vh auto;
  padding: 48px 56px;
  border-radius: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-accent);
}

.logo-container {
  margin-bottom: 28px;
}

.logo {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  object-fit: contain;
  border: 2px solid var(--border);
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
}

.logo-small {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
}

.title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 32px;
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-family: inherit;
  justify-content: center;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--grad-accent);
  color: #000;
  font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 230, 167, 0.4);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-success {
  background: var(--success);
  color: #000;
}

.btn-success:hover:not(:disabled) {
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-warning {
  background: var(--warning);
  color: #000;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-user .btn {
  gap: 8px;
  padding: 10px 18px;
}

/* Cards - Optimized */
.card {
  padding: 28px;
  border-radius: 20px;
  margin-bottom: 24px;
  position: relative;
  contain: layout style;
}

.card h3 {
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

/* Welcome Section */
.welcome-section {
  background: linear-gradient(135deg, rgba(0, 230, 167, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  border: 1px solid rgba(0, 230, 167, 0.2);
}

.welcome-section h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

/* Attendance Controls */
.attendance-controls {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 28px 0;
}

.attendance-status {
  text-align: center;
  padding: 24px;
  background: rgba(0, 230, 167, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(0, 230, 167, 0.2);
}

.attendance-status.logged-out {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Leaderboard */
.leaderboard {
  list-style: none;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.leaderboard-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-6px);
  border-color: var(--border);
}

.leaderboard-item.is-online {
  background: rgba(0, 230, 167, 0.08);
  border-color: rgba(0, 230, 167, 0.2);
}

.rank {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--muted);
  min-width: 50px;
  text-align: center;
}

.rank.rank-1 {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rank.rank-2 {
  color: var(--silver);
  text-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}

.rank.rank-3 {
  color: var(--bronze);
  text-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.avatar-container {
  position: relative;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-accent);
  color: #000;
  font-weight: 700;
  font-size: 1.2rem;
}

.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: var(--success);
  border-radius: 50%;
  border: 3px solid var(--surface);
}

.online-indicator.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.user-info {
  flex: 1;
}

.user-name {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.user-time {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: 'Courier New', monospace;
}

/* Stats Card */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Admin Panel */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.admin-tab {
  padding: 14px 28px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

/* Tables - Optimized */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  contain: layout style;
}

.table th,
.table td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: rgba(0, 230, 167, 0.08);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Forms */
.form-group {
  margin-bottom: 22px;
}

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input::placeholder {
  color: var(--muted);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B3BAC7' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 44px;
}

.form-group select option {
  background: var(--surface-2);
  color: var(--text);
  padding: 12px;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 230, 167, 0.1);
}

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

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Logs Container */
.logs-container {
  max-height: 600px;
  overflow-y: auto;
  border-radius: 12px;
}

.logs-container::-webkit-scrollbar {
  width: 8px;
}

.logs-container::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.logs-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Utilities */
.muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.text-accent {
  color: var(--accent);
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Main Content */
.main-content {
  padding-top: 20px;
  min-height: calc(100vh - 80px);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .login-box {
    margin: 5vh 16px;
    padding: 32px 24px;
  }
  
  .navbar {
    padding: 12px 16px;
  }
  
  .card {
    padding: 20px;
  }
  
  .attendance-controls {
    flex-direction: column;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Glow Effects */
.glow-accent {
  box-shadow: 0 0 30px rgba(0, 230, 167, 0.3);
}

.glow-purple {
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-header svg {
  color: var(--accent);
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Tooltips */
[data-tooltip] {
  position: relative;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 1000;
}

/* ============================================
   Tools Page Styles
   ============================================ */

/* Tools Tabs */
.tools-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.tools-tab {
  padding: 14px 24px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tools-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tools-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tools-tab svg {
  flex-shrink: 0;
}

.tools-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tools-tab-content.active {
  display: block;
}

/* Search Box */
.search-box {
  position: relative;
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
  transition: all 0.3s;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 230, 167, 0.1);
}

.search-input::placeholder {
  color: var(--muted);
}

.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  transition: all 0.3s;
}

.search-input:focus + .search-icon {
  color: var(--accent);
}

/* Violations List */
.violations-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.violations-section {
  animation: fadeIn 0.3s ease;
}

.violations-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 230, 167, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.violations-section-title svg {
  flex-shrink: 0;
}

.violations-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Violation Card */
.violation-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-right: 4px solid var(--danger);
  border-radius: 14px;
  transition: all 0.3s;
}

.violation-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-4px);
  border-color: rgba(239, 68, 68, 0.3);
}

.violation-name {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
}

.violation-punishment {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--danger);
  padding: 10px 18px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 10px;
  white-space: nowrap;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Laws List */
.laws-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.law-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
}

.law-section:hover {
  border-color: rgba(0, 230, 167, 0.3);
}

.law-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(0, 230, 167, 0.05);
}

.law-section-header:hover {
  background: rgba(0, 230, 167, 0.1);
}

.law-section-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.law-toggle-icon {
  color: var(--accent);
  transition: transform 0.3s;
}

.law-section-header.expanded .law-toggle-icon {
  transform: rotate(180deg);
}

.law-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 22px;
}

.law-section-content.expanded {
  max-height: 2000px;
  padding: 18px 22px;
}

.law-item {
  display: flex;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-right: 3px solid rgba(0, 230, 167, 0.4);
  line-height: 1.7;
  transition: all 0.3s;
}

.law-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(-4px);
}

.law-number {
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.law-text {
  color: var(--text);
}

/* Templates List */
.templates-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.template-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-right: 4px solid var(--accent);
  border-radius: 14px;
  padding: 20px 24px;
  transition: all 0.3s;
}

.template-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(-4px);
}

.template-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.6;
}

.template-description {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 14px;
  font-style: italic;
}

.template-card .btn {
  margin-top: 8px;
}

/* Notices List */
.notices-list {
  padding: 0;
}

.notices-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notice-item {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-right: 3px solid var(--border);
  line-height: 1.7;
  transition: all 0.3s;
}

.notice-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notice-item.warning {
  background: rgba(234, 179, 8, 0.1);
  border-right-color: var(--warning);
  color: var(--warning);
  font-weight: 600;
}

.notice-spacer {
  height: 8px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* Textarea */
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
  resize: vertical;
  min-height: 80px;
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 230, 167, 0.1);
}

.form-group textarea::placeholder {
  color: var(--muted);
}

/* Result Container */
.result-container {
  margin-top: 20px;
  padding: 20px;
  background: rgba(0, 230, 167, 0.08);
  border: 1px solid rgba(0, 230, 167, 0.2);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.result-label {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

.result-text {
  font-size: 1.1rem;
  color: var(--text);
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  word-break: break-word;
  white-space: pre-wrap;
}

/* Add Item Button */
.add-item-btn {
  width: 100%;
  margin-bottom: 20px;
  border: 2px dashed var(--border);
  background: transparent;
}

.add-item-btn:hover {
  border-color: var(--accent);
  background: rgba(0, 230, 167, 0.05);
}

/* Calculator Items List */
.calculator-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  max-height: 300px;
  overflow-y: auto;
}

.calculator-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.calculator-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--danger);
}

.calculator-item-info {
  flex: 1;
}

.calculator-item-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.calculator-item-details {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Compensation Result */
.compensation-result {
  margin-top: 28px;
  padding: 28px;
  background: rgba(239, 68, 68, 0.08);
  border: 2px solid rgba(239, 68, 68, 0.2);
  border-radius: 18px;
}

.compensation-result .result-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.compensation-items-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  max-height: 250px;
  overflow-y: auto;
}

.compensation-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.result-item-name {
  font-weight: 600;
}

.result-item-calc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.result-item-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--danger);
}

.compensation-total {
  padding: 20px;
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid var(--danger);
  border-radius: 14px;
  text-align: center;
}

.total-label {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.total-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--danger);
}

/* Report Form */
.report-form {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid rgba(239, 68, 68, 0.2);
}

.report-form h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 20px;
}

.report-form .form-group textarea[readonly] {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.3);
}

/* Scrollbar for lists */
.calculator-items-list::-webkit-scrollbar,
.compensation-items-result::-webkit-scrollbar {
  width: 6px;
}

.calculator-items-list::-webkit-scrollbar-track,
.compensation-items-result::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.calculator-items-list::-webkit-scrollbar-thumb,
.compensation-items-result::-webkit-scrollbar-thumb {
  background: var(--danger);
  border-radius: 3px;
}

.calculator-items-list .empty-state {
  padding: 32px;
  font-size: 0.95rem;
}
