/* ── AWM TIP — Application Styles ─────────────────────────────────────────── */

:root {
  --awm-sidebar-w: 240px;
  --awm-topbar-h: 56px;
  --awm-bg:       #f0f2f5;
  --awm-sidebar-bg: #1a1f2e;
  --awm-sidebar-text: #c9d1d9;
  --awm-sidebar-active: #0d6efd;
  --awm-brand:    #e05c2a;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
body {
  background: var(--awm-bg);
  overflow-x: hidden;
}

.awm-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--awm-sidebar-w);
  height: 100vh;
  background: var(--awm-sidebar-bg);
  color: var(--awm-sidebar-text);
  overflow-y: auto;
  z-index: 1000;
  transition: transform .25s ease;
}

.awm-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.awm-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}
.awm-brand-text {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  letter-spacing: .5px;
}

.awm-nav {
  list-style: none;
  padding: 10px 0;
  margin: 0;
}
.awm-nav-section {
  padding: 12px 16px 4px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  cursor: default;
}
.awm-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--awm-sidebar-text);
  text-decoration: none;
  font-size: .875rem;
  border-radius: 0;
  transition: background .15s, color .15s;
}
.awm-nav li a i { width: 16px; text-align: center; }
.awm-nav li a:hover { background: rgba(255,255,255,.06); color: #fff; }
.awm-nav li.active a { background: var(--awm-sidebar-active); color: #fff; }

.awm-main {
  margin-left: var(--awm-sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.awm-topbar {
  position: sticky;
  top: 0;
  height: var(--awm-topbar-h);
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  z-index: 900;
}
.awm-sidebar-toggle { color: #495057; }
.awm-topbar-title {
  font-weight: 600;
  font-size: 1rem;
  flex: 1;
}
.awm-topbar-user { display: flex; align-items: center; font-size: .875rem; }

.awm-content {
  flex: 1;
  padding: 24px 0;
}

/* ── KPI Cards ────────────────────────────────────────────────────────────── */
.awm-kpi-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}
.awm-kpi-icon {
  width: 52px; height: 52px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.awm-kpi-green  .awm-kpi-icon  { background: #d1e7dd; color: #0a7644; }
.awm-kpi-blue   .awm-kpi-icon  { background: #cfe2ff; color: #0a4baf; }
.awm-kpi-purple .awm-kpi-icon  { background: #e8d5fd; color: #7b2fbe; }
.awm-kpi-red    .awm-kpi-icon  { background: #f8d7da; color: #842029; }
.awm-kpi-value  { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.awm-kpi-label  { font-size: .78rem; color: #6c757d; margin-top: 3px; }

/* ── Stat Cards ───────────────────────────────────────────────────────────── */
.awm-stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.awm-stat-value { font-size: 1.35rem; font-weight: 700; }
.awm-stat-label { font-size: .75rem; color: #6c757d; margin-top: 2px; }

/* ── Alert KPI bar ────────────────────────────────────────────────────────── */
.awm-alert-kpi {
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: #495057;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .15s;
}
.awm-alert-kpi:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.awm-alert-kpi-active  { background: #fff3cd; border-left: 4px solid #ffc107; }
.awm-alert-kpi-warning { background: #fff3cd; border-left: 4px solid #ff8c00; }

/* ── Alert list items ─────────────────────────────────────────────────────── */
.awm-alert-item { font-size: .85rem; }
.awm-alert-critical { background: #fff0f0; }
.awm-alert-warning  { background: #fffcf0; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.awm-table th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6c757d;
  border-bottom: 2px solid #dee2e6;
  background: #f8f9fa;
}
.awm-table td { font-size: .875rem; vertical-align: middle; }

/* ── Report cards ─────────────────────────────────────────────────────────── */
.awm-report-card {
  transition: transform .15s, box-shadow .15s;
  border: 1px solid #e9ecef;
}
.awm-report-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.awm-report-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}

/* ── Mini stats ───────────────────────────────────────────────────────────── */
.awm-mini-stat {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 8px 4px;
  font-weight: 600;
  font-size: .9rem;
}
.awm-mini-stat small { font-size: .7rem; font-weight: 400; color: #6c757d; }

/* ── Thumbnails ───────────────────────────────────────────────────────────── */
.awm-thumb-sm  { width: 36px; height: 36px; object-fit: cover; }
.awm-thumb-lg  { width: 80px; height: 80px; object-fit: cover; }
.awm-thumb-xl  { width: 120px; height: 120px; }
.awm-thumb-placeholder {
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
}

/* ── Login ────────────────────────────────────────────────────────────────── */
.awm-login-body {
  background: linear-gradient(135deg, #1a1f2e 0%, #2c3e50 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.awm-login-wrap { width: 100%; max-width: 420px; padding: 16px; }
.awm-login-card { border: 0; border-radius: 16px; }
.awm-login-logo {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

/* ── btn-xs helper ────────────────────────────────────────────────────────── */
.btn-xs { padding: .15rem .4rem; font-size: .75rem; }

/* ── Responsive: collapse sidebar on mobile ───────────────────────────────── */
@media (max-width: 767.98px) {
  .awm-sidebar { transform: translateX(-100%); }
  .awm-sidebar.open { transform: translateX(0); }
  .awm-main { margin-left: 0; }
}
