/* -------------------------
   ShopTool - Clean UI theme
   ------------------------- */

:root {
    --bg: #0b1220;
    --panel: #0f172a;
    --panel-2: #111c33;
    --text: #e8eefc;
    --muted: rgba(232,238,252,.72);
    --border: rgba(255,255,255,.10);
    --border-2: rgba(255,255,255,.16);
    --primary: #4f7cff;
    --primary-2: #3b64ff;
    --danger: #ff5a6a;
    --warn: #ffd27a;
    --good: #7ee787;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --shadow-soft: 0 6px 18px rgba(0,0,0,.25);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: radial-gradient(900px 500px at 12% -10%, rgba(79,124,255,.25), transparent 55%), radial-gradient(900px 500px at 92% 0%, rgba(126,231,135,.12), transparent 55%), var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.4;
}

a {
    color: inherit;
}

    a:hover {
        opacity: .92;
    }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px 16px 48px;
}

/* Top bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(11,18,32,.65);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: .3px;
}

.brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), rgba(79,124,255,.35));
    box-shadow: var(--shadow-soft);
}

.nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .nav a {
        text-decoration: none;
        padding: 9px 12px;
        border-radius: 12px;
        border: 1px solid transparent;
        color: var(--muted);
    }

        .nav a:hover {
            border-color: var(--border);
            background: rgba(255,255,255,.04);
            color: var(--text);
        }

    .nav .btn {
        color: white;
    }

/* Cards & layout */
.card {
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06);
    padding: 18px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.h1 {
    font-size: 22px;
    margin: 0;
}

.h2 {
    font-size: 18px;
    margin: 0;
    color: var(--text);
}

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

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-decoration: none;
    background: rgba(255,255,255,.03);
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
}

    .btn:hover {
        border-color: var(--border-2);
        background: rgba(255,255,255,.06);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: rgba(79,124,255,.55);
    color: #fff;
}

    .btn-primary:hover {
        filter: brightness(1.03);
    }

.btn-ghost {
    background: transparent;
}

.btn-danger {
    background: rgba(255,90,106,.12);
    border-color: rgba(255,90,106,.35);
    color: #ffd1d6;
}

/* Forms */
.form {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 12px;
    max-width: 980px;
}

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

.field label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 700;
}

.input, select.input, textarea.input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(11,18,32,.55);
    color: var(--text);
    outline: none;
}

    .input:focus {
        border-color: rgba(79,124,255,.6);
        box-shadow: 0 0 0 3px rgba(79,124,255,.12);
    }

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 26px;
}

/* Alerts */
.alert {
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    margin-bottom: 12px;
}

.alert-danger {
    border-color: rgba(255,90,106,.38);
    background: rgba(255,90,106,.12);
    color: #ffd1d6;
}

/* RO list */
.ro-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ro-item {
    display: block;
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
    padding: 14px;
}

    .ro-item:hover {
        border-color: var(--border-2);
        background: rgba(255,255,255,.05);
    }

.ro-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.ro-title {
    font-weight: 900;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    margin-left: 8px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.04);
    color: var(--text);
}

.pill-side {
    background: rgba(255,210,122,.12);
    border-color: rgba(255,210,122,.35);
}

.pill-closed {
    background: rgba(126,231,135,.10);
    border-color: rgba(126,231,135,.28);
}


/* -------------------------
   Auth / Login
   ------------------------- */

.auth-body {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    /* fallback in case the fixed .auth-bg div fails to render */
    background: url('/img/auth-garage-bg.jpg') center center / cover no-repeat fixed;
}

.auth-bg {
    position: fixed;
    inset: 0;
    background:
      url("../img/auth-garage-bg.jpg");
    background-size: cover;
    background-position: center;
    /* lighter blur so the shop is still visible */
    filter: blur(3px);
    transform: scale(1.05);
    opacity: 1;
    z-index: 0;
}

.auth-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    /* keep text readable without making the image disappear */
    background: linear-gradient(180deg, rgba(0,0,0,.20), rgba(0,0,0,.50));
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

.login-card {
    width: min(560px, 100%);
    background: rgba(15, 25, 50, 0.62);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 22px;
    box-shadow:
        0 18px 55px rgba(0,0,0,.60),
        0 0 0 1px rgba(255,255,255,.06),
        0 0 40px rgba(77,163,255,.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.login-card-inner {
    padding: 26px 26px 28px;
}

.login-logo {
    display: grid;
    place-items: center;
    padding: 8px 0 6px;
}
.login-logo img {
    width: 240px;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.55));
}

.login-title {
    text-align: center;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .18em;
    margin: 8px 0 18px;
    opacity: .98;
}

.login-form { display: grid; gap: 12px; }

.login-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    padding: 12px 12px;
}
.login-input:focus-within {
    border-color: rgba(79,124,255,.55);
    box-shadow: 0 0 0 3px rgba(79,124,255,.18);
}

.login-icon { width: 22px; text-align:center; opacity: .9; }

.login-input input {
    width: 100%;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text);
    font-size: 16px;
}

.login-input input::placeholder {
    color: rgba(232,238,252,.55);
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: .9;
    user-select: none;
    margin-top: 2px;
}

.btn-block { width: 100%; }

/* Logo in topbar */
.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.10);
    padding: 4px;
}
.brand-text { display:flex; flex-direction: column; line-height:1.05; }
.brand-name { font-weight: 800; letter-spacing: .02em; }
.brand-sub { font-size: 12px; opacity: .75; margin-top: 2px; }

/* Make cards + tables a bit more “glassy” like the mock */
.card {
    background: rgba(15, 23, 42, .86);
    backdrop-filter: blur(10px);
}
.table th, .table td { padding: 10px 10px; }
.btn { border-radius: 12px; padding: 10px 14px; }

/* Hide-only helper */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* -------------------------
   Dashboard / RO Index header
   ------------------------- */
.dash-hero{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
    margin: 6px 0 14px;
    flex-wrap: wrap;
}
.dash-hero-title{
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .2px;
}
.dash-hero-sub{
    margin-top: 6px;
}
.stat-card{
    min-width: 180px;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.stat-label{
    color: rgba(232,238,252,.72);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.stat-value{
    margin-top: 8px;
    font-size: 34px;
    font-weight: 900;
}


/* =========================
   Global blurred shop background
   ========================= */
.app-body {
    background: url('/img/site-bg.jpg') center center / cover no-repeat fixed;
    position: relative;
}
.app-body::before{
    content:"";
    position: fixed;
    inset: 0;
    background: rgba(10,20,40,0.52);
    /* lighter blur so the image reads through the UI */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 0;
}
/* ensure app chrome is above the overlay */
.topbar, .page, main, .container, .content, .app-shell {
    position: relative;
    z-index: 1;
}

/* Keep print clean */
@media print{
  .app-body{ background:#fff !important; }
  .app-body::before{ display:none !important; }
}
