/* /public/assets/css/app.css */

/* Reset-ish */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;
  background: #f6f7fb;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: #6b7280; }
strong { font-weight: 650; }

.list { margin: 0; padding-left: 18px; }
.kpi { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d7dbe7;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: #f3f4f6; }
.btn--primary {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.btn--primary:hover { background: #0b1220; }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 10px; border-radius: 10px; font-size: 13px; }

.icon-btn {
  border: 1px solid #d7dbe7;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f172a;
  color: #e5e7eb;
  padding: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.main {
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.topbar__title {
  font-weight: 750;
  letter-spacing: -0.01em;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content {
  padding: 16px;
  max-width: 1200px;
  width: 100%;
}

.footer {
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

/* Sidebar */
.sidebar__brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 14px;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand__logo--lg { width: 54px; height: 54px; border-radius: 18px; }

.brand__name { font-weight: 800; }
.brand__tag { font-size: 13px; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav__section {
  margin-top: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(229,231,235,0.7);
}
.nav__item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
}
.nav__item:hover { background: rgba(255,255,255,0.10); text-decoration: none; }
.nav__item--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.nav__note { font-size: 13px; padding: 8px 0; }

/* Cards & Grid */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(16,24,40,0.04);
  overflow: hidden;
}
.card__title {
  padding: 14px 16px;
  border-bottom: 1px solid #eef0f5;
  font-weight: 750;
}
.card__body {
  padding: 14px 16px;
}

.grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Alerts */
.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  margin-bottom: 14px;
  background: #fff;
}
.alert__close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
}
.alert-success { border-color: #b7f0cc; background: #ecfff2; }
.alert-error   { border-color: #ffc7c7; background: #fff0f0; }
.alert-info    { border-color: #c9dcff; background: #eef5ff; }
.alert-warning { border-color: #ffe6a8; background: #fff9e8; }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field__label { font-weight: 650; font-size: 14px; color: #111827; }
.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #d7dbe7;
  background: #fff;
  outline: none;
}
.input:focus { border-color: #111827; box-shadow: 0 0 0 4px rgba(17,24,39,0.08); }

/* Auth */
body.auth {
  background: radial-gradient(1200px 500px at 10% 10%, #e7efff, transparent),
              radial-gradient(1200px 500px at 90% 20%, #ffe7f2, transparent),
              #f6f7fb;
}
.auth__wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth__card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(16,24,40,0.10);
  padding: 18px;
}
.auth__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.auth__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.auth__footer { margin-top: 12px; font-size: 13px; }

/* Responsive */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 50;
  }
  .sidebar.is-open { transform: translateX(0); }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .content { padding: 14px; }
}
