:root {
  --red: #e50914;
  --ink: #171717;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f5f6f8;
  --green: #0f766e;
  --blue: #1d4ed8;
  --shadow: 0 18px 45px rgba(17, 24, 39, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #111;
  color: #fff;
  padding: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 22px;
  font-weight: 800;
}

.brand img {
  width: 48px;
  height: 32px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  padding: 3px;
}

nav {
  display: grid;
  gap: 6px;
}

nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 6px;
  color: rgba(255,255,255,.74);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a.active,
nav a:hover {
  background: var(--red);
  color: #fff;
}

.main {
  padding: 22px;
  min-width: 0;
}

.topbar {
  height: 64px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  margin-bottom: 18px;
}

.flash {
  margin: 0 0 16px;
  padding: 13px 16px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 800;
}

.flash.success {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.flash.error {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.topbar strong {
  display: block;
  font-size: 19px;
}

.today,
.muted {
  color: var(--muted);
}

.today {
  font-size: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.user-chip small {
  color: var(--muted);
}

.user-chip a {
  color: var(--red);
  font-weight: 700;
}

.hero-panel {
  min-height: 260px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  color: #fff;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(17,17,17,.92), rgba(17,17,17,.72)),
    url("../img/logo-irama.jpg") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.hero-panel h1 {
  margin: 6px 0;
  font-size: 54px;
  line-height: 1;
}

.hero-panel .muted {
  max-width: 650px;
  color: rgba(255,255,255,.76);
}

.eyebrow {
  margin: 0;
  color: #ffb3b3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
}

.button.primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.button.full {
  width: 100%;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.metric,
.panel,
.pos-total,
.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin: 9px 0 4px;
  font-size: 32px;
}

.metric p {
  margin: 0;
  font-weight: 800;
}

.two-column,
.pos-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 16px;
}

.panel,
.pos-total {
  padding: 20px;
}

.panel h2,
.pos-total h2 {
  margin-top: 0;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.timeline b {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  background: #111;
  color: #fff;
  border-radius: 50%;
  flex: 0 0 auto;
}

.accounting-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.accounting-map span,
.searchbar {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
  font-weight: 700;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.section-head p {
  margin: 0;
}

.section-head.compact {
  margin-bottom: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.pos-shell {
  align-items: start;
}

.pos-main {
  min-width: 0;
}

.cart-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.pos-total strong {
  display: block;
  font-size: 38px;
  margin: 12px 0 18px;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.pay-grid button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-weight: 800;
}

.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-x: hidden;
  background: #111;
}

.login-body {
  position: relative;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(229, 9, 20, .24), transparent 34%),
    linear-gradient(315deg, rgba(255, 255, 255, .08), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 84px),
    #0d0d0f;
}

.login-body::before,
.login-body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
}

.login-body::before {
  width: min(56vw, 720px);
  height: 72vh;
  left: -16vw;
  top: -18vh;
  transform: rotate(-18deg);
  background: linear-gradient(135deg, rgba(229, 9, 20, .82), rgba(229, 9, 20, .10));
  filter: blur(.2px);
}

.login-body::after {
  width: min(48vw, 620px);
  height: 44vh;
  right: -18vw;
  bottom: -14vh;
  transform: rotate(-16deg);
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(229, 9, 20, .18));
  border: 1px solid rgba(255, 255, 255, .12);
}

.auth-stage {
  width: min(1080px, 100%);
  min-height: 660px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .75fr);
  align-items: stretch;
  gap: 18px;
}

.auth-showcase {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  padding: 34px;
  color: #fff;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, .18), rgba(17, 17, 17, .92)),
    url("../img/logo-irama.jpg") center / cover no-repeat;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .34);
}

.auth-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .58), transparent 72%);
}

.auth-showcase > * {
  position: relative;
  z-index: 1;
}

.auth-lockup {
  position: absolute;
  top: 28px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(18px);
  font-weight: 900;
}

.auth-lockup img {
  width: 56px;
  height: 32px;
  object-fit: contain;
  background: #fff;
  border-radius: 999px;
  padding: 4px;
}

.auth-kicker {
  margin: 0 0 10px;
  color: #ffb3b3;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-showcase h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(38px, 6vw, 70px);
  line-height: .96;
  letter-spacing: 0;
}

.auth-copy {
  max-width: 620px;
  margin: 18px 0 24px;
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
  line-height: 1.5;
}

.auth-mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-mini-grid span {
  min-width: 94px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card {
  width: 100%;
  align-self: center;
  padding: 32px;
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
  backdrop-filter: blur(24px);
}

.login-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  margin-bottom: 18px;
  background: rgba(229, 9, 20, .20);
  color: #ffd6d6;
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: 12px;
  font-weight: 900;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 34px;
}

.login-card .muted {
  color: rgba(255, 255, 255, .70);
}

.login-form {
  margin-top: 22px;
  gap: 14px;
}

.login-form label {
  color: rgba(255, 255, 255, .76);
}

.login-form input {
  min-height: 50px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}

.login-form input::placeholder {
  color: rgba(255, 255, 255, .42);
}

.login-form input:focus {
  outline: 2px solid rgba(229, 9, 20, .55);
  border-color: rgba(255, 255, 255, .34);
}

.login-submit {
  min-height: 52px;
  margin-top: 8px;
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(229, 9, 20, .28);
}

.login-body {
  background:
    linear-gradient(120deg, rgba(229, 9, 20, .09), transparent 34%),
    linear-gradient(315deg, rgba(17, 17, 17, .08), transparent 38%),
    #f4f5f7;
}

.login-body::before {
  width: min(48vw, 620px);
  height: 100vh;
  left: auto;
  right: 0;
  top: 0;
  transform: none;
  background: #111;
  clip-path: polygon(26% 0, 100% 0, 100% 100%, 0 100%);
  filter: none;
}

.login-body::after {
  width: min(32vw, 440px);
  height: min(32vw, 440px);
  right: 7vw;
  bottom: 8vh;
  transform: rotate(-12deg);
  background: rgba(229, 9, 20, .92);
  border: 0;
  border-radius: 42px;
  opacity: .92;
}

.auth-stage-alt {
  width: min(1120px, 100%);
  min-height: 640px;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 22px;
}

.auth-stage-alt .auth-showcase {
  justify-content: space-between;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(17, 17, 17, .08);
  box-shadow: 0 26px 70px rgba(17, 24, 39, .12);
}

.auth-stage-alt .auth-showcase::before {
  background:
    linear-gradient(135deg, rgba(229, 9, 20, .09), transparent 42%),
    linear-gradient(0deg, rgba(17, 17, 17, .04), transparent);
}

.auth-stage-alt .auth-lockup {
  position: relative;
  top: auto;
  left: auto;
  width: fit-content;
  background: #111;
  color: #fff;
  border: 0;
  box-shadow: 0 12px 28px rgba(17, 17, 17, .14);
  backdrop-filter: none;
}

.auth-dashboard-card {
  width: min(520px, 100%);
  margin: 86px 0 28px auto;
  padding: 18px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  box-shadow: 0 24px 56px rgba(17, 17, 17, .18);
}

.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dash-row span {
  color: rgba(255, 255, 255, .58);
  font-size: 13px;
  font-weight: 800;
}

.dash-row b {
  font-size: 34px;
}

.dash-bars {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1.5fr .7fr;
  gap: 8px;
  height: 86px;
  align-items: end;
  margin-bottom: 16px;
}

.dash-bars i {
  display: block;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--red), #ff6b6b);
}

.dash-bars i:nth-child(1) { height: 52%; }
.dash-bars i:nth-child(2) { height: 76%; }
.dash-bars i:nth-child(3) { height: 100%; }
.dash-bars i:nth-child(4) { height: 64%; }

.dash-table {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
}

.dash-table span,
.dash-table strong {
  font-size: 13px;
}

.dash-table strong {
  color: #ffd1d1;
}

.auth-stage-alt .auth-kicker {
  color: var(--red);
}

.auth-stage-alt .auth-showcase h1 {
  max-width: 620px;
  color: #111;
  font-size: clamp(42px, 5.6vw, 76px);
}

.auth-stage-alt .auth-copy {
  max-width: 600px;
  color: #4b5563;
}

.auth-stage-alt .auth-mini-grid span {
  min-width: 118px;
  color: #111;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(17, 24, 39, .08);
  backdrop-filter: none;
}

.auth-stage-alt .login-card {
  color: #fff;
  background: #111;
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 28px 70px rgba(17, 17, 17, .30);
  backdrop-filter: none;
}

.auth-stage-alt .login-chip {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.auth-stage-alt .login-card .muted {
  color: rgba(255, 255, 255, .62);
}

.auth-stage-alt .login-form input {
  background: #1f1f1f;
  border-color: #333;
}

.auth-card.wide {
  width: min(760px, 100%);
}

.auth-logo {
  width: 190px;
  max-width: 70%;
  display: block;
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 0 0 6px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.input-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.table-panel {
  margin-top: 16px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: end;
  min-height: 42px;
}

.check-field input {
  width: auto;
  min-height: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.alert {
  padding: 12px;
  border-radius: 6px;
  margin: 12px 0;
  font-weight: 700;
}

.alert.error {
  background: #fff1f2;
  color: #be123c;
}

.alert.success {
  background: #ecfdf5;
  color: #047857;
}

.setup-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.setup-list span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
}

.pulse {
  transform: scale(.98);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 330px minmax(0, 1fr);
  }

  .two-column,
  .pos-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-stage {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-stage-alt {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    min-height: 360px;
    padding: 26px;
  }

  .auth-dashboard-card {
    margin: 72px 0 24px;
  }

  .login-body::before {
    width: 100vw;
    height: 42vh;
    clip-path: polygon(0 0, 100% 0, 100% 72%, 0 100%);
  }

  .login-body::after {
    display: none;
  }

  .auth-lockup {
    top: 20px;
    left: 20px;
  }

  .login-card {
    padding: 26px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  nav {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  nav a {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .main {
    padding: 14px;
  }

  .topbar,
  .section-head,
  .user-chip {
    align-items: flex-start;
    flex-direction: column;
  }

  nav,
  .metric-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 24px;
  }

  .hero-panel h1 {
    font-size: 40px;
  }

  .login-body {
    padding: 16px;
  }

  .auth-showcase h1 {
    font-size: 38px;
  }

  .auth-copy {
    font-size: 15px;
  }
}
