/* AsisGo Demo - estilos base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f7f7f6;
  color: #111;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: #111; text-decoration: none; }

/* ===================== LOGIN ===================== */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f6;
  padding: 1rem;
}
.login-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid #e5e5e4;
  border-radius: 12px;
  padding: 2.5rem 2rem;
  text-align: center;
}
.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2rem;
}
.login-mark {
  width: 36px; height: 36px;
  background: #111;
  border-radius: 8px;
  color: #fff;
  font-weight: 500;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.login-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.5px;
}
.login-box h1 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 1.5rem;
}
.login-box .form-field {
  text-align: left;
  margin-bottom: 12px;
}
.login-box label {
  display: block;
  font-size: 13px;
  color: #6b6b6b;
  margin-bottom: 6px;
}
.login-box input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e5e5e4;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.login-box input:focus { border-color: #111; }
.login-box button {
  width: 100%;
  height: 42px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s, transform .1s;
}
.login-box button:hover:not(:disabled) { background: #333; }
.login-box button:active:not(:disabled) { transform: scale(.98); }
.login-box button:disabled { opacity: .6; cursor: not-allowed; }
.login-hint {
  margin-top: 1.5rem;
  font-size: 12px;
  color: #999;
  padding: 10px;
  background: #f7f7f6;
  border-radius: 8px;
}
.login-hint code {
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #e5e5e4;
}
.login-err {
  margin-top: 10px;
  font-size: 13px;
  color: #a32d2d;
  text-align: center;
  min-height: 18px;
}

/* ===================== APP LAYOUT ===================== */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #111;
  color: #ccc;
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sb-brand {
  padding: 0 1.25rem 1.25rem;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid #2a2a2a;
  margin-bottom: 1rem;
}
.sb-mark {
  width: 28px; height: 28px;
  background: #fff; color: #111;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500;
}
.sb-name { color: #fff; font-weight: 500; font-size: 16px; }
.sb-nav { padding: 0 .75rem; }
.sb-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  color: #aaa;
  font-size: 14px;
  margin-bottom: 2px;
  cursor: pointer;
}
.sb-nav a:hover { background: #1f1f1f; color: #fff; }
.sb-nav a.active { background: #2a2a2a; color: #fff; font-weight: 500; }
.sb-nav .sb-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #666;
  padding: 1rem 12px .25rem;
  font-weight: 500;
}
.sb-foot {
  padding: 1rem 1.25rem;
  font-size: 12px;
  color: #666;
  border-top: 1px solid #2a2a2a;
  margin-top: 1rem;
}
.sb-foot strong { color: #ccc; display: block; font-weight: 500; }
.sb-foot a.logout {
  display: inline-block;
  margin-top: 6px;
  color: #999;
  font-size: 12px;
}
.sb-foot a.logout:hover { color: #fff; }

/* ===================== CONTENT ===================== */
.content {
  padding: 2rem 2.5rem;
  max-width: 1200px;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-head h1 {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
}
.page-head .sub {
  color: #6b6b6b;
  font-size: 14px;
  margin-top: 2px;
}
.demo-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  background: #e6f1fb;
  color: #0c447c;
  border-radius: 999px;
  font-weight: 500;
  margin-left: 10px;
}

/* ===================== KPI CARDS ===================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 2rem;
}
.kpi {
  background: #fff;
  border: 1px solid #e5e5e4;
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.kpi-label {
  font-size: 12px;
  color: #6b6b6b;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 6px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.5px;
}
.kpi-extra {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.kpi.warn .kpi-value { color: #a32d2d; }
.kpi.ok .kpi-value   { color: #0f6e56; }

/* ===================== CARDS / TABLES ===================== */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .section-grid { grid-template-columns: 1fr; }
}
.card {
  background: #fff;
  border: 1px solid #e5e5e4;
  border-radius: 12px;
  padding: 1.25rem;
}
.card h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card h3 .small {
  font-size: 12px;
  color: #999;
  font-weight: 400;
}
.row-list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f7f6;
  border: 1px solid #ececeb;
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; font-size: 14px; }
.row-sub { color: #6b6b6b; font-size: 12px; margin-top: 2px; }
.row-right { text-align: right; font-size: 13px; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* Estados / Tags */
.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: .2px;
}
.tag-pendiente   { background:#fef3e0; color:#854F0B; }
.tag-programada  { background:#e6f1fb; color:#0c447c; }
.tag-en_curso    { background:#fef3e0; color:#854F0B; }
.tag-finalizada  { background:#e1f5ee; color:#0f6e56; }
.tag-facturada   { background:#eeedfe; color:#3c3489; }
.tag-cancelada   { background:#f1efe8; color:#5f5e5a; }
.tag-emitida     { background:#fef3e0; color:#854F0B; }
.tag-cobrada     { background:#e1f5ee; color:#0f6e56; }
.tag-vencido     { background:#fcebeb; color:#a32d2d; }

.empty {
  text-align: center;
  color: #999;
  padding: 2rem 1rem;
  font-size: 13px;
}

/* Placeholder for not-yet-built pages */
.coming-soon {
  background: #fff;
  border: 1px dashed #d3d1c7;
  border-radius: 12px;
  padding: 3rem;
  text-align: center;
  color: #6b6b6b;
}
.coming-soon h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #111;
}

/* Mobile */
@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    padding: 1rem;
  }
  .sb-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; }
  .sb-nav a { flex: 0 0 auto; padding: 6px 12px; font-size: 13px; }
  .sb-nav .sb-section { display: none; }
  .sb-foot { display: none; }
  .content { padding: 1.25rem 1rem; }
}
