/* Shree Cement Dashboard: its own look, separate from the Inventory screens. */
:root {
  color-scheme: light;
  --bg: #f3f4f8; --card: #ffffff; --ink: #0f1222; --ink-2: #4b5068; --muted: #7d8299; --line: #e3e5ee;
  --brand: #c8102e; --brand-deep: #6d0716;
  --gdrd: #2563eb; --gdrd-soft: #e6eefe;
  --billing: #059669; --billing-soft: #e1f6ee;
  --inventory: #c8102e; --inventory-soft: #fde8eb;
  --shadow: 0 1px 2px rgba(15, 18, 34, .05), 0 8px 24px rgba(15, 18, 34, .06);
  --shadow-hover: 0 2px 4px rgba(15, 18, 34, .06), 0 18px 40px rgba(15, 18, 34, .12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0d14; --card: #151826; --ink: #eef0f7; --ink-2: #b6bbcf; --muted: #8a90a8; --line: #252a3c;
    --gdrd-soft: #14213f; --billing-soft: #0f2a22; --inventory-soft: #331219;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-hover: 0 12px 30px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d14; --card: #151826; --ink: #eef0f7; --ink-2: #b6bbcf; --muted: #8a90a8; --line: #252a3c;
  --gdrd-soft: #14213f; --billing-soft: #0f2a22; --inventory-soft: #331219;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mark { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff;
  background: linear-gradient(135deg, #ff4d63, var(--brand)); box-shadow: 0 8px 24px rgba(200, 16, 46, .35); }
.mark.sm { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; box-shadow: none; }

/* ---------- sign in ---------- */
.gate { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.gate-brand { position: relative; overflow: hidden; color: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px;
  background: radial-gradient(1200px 500px at -10% -10%, #e2344d 0%, transparent 60%), linear-gradient(150deg, #a10c24 0%, var(--brand-deep) 70%, #3d030b 100%); }
.gate-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); }
.gate-brand h1 { font-size: 46px; line-height: 1.05; margin: 8px 0 0; letter-spacing: -.02em; }
.gate-brand p { font-size: 17px; max-width: 420px; color: rgba(255, 255, 255, .82); margin: 0; line-height: 1.5; }
.gate-brand .mark { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.gate-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.gate-list li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 600; font-size: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.gdrd { background: #7aa7ff; } .dot.billing { background: #4ade9d; } .dot.inventory { background: #ff8a9b; }
.gate-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.gate-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.gate-form h2 { font-size: 28px; margin: 0; letter-spacing: -.01em; }
.gate-form p { margin: 0 0 6px; }
.gate-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gate-form input { font: inherit; font-size: 15px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); outline: none; }
.gate-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(200, 16, 46, .12); }
.err { color: #d32f2f; font-size: 14px; background: rgba(211, 47, 47, .08); padding: 10px 12px; border-radius: 10px; }
.btn-primary { font: inherit; font-weight: 700; font-size: 15px; border: 0; border-radius: 12px; padding: 13px 18px; cursor: pointer; color: #fff; text-decoration: none; text-align: center;
  background: linear-gradient(135deg, #e0213d, var(--brand)); box-shadow: 0 6px 18px rgba(200, 16, 46, .3); }
.btn-primary:hover { filter: brightness(1.05); }

/* ---------- after sign in ---------- */
.shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.bar { display: flex; align-items: center; gap: 20px; padding: 10px 22px; color: #fff;
  background: linear-gradient(100deg, #3d030b 0%, var(--brand-deep) 45%, #a10c24 100%); box-shadow: 0 2px 12px rgba(61, 3, 11, .25); position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand .mark { background: rgba(255, 255, 255, .16); }
.brand b { display: block; font-size: 15px; } .brand small { display: block; font-size: 12px; color: rgba(255, 255, 255, .7); }
.tabs { flex: 1; display: flex; justify-content: center; }
.tabs-inner { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 10px; color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.tabs a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.tabs a .dot { width: 8px; height: 8px; }
.user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: rgba(255, 255, 255, .18); }
.who { color: rgba(255, 255, 255, .85); white-space: nowrap; }
.btn-ghost { font: inherit; font-size: 13px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; padding: 7px 12px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.stage { flex: 1; position: relative; overflow: auto; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); }

/* home: three big cards */
.home { max-width: 1100px; margin: 0 auto; padding: 48px 24px 64px; }
.home-head h1 { font-size: 32px; margin: 0 0 6px; letter-spacing: -.02em; }
.home-head p { margin: 0 0 28px; font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card .icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--c); }
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; flex: 1; }
.card .go { font-weight: 700; font-size: 14px; color: var(--c); }
.card.gdrd { --c: var(--gdrd); --soft: var(--gdrd-soft); }
.card.billing { --c: var(--billing); --soft: var(--billing-soft); }
.card.inventory { --c: var(--inventory); --soft: var(--inventory-soft); }

/* dashboard that opens in its own tab */
.outside { display: grid; place-items: center; min-height: 100%; padding: 24px; }
.outside-card { text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 40px 48px; box-shadow: var(--shadow); max-width: 420px; }
.outside-card h2 { margin: 14px 0 6px; font-size: 24px; }
.outside-card p { margin: 0 0 22px; }
.outside-card .btn-primary { display: inline-block; padding: 13px 28px; }
.outside-icon { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto; display: grid; place-items: center; background: var(--billing-soft); color: var(--billing); }
.outside-icon svg { width: 30px; height: 30px; }

@media (max-width: 860px) {
  .gate { grid-template-columns: 1fr; }
  .gate-brand { padding: 40px 24px; }
  .gate-brand h1 { font-size: 34px; }
  .cards { grid-template-columns: 1fr; }
  .bar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
  .tabs { order: 3; width: 100%; }
  .tabs-inner { width: 100%; }
  .tabs a { flex: 1; justify-content: center; padding: 9px 6px; }
  .who, #newTab { display: none; }
  .user { margin-left: auto; }
  .home { padding: 28px 16px 48px; }
}
