/* MickaEliteOS — Shared App Styles */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500;600&display=swap');

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

:root {
  --midnight: #0a0f1c;
  --slate: #1a2038;
  --slate-light: #232b47;
  --teal: #0fd9b2;
  --teal-dim: rgba(15, 217, 178, 0.12);
  --teal-border: rgba(15, 217, 178, 0.25);
  --amber: #f5a623;
  --amber-dim: rgba(245, 166, 35, 0.12);
  --red: #f05252;
  --red-dim: rgba(240, 82, 82, 0.12);
  --green: #0fd9b2;
  --ice: #e8f4f2;
  --fog: #94a3b8;
  --white: #ffffff;
  --border: rgba(255,255,255,0.06);
  --sidebar-width: 220px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--midnight);
  color: var(--white);
  min-height: 100vh;
  display: flex;
}

h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--slate);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar-logo {
  padding: 28px 24px 24px;
  border-bottom: 1px solid var(--border);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
  color: var(--white);
}
.sidebar-logo span { color: var(--teal); }
.sidebar-logo small {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--fog);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}
.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--fog);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.nav-link:hover {
  background: rgba(255,255,255,0.04);
  color: var(--white);
}
.nav-link.active {
  background: var(--teal-dim);
  color: var(--teal);
}
.nav-link .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--fog);
}

/* ---- MAIN CONTENT ---- */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-header {
  padding: 28px 36px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.page-header p {
  font-size: 0.85rem;
  color: var(--fog);
  margin-top: 3px;
}
.page-content {
  padding: 28px 36px;
  flex: 1;
}

/* ---- STAT CARDS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 30px; right: 30px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.5;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--fog);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--white);
}
.stat-value.teal { color: var(--teal); }
.stat-value.amber { color: var(--amber); }
.stat-value.red { color: var(--red); }
.stat-sub {
  font-size: 0.78rem;
  color: var(--fog);
  margin-top: 4px;
}

/* ---- CARDS ---- */
.card {
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-head h3 {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.card-body { padding: 0; }

/* ---- TABLE ---- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 12px 18px;
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fog);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 14px 18px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr {
  transition: background 0.1s ease;
  cursor: pointer;
}
.table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-scheduled { background: var(--teal-dim); color: var(--teal); }
.badge-in-progress { background: var(--amber-dim); color: var(--amber); }
.badge-completed { background: rgba(100,200,120,0.12); color: #6dc880; }
.badge-active { background: var(--teal-dim); color: var(--teal); }
.badge-inactive { background: rgba(255,255,255,0.06); color: var(--fog); }
.badge-high { background: var(--red-dim); color: var(--red); }
.badge-normal { background: rgba(255,255,255,0.06); color: var(--fog); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 9px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
}
.btn-primary {
  background: var(--teal);
  color: var(--midnight);
}
.btn-primary:hover { background: #0bc9a4; }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(240, 82, 82, 0.2);
}
.btn-danger:hover { background: rgba(240,82,82,0.2); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 7px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fog);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 7px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--midnight);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  padding: 10px 14px;
  color: var(--white);
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s ease;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal-border);
}
.form-select option { background: var(--slate); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ---- MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--slate);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  width: 560px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s ease;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.modal-body { padding: 22px 26px; }
.modal-footer {
  padding: 16px 26px 22px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-close {
  background: none;
  border: none;
  color: var(--fog);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--white); }

/* ---- STATUS DOT ---- */
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-teal { background: var(--teal); animation: pulse 2s infinite; }
.dot-amber { background: var(--amber); animation: pulse 2s infinite; }
.dot-gray { background: var(--fog); }
.dot-green { background: #6dc880; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---- SEARCH BAR ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.search-input {
  flex: 1;
  background: var(--slate);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--white);
  font-size: 0.88rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--teal-border); }
.search-input::placeholder { color: var(--fog); }

/* ---- EMPTY STATE ---- */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--fog);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* ---- LOADING ---- */
.loading {
  padding: 40px;
  text-align: center;
  color: var(--fog);
  font-size: 0.88rem;
}

/* ---- TOAST ---- */
.toast-container {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--slate-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  transform: translateX(120%);
  transition: transform 0.25s ease;
}
.toast.show { transform: translateX(0); }
.toast.success { border-color: var(--teal-border); }
.toast.error { border-color: rgba(240,82,82,0.3); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar-logo small, .sidebar-logo div, .nav-link span:not(.nav-icon) { display: none; }
  .main { margin-left: 60px; }
  .page-content { padding: 20px 18px; }
  .page-header { padding: 18px 20px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
