:root {
    --gt-ink: #0e1c29;
    --gt-ink-2: #1b2b3a;
    --gt-teal: #1a8bb0;
    --gt-teal-2: #22b4d9;
    --gt-teal-dark: #0f6e8c;
    --gt-bg: #eef3f9;
    --gt-surface: #ffffff;
    --gt-border: rgba(15, 27, 38, .08);
    --gt-muted: #6b7c8a;
    --gt-radius: 20px;
    --gt-shadow: 0 1px 2px rgba(15, 27, 38, .04), 0 12px 32px rgba(15, 27, 38, .06);
    --gt-sidebar-w: 276px;

    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-color: var(--gt-ink);
    --bs-border-radius: 12px;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(900px 520px at 100% -10%, rgba(34, 180, 217, .18), transparent 60%),
        radial-gradient(800px 500px at -10% 110%, rgba(26, 139, 176, .14), transparent 60%),
        var(--gt-bg);
    background-attachment: fixed;
    font-feature-settings: 'cv11', 'ss01';
    -webkit-font-smoothing: antialiased;
}

/* ---------- Buttons & forms ---------- */
.btn { border-radius: 12px; font-weight: 500; padding: .55rem 1.1rem; transition: all .18s ease; }
.btn-gt { background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); border: 0; color: #fff; box-shadow: 0 6px 18px rgba(26, 139, 176, .35); }
.btn-gt:hover, .btn-gt:focus { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(26, 139, 176, .45); }
.btn-outline-secondary, .btn-outline-danger { border-color: var(--gt-border); background: #fff; }
.btn-outline-secondary { color: var(--gt-muted); }
.btn-outline-secondary:hover { background: #eef6fa; color: var(--gt-teal-dark); border-color: rgba(26, 139, 176, .3); }
.btn-outline-danger { color: #d64550; }
.btn-outline-danger:hover { background: #fdecee; color: #c0303c; border-color: rgba(214, 69, 80, .3); }
.btn-light { background: #fff; border: 1px solid var(--gt-border); }
.btn-light:hover { background: #f3f8fb; border-color: rgba(26, 139, 176, .25); }
.form-label { font-size: .75rem; font-weight: 600; color: var(--gt-muted); text-transform: uppercase; letter-spacing: .06em; }
.form-control, .form-select, .input-group-text { border-color: var(--gt-border); padding: .65rem .9rem; background-color: #f8fbfd; }
.input-group-text { color: var(--gt-muted); }
.form-control:focus, .form-select:focus { border-color: var(--gt-teal-2); box-shadow: 0 0 0 .25rem rgba(34, 180, 217, .16); background: #fff; }
.form-check-input:checked { background-color: var(--gt-teal); border-color: var(--gt-teal); }
.alert { border: 0; border-radius: 14px; }

/* ---------- Login ---------- */
.gt-auth {
    background:
        radial-gradient(700px 460px at 12% 8%, rgba(34, 180, 217, .35), transparent 62%),
        radial-gradient(640px 480px at 92% 92%, rgba(26, 139, 176, .30), transparent 62%),
        radial-gradient(500px 360px at 85% 8%, rgba(120, 200, 235, .30), transparent 62%),
        #eef4fa;
}
.gt-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.gt-login-card {
    width: 100%; max-width: 440px; padding: 40px 38px 34px;
    background: rgba(255, 255, 255, .72); backdrop-filter: blur(22px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, .85); border-radius: 28px;
    box-shadow: 0 40px 90px rgba(15, 60, 90, .18), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.gt-login-logo { display: block; width: 78%; margin: 0 auto 30px; filter: drop-shadow(0 10px 18px rgba(15, 60, 90, .18)); }

/* ---------- Shell ---------- */
.gt-shell { display: flex; min-height: 100vh; }

.gt-sidebar {
    width: var(--gt-sidebar-w); flex-shrink: 0;
    position: sticky; top: 16px; height: calc(100vh - 32px); margin: 16px 0 16px 16px;
    display: flex; flex-direction: column; padding: 18px 14px 14px;
    background: rgba(255, 255, 255, .72); backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, .9); border-radius: 26px;
    box-shadow: 0 24px 60px rgba(15, 60, 90, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.gt-brand { display: block; padding: 2px 22px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--gt-border); }
.gt-brand img { width: 100%; display: block; filter: drop-shadow(0 8px 14px rgba(15, 60, 90, .16)); transition: transform .25s ease; }
.gt-brand:hover img { transform: scale(1.03); }

.gt-nav { overflow-y: auto; flex: 1; padding: 4px 2px; scrollbar-width: thin; scrollbar-color: rgba(15, 27, 38, .15) transparent; }
.gt-nav-link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 14px; margin-bottom: 2px;
    border-radius: 14px; color: #53657a; text-decoration: none; font-weight: 500; font-size: .93rem;
    transition: all .18s ease;
}
.gt-nav-link i { font-size: 1.12rem; color: #8a9bab; transition: all .18s ease; }
.gt-nav-link:hover { background: rgba(26, 139, 176, .09); color: var(--gt-teal-dark); }
.gt-nav-link:hover i { color: var(--gt-teal); transform: scale(1.1); }
.gt-nav-link.active { background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); color: #fff; box-shadow: 0 10px 22px rgba(26, 139, 176, .38); }
.gt-nav-link.active i { color: #fff; }
.gt-nav-divider { margin: 6px 12px 8px; border: 0; border-top: 1px solid var(--gt-border); opacity: 1; }

.gt-date {
    display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
    position: relative; overflow: hidden; margin-top: 8px; padding: 12px 18px; border-radius: 20px; color: #fff;
    background: linear-gradient(140deg, var(--gt-ink-2), var(--gt-teal-dark) 130%);
    box-shadow: 0 14px 30px rgba(15, 60, 90, .28);
}
.gt-date::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 180, 217, .55), transparent 70%); }
.gt-date-day { font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.gt-date-weekday { font-weight: 600; font-size: .95rem; }
.gt-date-month { color: rgba(255, 255, 255, .65); font-size: .8rem; }
.gt-date-time { grid-column: 1 / -1; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .14); color: #8fe0f5; font-size: .85rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.gt-date-time::before { content: '\F293'; font-family: 'bootstrap-icons'; margin-right: 6px; }

.gt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gt-topbar {
    position: sticky; top: 16px; z-index: 20; display: flex; align-items: center; gap: 14px;
    margin: 16px 36px 4px; padding: 9px 14px 9px 22px; min-height: 58px;
    background: rgba(255, 255, 255, .82); backdrop-filter: blur(16px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, .95); border-radius: 18px; box-shadow: var(--gt-shadow);
}
.gt-crumbs { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--gt-muted); white-space: nowrap; }
.gt-crumbs a { color: var(--gt-muted); text-decoration: none; transition: color .15s ease; }
.gt-crumbs a:hover { color: var(--gt-teal-dark); }
.gt-crumbs i { font-size: .65rem; opacity: .7; }
.gt-crumbs span { color: var(--gt-ink); font-weight: 600; }
.gt-top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.gt-icon-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--gt-border); border-radius: 12px; background: var(--gt-surface); color: #4a5f72; font-size: 1.05rem; transition: all .16s ease; }
.gt-icon-btn:hover, .gt-icon-btn.show { color: var(--gt-teal-dark); border-color: rgba(26, 139, 176, .35); background: #eef7fb; }
.gt-bell-dot { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; font-size: .68rem; font-weight: 700; line-height: 19px; text-align: center; color: #fff; background: linear-gradient(135deg, #f59e0b, #dc2626); border: 2px solid #fff; animation: gt-pulse 2s ease-in-out infinite; }

.gt-user { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--gt-border); border-radius: 999px; background: var(--gt-surface); color: var(--gt-ink); font-weight: 600; font-size: .92rem; transition: all .16s ease; }
.gt-user:hover, .gt-user.show { border-color: rgba(26, 139, 176, .35); background: #eef7fb; }
.gt-user > i { font-size: .7rem; color: var(--gt-muted); }
.gt-user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: .85rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 4px 10px rgba(26, 139, 176, .35); }

/* Global search */
.gt-gsearch { position: relative; width: 340px; max-width: 34vw; }
.gt-gsearch > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gt-muted); pointer-events: none; }
.gt-gsearch input { width: 100%; height: 40px; padding: 0 44px 0 38px; font-size: .9rem; color: var(--gt-ink); background: var(--gt-surface); border: 1px solid var(--gt-border); border-radius: 12px; outline: none; transition: all .16s ease; }
.gt-gsearch input::placeholder { color: #8a9bab; }
.gt-gsearch input:focus { border-color: var(--gt-teal-2); box-shadow: 0 0 0 .22rem rgba(34, 180, 217, .16); }
.gt-gsearch input::-webkit-search-cancel-button { display: none; }
.gt-gsearch .gt-kbd { right: 10px; }
.gt-gsearch input:focus ~ .gt-kbd, .gt-gsearch input:not(:placeholder-shown) ~ .gt-kbd { display: none; }
.gt-gsearch-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 460px; max-width: 92vw; max-height: 70vh; overflow: auto; padding: 8px; background: var(--gt-surface); border: 1px solid var(--gt-border); border-radius: 18px; box-shadow: 0 26px 60px rgba(15, 27, 38, .22); z-index: 30; }
.gt-gsearch-panel[hidden] { display: none; }
.gt-gs-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gt-muted); }
.gt-gs-head i { color: var(--gt-teal); }
.gt-gs-head a { margin-left: auto; font-size: .72rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--gt-teal-dark); text-decoration: none; cursor: pointer; }
.gt-gs-item { display: block; padding: 8px 10px; border-radius: 10px; color: var(--gt-ink); text-decoration: none; }
.gt-gs-item strong { display: block; font-size: .88rem; font-weight: 600; }
.gt-gs-item small { display: block; color: var(--gt-muted); font-size: .78rem; }
.gt-gs-item:hover, .gt-gs-item.is-active { background: rgba(34, 180, 217, .12); color: var(--gt-ink); }
.gt-gs-msg { display: flex; align-items: center; gap: 10px; padding: 18px 12px; color: var(--gt-muted); font-size: .9rem; }

/* Notifications */
.gt-notif { width: 360px; max-width: 92vw; padding: 8px; }
.gt-notif-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 10px; font-weight: 700; }
.gt-notif-head span { padding: 1px 9px; border-radius: 999px; font-size: .75rem; color: #c2410c; background: #fff3e0; }
.gt-notif-empty { display: grid; place-items: center; gap: 6px; padding: 26px 12px; color: var(--gt-muted); font-size: .9rem; }
.gt-notif-empty i { font-size: 1.8rem; color: #34d399; }
.gt-notif-item { display: flex; gap: 12px; padding: 10px; border-radius: 12px; color: var(--gt-ink); text-decoration: none; }
.gt-notif-item:hover { background: rgba(245, 158, 11, .1); color: var(--gt-ink); }
.gt-notif-item strong { display: block; font-size: .86rem; }
.gt-notif-item small { display: block; color: var(--gt-muted); font-size: .76rem; line-height: 1.3; }
.gt-notif-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; background: linear-gradient(135deg, #fbbf24, #ea580c); }
.gt-notif-ic.is-zero { background: linear-gradient(135deg, #f1707b, #c0303c); }
.gt-notif-more { display: block; margin-top: 4px; padding: 8px 10px; border-radius: 10px; text-align: center; font-size: .85rem; font-weight: 600; color: var(--gt-teal-dark); text-decoration: none; }
.gt-notif-more:hover { background: #eef7fb; }

@media (max-width: 991.98px) {
    .gt-topbar { margin: 10px 16px 4px; padding-left: 12px; top: 10px; }
    .gt-gsearch { width: 220px; max-width: 40vw; }
    .gt-user-name { display: none; }
}
@media (max-width: 575.98px) { .gt-gsearch { display: none; } .gt-crumbs { font-size: .85rem; } }
.dropdown-menu { border: 1px solid var(--gt-border); border-radius: 16px; padding: 8px; box-shadow: 0 20px 50px rgba(15, 27, 38, .16); }
.dropdown-item { border-radius: 10px; padding: .55rem .8rem; }
.dropdown-item:hover { background: #eef6fa; color: var(--gt-teal-dark); }
.gt-content { padding: 18px 36px 32px; }

/* ---------- Cards & tables ---------- */
.gt-card { background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .95); border-radius: var(--gt-radius); padding: 28px; box-shadow: var(--gt-shadow); max-width: 900px; }
.gt-card.p-0 { overflow: hidden; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .95rem 1.2rem; border-bottom-color: var(--gt-border); }
.table thead th { background: rgba(238, 244, 249, .8) !important; color: var(--gt-muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--gt-border); }
.table-hover > tbody > tr:hover > * { background: rgba(34, 180, 217, .06); }
.table tbody tr:last-child > * { border-bottom: 0; }
.badge { font-weight: 600; padding: .4em .75em; border-radius: 999px; }
.badge.text-bg-success { background: #e1f7ea !important; color: #12794a !important; }
.badge.text-bg-secondary { background: #eceff3 !important; color: #5d6b78 !important; }
code { color: var(--gt-teal-dark); background: #e7f5fa; padding: .15rem .5rem; border-radius: 8px; }

.gt-stat { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; background: rgba(255, 255, 255, .9); border: 1px solid rgba(255, 255, 255, .95); border-radius: var(--gt-radius); padding: 24px; color: var(--gt-ink); box-shadow: var(--gt-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.gt-stat::after { content: ''; position: absolute; right: -40px; bottom: -50px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 180, 217, .16), transparent 70%); }
.gt-stat:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(15, 60, 90, .14); color: var(--gt-ink); }
.gt-stat > i { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.55rem; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 10px 22px rgba(26, 139, 176, .35); }
.gt-stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.gt-stat-label { color: var(--gt-muted); font-size: .88rem; margin-top: 5px; }

.gt-empty { text-align: center; background: rgba(255, 255, 255, .7); border: 1.5px dashed rgba(26, 139, 176, .28); border-radius: var(--gt-radius); padding: 80px 24px; }
.gt-empty > i { display: inline-grid; place-items: center; width: 78px; height: 78px; border-radius: 24px; font-size: 2.1rem; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 14px 30px rgba(26, 139, 176, .35); margin-bottom: 16px; }
.gt-empty h2 { font-weight: 700; letter-spacing: -.02em; }
.gt-preview { background: repeating-conic-gradient(#eef2f6 0% 25%, #fff 0% 50%) 0 / 18px 18px; border: 1px solid var(--gt-border); border-radius: 14px; padding: 14px; text-align: center; }
.gt-preview img { max-width: 100%; max-height: 140px; }
.gt-preview.favicon img { max-height: 80px; }

/* ---------- Toast (top of screen) ---------- */
.gt-toast { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; min-width: 330px; padding: 14px 16px; background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .9); border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 60, 90, .26); }
.gt-toast-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 13px; font-size: 1.25rem; color: #fff; background: linear-gradient(135deg, #34d399, #12794a); box-shadow: 0 8px 18px rgba(18, 121, 74, .35); }
.gt-toast-body { display: flex; flex-direction: column; flex: 1; line-height: 1.3; }
.gt-toast-body span { color: var(--gt-muted); font-size: .88rem; }
.gt-toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: linear-gradient(90deg, #34d399, var(--gt-teal-2)); transform-origin: left; animation: gt-toast-bar 4s linear forwards; }
@keyframes gt-toast-bar { to { transform: scaleX(0); } }
.toast.showing, .toast.show { animation: gt-toast-in .4s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes gt-toast-in { from { opacity: 0; transform: translateY(-24px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Modals ---------- */
.modal-backdrop.show { opacity: .5; background: #0e1c29; }
.modal-content { border: 0; }
.gt-form-modal .modal-content, .gt-modal .modal-content { border-radius: 26px; box-shadow: 0 40px 100px rgba(15, 27, 38, .38); }
.gt-form-modal .modal-header { border: 0; padding: 26px 30px 6px; }
.gt-form-modal .modal-title { font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.gt-form-modal .modal-body { padding: 14px 30px 8px; }
.gt-form-modal .modal-footer { border: 0; padding: 14px 30px 28px; }
.gt-modal-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; font-size: 2rem; color: #b45309; background: #fff3e0; box-shadow: 0 0 0 9px #fff9ef; }
.gt-combo { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; text-align: left; margin: 0 0 20px; padding: 16px 20px; background: #f4f8fb; border: 1px solid var(--gt-border); border-radius: 16px; }
.gt-combo dt { color: var(--gt-muted); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; align-self: center; }
.gt-combo dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Settings: single-screen layout (fills the available width and height) ---------- */
.gt-card.gt-settings { max-width: none; width: 100%; padding: 28px; display: flex; flex-direction: column; min-height: calc(100vh - 230px); }
.gt-settings-grid { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.gt-set-section { display: flex; flex-direction: column; padding: 26px; background: rgba(248, 251, 253, .9); border: 1px solid var(--gt-border); border-radius: 20px; }
.gt-set-title { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.gt-set-title i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.1rem; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 8px 18px rgba(26, 139, 176, .32); }
.gt-settings .form-label { margin-bottom: .4rem; font-size: .75rem; }
.gt-settings .form-control, .gt-settings .input-group-text { padding: .7rem .95rem; font-size: 1rem; }
.gt-settings .row { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.gt-settings .gt-preview { display: grid; place-items: center; height: 150px; padding: 14px; }
.gt-settings .gt-preview img { max-height: 110px; }
.gt-settings .gt-preview.favicon img { max-height: 70px; }
.gt-settings .btn-sm { padding: .55rem .8rem; font-size: .9rem; }
.gt-reset { font-size: .8rem; text-decoration: none; }
.gt-settings-footer { display: flex; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--gt-border); }
.gt-settings-footer .btn { padding: .75rem 1.7rem; font-size: 1rem; }
.gt-size-box { padding: 18px; margin-bottom: 16px; background: #fff; border: 1px solid var(--gt-border); border-radius: 16px; }
.gt-size-box:last-child { margin-bottom: 0; }
.gt-size-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 600; font-size: 1rem; }
.gt-size-title i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; color: var(--gt-teal-dark); background: #e5f4fa; }
.gt-size-inputs { display: flex; align-items: center; gap: 10px; }
.gt-size-inputs .form-control { flex: 1; min-width: 0; }
.gt-size-area { color: var(--gt-muted); font-size: .85rem; font-weight: 500; }

/* ---------- Glass sheets ---------- */
.gt-sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.gt-sheet-card { display: flex; flex-direction: column; overflow: hidden; background: rgba(255, 255, 255, .9); border: 1px solid rgba(255, 255, 255, .95); border-radius: 22px; box-shadow: var(--gt-shadow); transition: transform .2s ease, box-shadow .2s ease; }
.gt-sheet-card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(15, 60, 90, .14); }
.gt-sheet-card.is-inactive { opacity: .62; }
.gt-sheet-draw { position: relative; padding: 14px 14px 8px; background:
    linear-gradient(rgba(26, 139, 176, .07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(26, 139, 176, .07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(160deg, #f4fafd, #e6f2f9); border-bottom: 1px solid var(--gt-border); }
.gt-sheet-svg { display: block; width: 100%; height: auto; max-height: 230px; }
.gt-sheet-legend { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 6px; padding: 6px 2px 4px; }
.gt-sheet-swatch { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 8px; background: rgba(255, 255, 255, .85); border: 1px solid var(--gt-border); border-radius: 12px; }
.gt-sheet-swatch i { flex: none; width: 22px; height: 22px; border-radius: 7px; display: block; }
.gt-sheet-swatch span { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.gt-sheet-swatch small { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--gt-muted); }
.gt-sheet-swatch b { font-size: .82rem; font-weight: 700; color: var(--gt-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Quantity badge (top-left of each card) */
.gt-sheet-card { position: relative; }
.gt-sheet-qty { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; align-items: baseline; gap: 6px; padding: 7px 14px 8px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 10px 22px rgba(26, 139, 176, .42); }
.gt-qty-num { font-size: 1.7rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.gt-qty-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.gt-sheet-qty.is-zero { background: linear-gradient(135deg, #f1707b, #c0303c); box-shadow: 0 10px 22px rgba(192, 48, 60, .4); }
.gt-sheet-qty.is-zero .gt-qty-num { font-size: 1.1rem; }
.gt-sheet-empty { display: grid; place-items: center; gap: 6px; min-height: 200px; color: var(--gt-muted); font-size: .9rem; }
.gt-sheet-empty i { font-size: 2rem; color: var(--gt-teal); opacity: .6; }
.gt-sheet-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 18px; }
.gt-sheet-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.gt-sheet-title span { color: var(--gt-teal-dark); font-weight: 600; font-size: .95rem; margin-left: 4px; }
.gt-sheet-sub { color: var(--gt-muted); font-size: .88rem; }
.gt-sheet-desc { margin: 10px 0 12px; padding: 8px 12px; border-radius: 10px; background: #f3f8fb; color: #3d5466; font-size: .8rem; min-height: 2.4em; }
.gt-sheet-meta { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: #3d5466; }
.gt-sheet-meta i { color: var(--gt-teal); margin-right: 8px; }
.gt-sheet-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; padding-top: 16px; }
.gt-sheet-price { font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.gt-sheet-persq { color: var(--gt-muted); font-size: .8rem; margin-top: 4px; }
.gt-sheet-preview { height: 100%; min-height: 300px; border-radius: 20px; overflow: hidden; border: 1px solid var(--gt-border); }
.gt-sheet-draw-lg { height: 100%; padding: 22px 18px 12px; border: 0; display: flex; flex-direction: column; justify-content: center; }
.gt-sheet-draw-lg .gt-sheet-svg { max-height: 300px; }
.gt-sheet-legend.is-single { grid-template-columns: minmax(0, 220px); justify-content: center; }

/* Glass catalog: small glass thumbnail in the table */
.gt-glass-thumb { width: 104px; padding: 4px; border: 1px solid var(--gt-border); border-radius: 12px; box-shadow: 0 4px 12px rgba(15, 60, 90, .08); }
.gt-glass-thumb .gt-sheet-svg { max-height: none; }

/* ---------- Search toolbar ---------- */
.gt-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.gt-search { position: relative; flex: 1; max-width: 560px; }
.gt-search > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--gt-teal); font-size: 1.05rem; pointer-events: none; }
.gt-search input { width: 100%; padding: .8rem 3.2rem .8rem 3rem; font-size: .98rem; color: var(--gt-ink); background: rgba(255, 255, 255, .92); border: 1px solid rgba(255, 255, 255, .95); border-radius: 999px; box-shadow: var(--gt-shadow); outline: none; transition: box-shadow .18s ease, border-color .18s ease; }
.gt-search input::placeholder { color: #8a9bab; }
.gt-search input:focus { border-color: var(--gt-teal-2); box-shadow: 0 0 0 .25rem rgba(34, 180, 217, .18), var(--gt-shadow); }
.gt-search input::-webkit-search-cancel-button { display: none; }
.gt-kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); padding: 1px 8px; border-radius: 7px; font-family: inherit; font-size: .78rem; font-weight: 600; color: var(--gt-muted); background: #eef3f8; border: 1px solid var(--gt-border); pointer-events: none; }
.gt-search input:focus ~ .gt-kbd, .gt-search input:not(:placeholder-shown) ~ .gt-kbd { display: none; }
.gt-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; color: var(--gt-muted); background: #eef3f8; transition: all .15s ease; }
.gt-search-clear:hover { color: #fff; background: var(--gt-teal); }
.gt-count { margin-left: auto; white-space: nowrap; font-size: .9rem; }
.gt-no-results { margin-top: 8px; }
@media (max-width: 767.98px) { .gt-toolbar { flex-wrap: wrap; } .gt-search { max-width: none; flex: 1 1 100%; order: 2; } }
/* ---------- Data table ---------- */
.gt-dt-lengthbox { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--gt-muted); font-size: .88rem; white-space: nowrap; }
.gt-dt-lengthbox .form-select { width: auto; padding: .4rem 2rem .4rem .75rem; border-radius: 999px; background-color: rgba(255, 255, 255, .92); box-shadow: var(--gt-shadow); }
.gt-dt-table th.gt-sortable { cursor: pointer; user-select: none; white-space: nowrap; transition: color .15s ease; }
.gt-dt-table th.gt-sortable:hover { color: var(--gt-teal-dark); }
.gt-sort { display: inline-flex; flex-direction: column; margin-left: 6px; vertical-align: middle; line-height: .6; font-size: .55rem; opacity: .35; }
.gt-sort i { display: block; height: .55rem; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--gt-teal-dark); }
th[aria-sort="ascending"] .gt-sort, th[aria-sort="descending"] .gt-sort { opacity: 1; }
th[aria-sort="ascending"] .gt-sort i:last-child, th[aria-sort="descending"] .gt-sort i:first-child { opacity: .25; }
.gt-dt-table th.gt-sortable:focus-visible { outline: 2px solid var(--gt-teal-2); outline-offset: -2px; border-radius: 8px; }
.gt-dt-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 0 4px; font-size: .88rem; }
.gt-dt-pager { display: flex; align-items: center; gap: 6px; }
.gt-page { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--gt-border); border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--gt-ink); font-weight: 500; transition: all .15s ease; }
.gt-page:hover:not(:disabled):not(.active) { background: #eef6fa; color: var(--gt-teal-dark); border-color: rgba(26, 139, 176, .3); }
.gt-page.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 6px 14px rgba(26, 139, 176, .35); }
.gt-page:disabled { opacity: .4; cursor: default; }
.gt-page-dots { padding: 0 4px; color: var(--gt-muted); }

/* ---------- Clients ---------- */
.gt-client { display: flex; align-items: center; gap: 12px; }
.gt-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; font-size: .85rem; font-weight: 700; color: var(--gt-teal-dark); background: #e5f4fa; }
.gt-avatar.is-company { color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 6px 14px rgba(26, 139, 176, .3); }
.gt-client-name { display: block; font-weight: 600; line-height: 1.2; }
.gt-client-company { display: block; color: var(--gt-muted); font-size: .8rem; }
.gt-link { color: var(--gt-teal-dark); text-decoration: none; }
.gt-link:hover { text-decoration: underline; }
.gt-form-section { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.gt-form-section i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); }

/* ---------- Client price list ---------- */
.gt-btn-prices { color: var(--gt-teal-dark); }
.gt-price-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.gt-price-tools .gt-search { flex: 1; min-width: 240px; max-width: 420px; }
.gt-price-tools .gt-search input { padding-top: .6rem; padding-bottom: .6rem; box-shadow: none; border-color: var(--gt-border); }
.gt-price-count { margin-left: auto; font-size: .85rem; }
.gt-price-wrap { border: 1px solid var(--gt-border); border-radius: 16px; overflow: clip; }
.gt-price-table { margin: 0; }
.gt-price-table thead th { position: sticky; top: 0; z-index: 1; }
.gt-price-glass { font-weight: 600; line-height: 1.2; }
.gt-price-tint { color: var(--gt-muted); font-size: .8rem; }
.gt-price-base { color: var(--gt-muted); font-variant-numeric: tabular-nums; }
.gt-price-input { font-weight: 600; font-variant-numeric: tabular-nums; }
.gt-price-table tr.is-changed td { background: rgba(34, 180, 217, .07); }
.gt-price-table tr.is-changed .gt-price-input { border-color: var(--gt-teal-2); background: #fff; }
.gt-diff { display: inline-block; min-width: 54px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; text-align: center; color: var(--gt-muted); background: #eef3f8; }
.gt-diff.up { color: #12794a; background: #e1f7ea; }
.gt-diff.down { color: #b45309; background: #fff3e0; }
.gt-price-empty { padding: 28px; text-align: center; color: var(--gt-muted); }

/* ---------- Quotes ---------- */
.gt-quote-top { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.5fr) minmax(0, 1.1fr); gap: 22px; align-items: stretch; margin-bottom: 22px; }
.gt-quote-top .gt-quote-side { position: static; min-width: 0; }
.gt-quote-top .gt-qsummary { height: 100%; display: flex; flex-direction: column; }
.gt-quote-top .gt-qsummary .gt-sum-total { margin-top: auto; }
.gt-quote-top .gt-qsummary .gt-sum-exempt { margin-bottom: 4px; }
@media (max-width: 1599.98px) {
    .gt-quote-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .gt-quote-top > section:first-child { grid-column: 1 / -1; }
}
.gt-quote-top .gt-qcard { height: 100%; }
.gt-qnotes textarea { resize: vertical; }
.gt-seg { display: inline-flex; padding: 3px; gap: 2px; background: #eef3f8; border: 1px solid var(--gt-border); border-radius: 12px; }
.gt-seg label { margin: 0; cursor: pointer; }
.gt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.gt-seg span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 9px; font-size: .86rem; font-weight: 600; color: var(--gt-muted); transition: all .16s ease; }
.gt-seg input:checked + span { color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 6px 14px rgba(26, 139, 176, .3); }
.gt-seg input:focus-visible + span { outline: 2px solid var(--gt-teal-2); outline-offset: 2px; }
.gt-walkin { padding: 14px; background: #f6fafd; border: 1px dashed rgba(26, 139, 176, .35); border-radius: 14px; }
.gt-walkin[hidden], #paneClient[hidden], #paneWalkin[hidden] { display: none; }
@media (max-width: 991.98px) { .gt-quote-top { grid-template-columns: 1fr; } }
[data-bs-theme="dark"] .gt-seg { background: #0f1a25; }
[data-bs-theme="dark"] .gt-walkin { background: rgba(10, 20, 29, .55); }
.gt-qtable { min-width: 980px; }
.gt-qtable input[data-f="width"], .gt-qtable input[data-f="height"], .gt-qtable input[data-f="quantity"] { text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.gt-qtable input[data-f="width"]::-webkit-outer-spin-button, .gt-qtable input[data-f="width"]::-webkit-inner-spin-button,
.gt-qtable input[data-f="height"]::-webkit-outer-spin-button, .gt-qtable input[data-f="height"]::-webkit-inner-spin-button,
.gt-qtable input[data-f="quantity"]::-webkit-outer-spin-button, .gt-qtable input[data-f="quantity"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gt-qrule { background: #f3f8fb; }
.gt-quote-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.gt-quote-main { display: grid; gap: 22px; min-width: 0; }
.gt-quote-side { position: sticky; top: 96px; }
.gt-qcard { max-width: none; padding: 24px; }
.gt-qtitle { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.gt-qtitle i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-size: .95rem; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 6px 14px rgba(26, 139, 176, .3); }
.gt-po-hint { margin-top: 4px; font-size: .78rem; color: var(--gt-muted); min-height: 1.1em; }
.gt-po-hint.ok { color: #12794a; }
.gt-po-hint.ok::before { content: '\F26A'; font-family: 'bootstrap-icons'; margin-right: 5px; }
.gt-po-hint.bad { color: #c0303c; font-weight: 600; }
.gt-po-hint.bad::before { content: '\F333'; font-family: 'bootstrap-icons'; margin-right: 5px; }
.gt-po-locked[readonly] { background: #f1f3f6; color: var(--gt-ink, #1f2733); font-weight: 600; cursor: default; }
.gt-qlimits { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: #eef7fb; color: #3d5466; font-size: .85rem; }
.gt-qlimits i { color: var(--gt-teal); }
.gt-qwarn { display: flex; gap: 10px; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: #fff1ec; border: 1px solid rgba(220, 38, 38, .3); color: #9f1c1c; font-size: .85rem; }
.gt-qwarn[hidden] { display: none; }
.gt-qwarn i { margin-top: 2px; color: #dc2626; }
.gt-qtable thead th { padding: .6rem .5rem; }
.gt-qtable td { padding: .55rem .4rem; vertical-align: top; }
.gt-qtable td:first-child, .gt-qtable th:first-child { padding-left: .75rem; }
.gt-qrow-desc { margin-top: 3px; color: var(--gt-muted); font-size: .74rem; }
.gt-qarea, .gt-qtotal { padding-top: .9rem !important; font-variant-numeric: tabular-nums; }
.gt-qtotal { font-weight: 700; }
.gt-qweight { padding-top: .9rem !important; font-variant-numeric: tabular-nums; color: var(--gt-muted); white-space: nowrap; }
.gt-qarea { white-space: nowrap; }
.gt-qrow.is-bad td { background: rgba(220, 38, 38, .06); }
.gt-qrow.is-bad input[data-f="width"], .gt-qrow.is-bad input[data-f="height"] { border-color: #dc2626; box-shadow: 0 0 0 .2rem rgba(220, 38, 38, .12); }
.gt-qremove { margin-top: 2px; }
.gt-qempty { display: grid; place-items: center; gap: 6px; padding: 28px; color: var(--gt-muted); border: 1.5px dashed rgba(26, 139, 176, .28); border-radius: 14px; }
.gt-qempty[hidden] { display: none; }
.gt-qempty i { font-size: 1.8rem; color: var(--gt-teal); opacity: .7; }
.gt-qsummary { max-width: none; padding: 22px; }
.gt-sum-client { margin: -6px 0 14px; padding: 8px 12px; border-radius: 10px; background: #f3f8fb; color: #3d5466; font-size: .85rem; }
.gt-sum { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; margin: 0; }
.gt-sum dt { color: var(--gt-muted); font-weight: 500; font-size: .88rem; }
.gt-sum dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.gt-sum-input { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.gt-sum-input .input-group { width: 112px; flex: none; }
.gt-sum-input .form-control { min-width: 0; padding-left: .5rem; padding-right: .4rem; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.gt-sum-input .form-control::-webkit-outer-spin-button, .gt-sum-input .form-control::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gt-sum-input .form-control:disabled { opacity: .6; }
/* Money fields (delivery, extra charge) get the full width so amounts like 1,250.00 fit */
.gt-sum-money { justify-content: stretch; }
.gt-sum-money .input-group { width: 100%; flex: 1; min-width: 150px; }
.gt-sum-money .form-control { font-size: .95rem; }
.gt-sum-input span { min-width: 74px; }
.gt-sum-wide { grid-column: 1 / -1; text-align: left !important; margin-top: -4px; }
.gt-sum-note { margin-top: 8px; color: var(--gt-muted); font-size: .74rem; }
.gt-sum-exempt { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: #e1f7ea; color: #12794a; font-size: .82rem; font-weight: 600; }
.gt-sum-exempt[hidden] { display: none; }
.gt-sum-exempt i { margin-right: 6px; }
.gt-sum-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--gt-border); }
.gt-sum-total span { color: var(--gt-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
.gt-sum-total strong { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.gt-po { font-weight: 700; color: var(--gt-teal-dark); text-decoration: none; letter-spacing: .01em; }
.gt-po:hover { text-decoration: underline; }
.gt-st { text-transform: none; }
.gt-st-draft { background: #eceff3; color: #5d6b78; }
.gt-st-sent { background: #e0f2fe; color: #0369a1; }
.gt-st-approved { background: #e1f7ea; color: #12794a; }
.gt-st-rejected { background: #fde8ea; color: #b4232f; }
@media (max-width: 1199.98px) { .gt-quote-grid { grid-template-columns: 1fr; } .gt-quote-side { position: static; } }

[data-bs-theme="dark"] .gt-qlimits, [data-bs-theme="dark"] .gt-sum-client { background: #0f1a25; color: #b4c4d1; }
[data-bs-theme="dark"] .gt-qwarn { background: rgba(220, 38, 38, .12); color: #f5a3aa; }
[data-bs-theme="dark"] .gt-sum-exempt { background: rgba(52, 211, 153, .14); color: #5eead4; }
[data-bs-theme="dark"] .gt-po { color: #7fd3ee; }
[data-bs-theme="dark"] .gt-st-draft { background: rgba(255, 255, 255, .08); color: #aebdca; }
[data-bs-theme="dark"] .gt-st-sent { background: rgba(14, 165, 233, .18); color: #7dd3fc; }
[data-bs-theme="dark"] .gt-st-approved { background: rgba(52, 211, 153, .16); color: #5eead4; }
[data-bs-theme="dark"] .gt-st-rejected { background: rgba(244, 63, 94, .16); color: #fda4af; }

/* ---------- Settings tabs & email ---------- */
.gt-tabs { display: inline-flex; gap: 4px; margin-bottom: 16px; padding: 4px; background: rgba(255, 255, 255, .8); border: 1px solid var(--gt-border); border-radius: 14px; box-shadow: var(--gt-shadow); }
.gt-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 0; border-radius: 10px; background: transparent; color: var(--gt-muted); font-weight: 600; font-size: .92rem; transition: all .16s ease; }
.gt-tab:hover { color: var(--gt-teal-dark); background: rgba(34, 180, 217, .1); }
.gt-tab.active { color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); box-shadow: 0 6px 14px rgba(26, 139, 176, .3); }
.gt-tab-dot { width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.gt-tab-dot.ok { background: #34d399; }
.gt-tabpane[hidden] { display: none; }
.gt-tabpane .gt-card.gt-settings { min-height: calc(100vh - 230px); }
.gt-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gt-chip { padding: 3px 11px; border: 1px solid var(--gt-border); border-radius: 999px; background: var(--gt-surface); color: var(--gt-ink); font-size: .78rem; font-weight: 600; transition: all .15s ease; }
.gt-chip:hover { color: var(--gt-teal-dark); border-color: rgba(26, 139, 176, .4); background: #eef7fb; }
.gt-mail-status { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fff3e0; color: #92400e; }
.gt-mail-status.ok { background: #e1f7ea; color: #12794a; }
.gt-mail-status > i { font-size: 1.3rem; }
.gt-mail-status strong { display: block; font-size: .92rem; }
.gt-mail-status span { display: block; font-size: .8rem; opacity: .9; }
[data-bs-theme="dark"] .gt-tabs { background: rgba(16, 28, 40, .85); }
[data-bs-theme="dark"] .gt-chip { background: #0f1a25; }
[data-bs-theme="dark"] .gt-mail-status { background: rgba(245, 158, 11, .14); color: #fbbf24; }
[data-bs-theme="dark"] .gt-mail-status.ok { background: rgba(52, 211, 153, .14); color: #5eead4; }

/* Email-this-document buttons & modal */
.gt-mail-btn[disabled], .gt-mail-btn.is-off { opacity: .45; cursor: not-allowed; }
.gt-mail-from { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 8px 12px; border-radius: 10px; background: #eef7fb; color: #3d5466; font-size: .85rem; }
[data-bs-theme="dark"] .gt-mail-from { background: #0f1a25; color: #b4c4d1; }

/* Item IDs */
.gt-uid { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: var(--gt-teal-dark); white-space: nowrap; }
.gt-uid.is-new { color: var(--gt-muted); font-weight: 500; font-style: italic; font-family: inherit; letter-spacing: 0; }
.gt-qerrors { margin-bottom: 18px; }
[data-bs-theme="dark"] .gt-uid { color: #7fd3ee; }

/* ---------- Pass to order (wizard) ---------- */
.gt-btn-order { color: var(--gt-teal-dark); }
.gt-btn-pass { border-color: rgba(26, 139, 176, .45); color: var(--gt-teal-dark); font-weight: 600; background: #f1f9fc; }
.gt-btn-pass:hover { background: #e3f4fa; border-color: var(--gt-teal); }
.gt-st-order { background: #ede9fe; color: #6d28d9; }
.gt-sum-order { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #ede9fe; color: #5b21b6; }
.gt-sum-order i { font-size: 1.3rem; }
.gt-sum-order strong { display: block; font-size: .9rem; }
.gt-sum-order span { display: block; font-size: .78rem; opacity: .85; }

.gt-steps { display: flex; gap: 8px; margin: 0; padding: 4px 30px 14px; list-style: none; }
.gt-steps li { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--gt-border); border-radius: 12px; color: var(--gt-muted); background: var(--gt-surface); transition: all .2s ease; }
.gt-steps li span { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; font-size: .78rem; font-weight: 700; background: #eef3f8; color: var(--gt-muted); }
.gt-steps li b { font-size: .88rem; font-weight: 600; }
.gt-steps li.is-active { color: var(--gt-ink); border-color: rgba(26, 139, 176, .5); box-shadow: 0 6px 16px rgba(26, 139, 176, .15); }
.gt-steps li.is-active span { color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); }
.gt-steps li.is-done span { color: #fff; background: #34d399; font-size: 0; }
.gt-steps li.is-done span::after { content: '\F26A'; font-family: 'bootstrap-icons'; font-size: .85rem; }
.gt-wo-loading { padding: 40px; text-align: center; color: var(--gt-muted); }
.gt-wo-loading[hidden] { display: none; }
.gt-wo-tools { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.gt-wo-frame { display: block; width: 100%; height: 58vh; min-height: 360px; border: 1px solid var(--gt-border); border-radius: 14px; background: #fff; }
.gt-wo-status { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 16px; border-radius: 14px; background: #f3f8fb; color: #3d5466; }
.gt-wo-status > i { font-size: 1.5rem; }
.gt-wo-status strong { display: block; }
.gt-wo-status span { display: block; font-size: .82rem; opacity: .85; }
.gt-wo-status img { margin-left: auto; height: 56px; max-width: 200px; object-fit: contain; }
.gt-wo-status.is-ok { background: #e1f7ea; color: #12794a; }
.gt-wo-status.is-wait { background: #e0f2fe; color: #0369a1; }
.gt-wo-status.is-warn { background: #fff3e0; color: #92400e; }
.gt-wo-canvas { display: block; width: 100%; height: 200px; background: #fbfdff; border: 2px dashed #b9d3e0; border-radius: 14px; }
.gt-wo-accept { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: #3d5466; cursor: pointer; }
.gt-wo-accept input { margin-top: 4px; flex: none; }
.gt-wo-offmail { display: flex; gap: 12px; margin-bottom: 12px; padding: 14px 16px; border-radius: 14px; background: #fff3e0; color: #92400e; }
.gt-wo-offmail[hidden], #woMailForm[hidden] { display: none; }
.gt-wo-offmail i { font-size: 1.4rem; }
.gt-wo-offmail strong { display: block; }
.gt-wo-offmail span { display: block; font-size: .85rem; }
.gt-wo-sum { max-width: 520px; margin: 6px auto 20px; padding: 6px 18px; border: 1px solid var(--gt-border); border-radius: 16px; background: #f8fbfd; }
.gt-wo-sum-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--gt-border); }
.gt-wo-sum-row:last-child { border-bottom: 0; }
.gt-wo-sum-row span { color: var(--gt-muted); }
.gt-wo-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.gt-wo-pill.ok { background: #e1f7ea; color: #12794a; }
.gt-wo-pill.warn { background: #fff3e0; color: #92400e; }
.gt-wo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.gt-wo-note { max-width: 520px; margin: 16px auto 0; text-align: center; color: var(--gt-muted); font-size: .88rem; }
.gt-wo-note.is-warn { color: #92400e; }
.gt-wo-done { padding: 34px 10px 18px; text-align: center; }
.gt-wo-done-ic { display: inline-grid; place-items: center; width: 74px; height: 74px; margin-bottom: 14px; border-radius: 24px; font-size: 2.2rem; color: #fff; background: linear-gradient(135deg, #34d399, #12794a); box-shadow: 0 14px 30px rgba(18, 121, 74, .35); }
.gt-wizard section[hidden] { display: none; }
@media (max-width: 767.98px) { .gt-steps { padding: 4px 16px 12px; } .gt-steps li b { display: none; } .gt-wo-tools { flex-wrap: wrap; } }
[data-bs-theme="dark"] .gt-wo-status { background: #0f1a25; color: #b4c4d1; }
[data-bs-theme="dark"] .gt-wo-status.is-ok { background: rgba(52, 211, 153, .14); color: #5eead4; }
[data-bs-theme="dark"] .gt-wo-status.is-wait { background: rgba(14, 165, 233, .16); color: #7dd3fc; }
[data-bs-theme="dark"] .gt-wo-status.is-warn, [data-bs-theme="dark"] .gt-wo-offmail { background: rgba(245, 158, 11, .14); color: #fbbf24; }
[data-bs-theme="dark"] .gt-wo-sum { background: #0f1a25; }
[data-bs-theme="dark"] .gt-wo-canvas { background: #f4f9fc; }
[data-bs-theme="dark"] .gt-steps li { background: #101c28; }
[data-bs-theme="dark"] .gt-st-order, [data-bs-theme="dark"] .gt-sum-order { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
[data-bs-theme="dark"] .gt-btn-pass { background: #0f1a25; }

/* ---------- Confirm dialog ---------- */
.gt-confirm { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 16px; background: rgba(14, 28, 41, 0); backdrop-filter: blur(0); transition: background .16s ease, backdrop-filter .16s ease; }
.gt-confirm[hidden] { display: none; }
.gt-confirm.is-open { background: rgba(14, 28, 41, .55); backdrop-filter: blur(3px); }
.gt-confirm-card { width: 100%; max-width: 400px; padding: 32px 28px 24px; text-align: center; background: #fff; border-radius: 26px; box-shadow: 0 40px 100px rgba(15, 27, 38, .45); transform: translateY(14px) scale(.96); opacity: 0; transition: transform .22s cubic-bezier(.2, .9, .3, 1.2), opacity .16s ease; }
.gt-confirm.is-open .gt-confirm-card { transform: none; opacity: 1; }
.gt-confirm-icon { display: inline-grid; place-items: center; width: 68px; height: 68px; margin-bottom: 14px; border-radius: 22px; font-size: 1.9rem; color: #dc2626; background: #fdecec; box-shadow: 0 0 0 9px #fff5f5; }
.gt-confirm-icon.is-warn { color: #b45309; background: #fff3e0; box-shadow: 0 0 0 9px #fff9ef; }
.gt-confirm-card h5 { font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.gt-confirm-card p { margin-bottom: 22px; font-size: .95rem; white-space: pre-line; }
.gt-confirm-actions { display: flex; gap: 10px; }
.gt-confirm-actions .btn { flex: 1; padding: .7rem 1rem; }
.btn-danger { border: 0; background: linear-gradient(135deg, #f1707b, #dc2626); box-shadow: 0 8px 20px rgba(220, 38, 38, .35); }
.btn-danger:hover, .btn-danger:focus { background: linear-gradient(135deg, #ee5d69, #c81e1e); box-shadow: 0 12px 26px rgba(220, 38, 38, .45); }

/* ---------- Low stock alerts ---------- */
.gt-nav-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: .72rem; font-weight: 700; text-align: center; color: #fff; background: linear-gradient(135deg, #f59e0b, #dc2626); box-shadow: 0 4px 10px rgba(220, 38, 38, .35); animation: gt-pulse 2s ease-in-out infinite; }
.gt-nav-link.active .gt-nav-badge { background: #fff; color: #c2410c; box-shadow: none; }
@keyframes gt-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

.gt-low-banner { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; padding: 16px 20px; border-radius: 20px; background: linear-gradient(135deg, #fff7e6, #fff1ec); border: 1px solid rgba(245, 158, 11, .35); box-shadow: 0 12px 30px rgba(245, 158, 11, .16); }
.gt-low-banner-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, #f59e0b, #dc2626); box-shadow: 0 8px 18px rgba(220, 38, 38, .35); animation: gt-pulse 2s ease-in-out infinite; }
.gt-low-banner-body { min-width: 0; }
.gt-low-banner-body strong { display: block; margin-bottom: 8px; font-size: 1.05rem; color: #9a3412; letter-spacing: -.01em; }
.gt-low-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gt-low-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid rgba(245, 158, 11, .4); color: #5b3b12; font-size: .82rem; text-decoration: none; transition: all .15s ease; }
.gt-low-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245, 158, 11, .25); color: #5b3b12; }
.gt-low-chip b { color: #c2410c; }
.gt-low-chip small { color: #9a8a76; }
.gt-low-chip.is-zero { border-color: rgba(220, 38, 38, .45); }
.gt-low-chip.is-zero b { color: #b91c1c; }

.gt-sheet-card.is-low { box-shadow: 0 0 0 2px rgba(245, 158, 11, .55), 0 18px 40px rgba(245, 158, 11, .2); }
.gt-low-flag { position: absolute; top: 18px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #fff; background: linear-gradient(135deg, #f59e0b, #dc2626); box-shadow: 0 8px 18px rgba(220, 38, 38, .35); animation: gt-pulse 2s ease-in-out infinite; }
.gt-sheet-qty.is-low { background: linear-gradient(135deg, #fbbf24, #ea580c); box-shadow: 0 10px 22px rgba(234, 88, 12, .42); }
.gt-sheet-alertline { margin-top: 4px; color: var(--gt-muted); font-size: .76rem; }
.gt-sheet-alertline i { margin-right: 5px; }
.gt-sheet-alertline.is-low { color: #c2410c; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) { .gt-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
    .gt-sidebar { position: fixed; top: 0; left: calc(-1 * var(--gt-sidebar-w) - 20px); z-index: 1040; height: 100vh; margin: 0; border-radius: 0 26px 26px 0; background: rgba(255, 255, 255, .96); transition: left .28s ease; }
    .gt-sidebar.open { left: 0; box-shadow: 0 0 80px rgba(0, 0, 0, .35); }
    .gt-topbar { padding: 14px 16px 6px; }
    .gt-content { padding: 10px 16px 24px; }
}
@media (max-width: 767.98px) {
    .gt-settings-grid { grid-template-columns: 1fr; }
    .gt-card.gt-settings { min-height: 0; }
}

/* =====================================================================
   Dark theme  (html[data-bs-theme="dark"]; Bootstrap handles its own parts)
   ===================================================================== */
[data-bs-theme="dark"] {
    --gt-ink: #e6eef5;
    --gt-bg: #0a141d;
    --gt-surface: #101c28;
    --gt-border: rgba(255, 255, 255, .09);
    --gt-muted: #8ea2b3;
    --gt-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px rgba(0, 0, 0, .35);
    --bs-body-bg: #0a141d;
    --bs-body-color: #e6eef5;
    --bs-border-color: rgba(255, 255, 255, .1);
}
[data-bs-theme="dark"] body {
    background:
        radial-gradient(900px 520px at 100% -10%, rgba(34, 180, 217, .14), transparent 60%),
        radial-gradient(800px 500px at -10% 110%, rgba(26, 139, 176, .12), transparent 60%),
        #0a141d;
}
/* surfaces */
[data-bs-theme="dark"] .gt-sidebar { background: rgba(16, 28, 40, .85); border-color: rgba(255, 255, 255, .07); box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05); }
[data-bs-theme="dark"] .gt-topbar { background: rgba(16, 28, 40, .82); border-color: rgba(255, 255, 255, .07); }
[data-bs-theme="dark"] .gt-card,
[data-bs-theme="dark"] .gt-stat,
[data-bs-theme="dark"] .gt-sheet-card,
[data-bs-theme="dark"] .gt-login-card { background: rgba(16, 28, 40, .9); border-color: rgba(255, 255, 255, .07); }
[data-bs-theme="dark"] .gt-empty { background: rgba(16, 28, 40, .7); border-color: rgba(34, 180, 217, .3); }
[data-bs-theme="dark"] .gt-set-section { background: rgba(10, 20, 29, .55); }
[data-bs-theme="dark"] .gt-size-box,
[data-bs-theme="dark"] .gt-sheet-swatch,
[data-bs-theme="dark"] .gt-low-chip { background: #0f1a25; }
[data-bs-theme="dark"] .gt-sheet-desc,
[data-bs-theme="dark"] .gt-combo { background: #0f1a25; color: #b4c4d1; }
[data-bs-theme="dark"] .gt-auth { background: radial-gradient(700px 460px at 12% 8%, rgba(34, 180, 217, .22), transparent 62%), radial-gradient(640px 480px at 92% 92%, rgba(26, 139, 176, .2), transparent 62%), #0a141d; }
/* navigation */
[data-bs-theme="dark"] .gt-brand img, [data-bs-theme="dark"] .gt-login-logo { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)) drop-shadow(0 0 10px rgba(255, 255, 255, .35)); }
[data-bs-theme="dark"] .gt-nav-link { color: #9fb2c2; }
[data-bs-theme="dark"] .gt-nav-link i { color: #6f8496; }
[data-bs-theme="dark"] .gt-nav-link:hover { background: rgba(34, 180, 217, .1); color: #7fd3ee; }
[data-bs-theme="dark"] .gt-nav-link.active, [data-bs-theme="dark"] .gt-nav-link.active i { color: #fff; }
[data-bs-theme="dark"] .gt-crumbs span { color: #fff; }
/* controls */
[data-bs-theme="dark"] .gt-icon-btn,
[data-bs-theme="dark"] .gt-user,
[data-bs-theme="dark"] .gt-gsearch input,
[data-bs-theme="dark"] .gt-search input,
[data-bs-theme="dark"] .gt-dt-lengthbox .form-select,
[data-bs-theme="dark"] .gt-page { background: #0f1a25; color: var(--gt-ink); border-color: var(--gt-border); }
[data-bs-theme="dark"] .gt-icon-btn { color: #9fb2c2; }
[data-bs-theme="dark"] .gt-icon-btn:hover, [data-bs-theme="dark"] .gt-icon-btn.show, [data-bs-theme="dark"] .gt-user:hover, [data-bs-theme="dark"] .gt-user.show { background: #14283a; color: #7fd3ee; }
[data-bs-theme="dark"] .gt-bell-dot { border-color: #101c28; }
[data-bs-theme="dark"] .gt-gsearch-panel, [data-bs-theme="dark"] .dropdown-menu { background: #101c28; border-color: var(--gt-border); }
[data-bs-theme="dark"] .gt-kbd, [data-bs-theme="dark"] .gt-search-clear { background: #162636; color: var(--gt-muted); border-color: var(--gt-border); }
[data-bs-theme="dark"] .gt-gs-item:hover, [data-bs-theme="dark"] .gt-gs-item.is-active { background: rgba(34, 180, 217, .16); }
[data-bs-theme="dark"] .dropdown-item { color: var(--gt-ink); }
[data-bs-theme="dark"] .dropdown-item:hover, [data-bs-theme="dark"] .gt-notif-more:hover { background: #14283a; color: #7fd3ee; }
[data-bs-theme="dark"] .btn-light, [data-bs-theme="dark"] .btn-outline-secondary, [data-bs-theme="dark"] .btn-outline-danger { background: #0f1a25; color: var(--gt-ink); border-color: var(--gt-border); }
[data-bs-theme="dark"] .btn-outline-secondary { color: #9fb2c2; }
[data-bs-theme="dark"] .btn-outline-danger { color: #f1707b; }
[data-bs-theme="dark"] .btn-light:hover, [data-bs-theme="dark"] .btn-outline-secondary:hover { background: #14283a; color: #7fd3ee; border-color: rgba(34, 180, 217, .35); }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select, [data-bs-theme="dark"] .input-group-text { background-color: #0d1822; color: var(--gt-ink); border-color: var(--gt-border); }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { background-color: #0f1d2a; }
[data-bs-theme="dark"] .form-control:disabled { background-color: #0a121a; color: #7d90a0; }
/* tables & badges */
[data-bs-theme="dark"] .table thead th { background: rgba(10, 20, 29, .7) !important; }
[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * { background: rgba(34, 180, 217, .08); color: var(--gt-ink); }
[data-bs-theme="dark"] .table > :not(caption) > * > * { color: var(--gt-ink); background-color: transparent; border-bottom-color: var(--gt-border); }
[data-bs-theme="dark"] .badge.text-bg-success { background: rgba(52, 211, 153, .16) !important; color: #5eead4 !important; }
[data-bs-theme="dark"] .badge.text-bg-secondary { background: rgba(255, 255, 255, .08) !important; color: #aebdca !important; }
[data-bs-theme="dark"] code { background: rgba(34, 180, 217, .14); color: #7fd3ee; }
[data-bs-theme="dark"] .gt-avatar { background: rgba(34, 180, 217, .14); color: #7fd3ee; }
[data-bs-theme="dark"] .gt-avatar.is-company { color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); }
[data-bs-theme="dark"] .gt-link { color: #7fd3ee; }
[data-bs-theme="dark"] .gt-diff { background: rgba(255, 255, 255, .08); }
[data-bs-theme="dark"] .gt-price-table tr.is-changed td { background: rgba(34, 180, 217, .1); }
[data-bs-theme="dark"] .gt-price-table tr.is-changed .gt-price-input { background: #0f1d2a; }
/* modals, toast, confirm */
[data-bs-theme="dark"] .modal-content, [data-bs-theme="dark"] .gt-confirm-card, [data-bs-theme="dark"] .gt-toast { background: #101c28; color: var(--gt-ink); }
[data-bs-theme="dark"] .gt-toast { border-color: rgba(255, 255, 255, .07); }
[data-bs-theme="dark"] .gt-confirm-icon { background: rgba(220, 38, 38, .16); box-shadow: 0 0 0 9px rgba(220, 38, 38, .07); }
[data-bs-theme="dark"] .gt-confirm-icon.is-warn, [data-bs-theme="dark"] .gt-modal-icon { background: rgba(245, 158, 11, .16); color: #fbbf24; box-shadow: 0 0 0 9px rgba(245, 158, 11, .07); }
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
/* alerts & stock */
[data-bs-theme="dark"] .gt-low-banner { background: linear-gradient(135deg, rgba(245, 158, 11, .14), rgba(220, 38, 38, .1)); border-color: rgba(245, 158, 11, .35); }
[data-bs-theme="dark"] .gt-low-banner-body strong { color: #fbbf24; }
[data-bs-theme="dark"] .gt-low-chip { color: #f3dcb8; border-color: rgba(245, 158, 11, .4); }
[data-bs-theme="dark"] .gt-low-chip b { color: #fbbf24; }
[data-bs-theme="dark"] .gt-notif-head span { background: rgba(245, 158, 11, .16); color: #fbbf24; }
/* sheet drawing keeps a light "blueprint" panel so the glass colours stay true */
[data-bs-theme="dark"] .gt-sheet-draw { background:
    linear-gradient(rgba(26, 139, 176, .09) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(26, 139, 176, .09) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(160deg, #e9f4fa, #d7eaf4); }
[data-bs-theme="dark"] .gt-preview { background: repeating-conic-gradient(#1a2a38 0% 25%, #223445 0% 50%) 0 / 18px 18px; }
[data-bs-theme="dark"] .gt-sheet-draw .gt-sheet-legend .gt-sheet-swatch { background: rgba(255, 255, 255, .9); }
[data-bs-theme="dark"] .gt-sheet-draw .gt-sheet-swatch b { color: #0e1c29; }
[data-bs-theme="dark"] .gt-sheet-draw .gt-sheet-swatch small { color: #64768a; }

/* ---- Pass to order: acknowledgement step, dealer requests, notifications ---- */
.gt-steps[hidden], .gt-steps li[hidden], .gt-wizard [data-staff-only][hidden], #woAckForm[hidden], .gt-wizard .btn[hidden] { display: none !important; }
.gt-wo-pdf { height: 62vh; }
.gt-wo-status.is-none { background: #f3f8fb; color: #3d5466; }
.gt-st-requested { background: #fff3e0; color: #b45309; }
[data-bs-theme="dark"] .gt-st-requested { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.gt-notif-ic.is-req { background: linear-gradient(135deg, #22b4d9, #0f6e8c); }
.gt-notif-item.is-req:hover { background: rgba(26, 139, 176, .1); }
.gt-notif-clear { margin: 0 0 6px; text-align: right; }
.gt-notif-clear button { padding: 2px 10px; border: 0; background: none; font-size: .78rem; font-weight: 600; color: var(--gt-teal-dark); }
.gt-notif-clear button:hover { text-decoration: underline; }

/* ---- Users: dealer client + logo ---- */
.gt-dealer-box { padding: 14px 16px; border: 1px dashed rgba(26, 139, 176, .45); border-radius: 14px; background: rgba(26, 139, 176, .04); }
[data-dealer-only][hidden], #logoRemoveWrap[hidden] { display: none !important; }
.gt-dealer-logo { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--gt-border); border-radius: 12px; background: #fff; color: var(--gt-muted); font-size: 1.4rem; overflow: hidden; }
.gt-dealer-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gt-dealer-logo-sm { width: 30px; height: 30px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--gt-border); }

/* ---- Pass to order: acceptance details (after signing) ---- */
.gt-wo-acc { margin: -4px 0 18px; padding: 14px 16px; border: 1px solid var(--gt-border); border-radius: 14px; background: var(--gt-surface); }
.gt-wo-acc[hidden], #woAccForm[hidden] { display: none !important; }
.gt-wo-acc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.gt-wo-acc-head > i { font-size: 1.35rem; color: var(--gt-teal-dark); }
.gt-wo-acc-head strong { display: block; }
.gt-wizard .gt-wo-signed-hide { display: none !important; }
#woAccSummary { display: block; font-size: .84rem; color: var(--gt-muted); }

/* ---- Users: menu access ---- */
.gt-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.gt-menu-opt { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border: 1px solid var(--gt-border); border-radius: 12px; cursor: pointer; font-size: .88rem; user-select: none; }
.gt-menu-opt:has(input:checked) { border-color: rgba(26, 139, 176, .55); background: rgba(26, 139, 176, .07); }
.gt-menu-opt i { color: var(--gt-teal-dark); }
.gt-menu-opt.is-fixed { opacity: .65; cursor: default; }
.gt-menu-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(52, 211, 153, .12); color: #12794a; font-size: .88rem; }
[data-menu-box][hidden], [data-menu-admin][hidden] { display: none !important; }

/* Orders: a status per line */
.gt-qtable-order { min-width: 1140px; }
.gt-item-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.gt-item-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.gt-item-status.is-ordered       { color: #b42318; background: #fee4e2; border-color: #fecdca; }
.gt-item-status.is-in_production { color: #93600a; background: #fef3c7; border-color: #fde68a; }
.gt-item-status.is-cut           { color: #0e7490; background: #cffafe; border-color: #a5f3fc; }
.gt-item-status.is-packaged      { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.gt-item-status.is-ready         { color: #067647; background: #dcfae6; border-color: #abefc6; }
.gt-item-status.is-delivered     { color: #fff; background: #12794a; border-color: #12794a; }

/* Quote / order sidebar: secondary actions in two columns */
.gt-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.gt-actions > .btn, .gt-actions > span, .gt-actions > span > .btn { width: 100%; }
.gt-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: .45rem .5rem; font-size: .875rem; white-space: nowrap; }
.gt-actions > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Process Orders */
.gt-proc-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.gt-proc-search { flex: 0 1 620px; max-width: 620px; margin: 0; padding: 22px 24px; }
.gt-proc-hit { flex: 1 1 320px; max-width: 520px; margin: 0; padding: 18px 22px; border: 2px solid #22b4d9; display: flex; flex-direction: column; gap: 10px; }
.gt-proc-hit-info { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 0; font-size: .9rem; }
.gt-proc-hit-info dt { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #0f6e8c; align-self: center; }
.gt-proc-hit-info dd { margin: 0; font-weight: 600; }
.gt-proc-hit form { margin-top: auto; }
.gt-proc-search input { font-weight: 600; letter-spacing: .03em; }
.gt-fp-modes { display: flex; gap: 6px; padding: 5px; margin-bottom: 16px; border-radius: 14px; background: rgba(15,27,38,.05); }
.gt-fp-mode { flex: 1; display: flex; align-items: center; justify-content: center; margin: 0; padding: 10px 14px; border-radius: 10px; font-weight: 600; color: #64768a; cursor: pointer; transition: all .18s ease; }
.gt-fp-mode input { position: absolute; opacity: 0; pointer-events: none; }
.gt-fp-mode:hover { color: #0f6e8c; }
.gt-fp-mode.active { color: #fff; background: linear-gradient(135deg, #22b4d9, #0f6e8c); box-shadow: 0 6px 16px rgba(15,110,140,.25); }
[data-bs-theme="dark"] .gt-fp-modes { background: rgba(255,255,255,.05); }
.gt-fp-work { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); gap: 18px; align-items: start; }
@media (max-width: 1299px) { .gt-fp-work { grid-template-columns: 1fr; } }
.gt-fp-left { min-width: 0; }
.gt-fp-left .gt-proc-search { flex: 1 1 auto; max-width: none; }
.gt-fp-glass { padding: 24px 26px; min-width: 0; }
.gt-fp-rack { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: rgba(34,180,217,.07); border: 1px solid rgba(34,180,217,.25); }
.gt-fp-rack .form-label { font-weight: 700; }
.gt-fp-rack input { font-weight: 600; letter-spacing: .03em; }
.gt-fp-rack-hint { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: .8rem; color: #64768a; }
.gt-fp-pieces .rk { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #0f6e8c; background: #e0f2fe; white-space: nowrap; }
.gt-fp-pieces .acts { display: inline-flex; gap: 4px; }
.gt-fp-pieces .acts form { margin: 0; }
.gt-fp-act { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 8px; font-size: .74rem; font-weight: 600; color: #b42318; background: #fff; border: 1px solid #fecdca; }
.gt-fp-act:hover { background: #fee4e2; color: #912018; }
[data-bs-theme="dark"] .gt-fp-act { background: transparent; color: #fda4af; border-color: rgba(244,63,94,.35); }
.gt-rack-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.gt-rack-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; border-top: 4px solid #22c55e; }
.gt-rack-card.is-busy { border-top-color: #f97316; }
.gt-rack-photo { position: relative; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: #eef3f7; color: #8aa0b2; font-size: .85rem; }
.gt-rack-photo i { font-size: 2rem; }
.gt-rack-photo img { width: 100%; height: 170px; object-fit: cover; display: block; }
.gt-rack-photo a { display: block; width: 100%; }
.gt-rack-state { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #fff; background: #12794a; }
.is-busy .gt-rack-state { background: #ea580c; }
.gt-rack-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.gt-rack-card .gt-rack-code { font-size: 1.25rem; }
.gt-rack-name { font-weight: 600; }
.gt-rack-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }
.gt-rack-actions form { margin: 0; }
.gt-rack-preview { display: block; margin-top: 10px; max-width: 100%; max-height: 220px; border-radius: 10px; }
[data-bs-theme="dark"] .gt-rack-photo { background: rgba(255,255,255,.04); }
.gt-rack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gt-rack { position: relative; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--gt-border, #dbe3e6); }
.gt-rack form { position: absolute; top: 10px; right: 12px; margin: 0; }
.gt-rack-code { font-weight: 800; color: #0f6e8c; }
.gt-rack-who { font-size: .82rem; color: #64768a; }
.gt-rack.is-busy { background: #fff7ed; border-color: #fed7aa; }
.gt-rack.is-free { background: #f0fdf4; border-color: #bbf7d0; }
[data-bs-theme="dark"] .gt-rack.is-busy { background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.3); }
[data-bs-theme="dark"] .gt-rack.is-free { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.25); }
[data-bs-theme="dark"] .gt-fp-pieces .rk { background: rgba(14,165,233,.18); color: #7dd3fc; }
.gt-fp-count { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.22); font-size: .85em; }
.gt-fp-list { padding: 20px 22px; min-width: 0; position: sticky; top: 96px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.gt-fp-list-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gt-fp-list-sub { font-size: .82rem; color: #64768a; margin-top: 2px; }
.gt-fp-tally { display: flex; gap: 8px; }
.gt-fp-tally span { padding: 6px 12px; border-radius: 10px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.gt-fp-tally b { font-size: 1.15rem; margin-right: 3px; }
.gt-fp-tally .ok { color: #067647; background: #dcfae6; }
.gt-fp-tally .no { color: #b42318; background: #fee4e2; }
.gt-fp-bar { height: 8px; border-radius: 99px; background: #fee4e2; overflow: hidden; margin: 14px 0; }
.gt-fp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #12794a); border-radius: 99px; }
.gt-fp-pieces { list-style: none; margin: 0; padding: 0 4px 0 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.gt-fp-pieces li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; border: 1px solid transparent; border-left-width: 5px; }
.gt-fp-pieces li.is-cut { background: #ecfdf3; border-color: #abefc6; border-left-color: #12794a; }
.gt-fp-pieces li.is-pending { background: #fef3f2; border-color: #fecdca; border-left-color: #d92d20; }
.gt-fp-pieces li.is-current { box-shadow: 0 0 0 2px #22b4d9; }
.gt-fp-pieces .n { width: 26px; text-align: center; font-weight: 700; color: #64768a; font-size: .85rem; }
.gt-fp-pieces .d { flex: 1; min-width: 0; }
.gt-fp-pieces .t { font-size: .92rem; }
.gt-fp-pieces .s { font-size: .76rem; color: #64768a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-fp-pieces .st { font-size: .8rem; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.gt-fp-pieces .is-cut .st { color: #067647; }
.gt-fp-pieces .is-pending .st { color: #b42318; }
[data-bs-theme="dark"] .gt-fp-pieces li.is-cut { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.25); border-left-color: #22c55e; }
[data-bs-theme="dark"] .gt-fp-pieces li.is-pending { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.25); border-left-color: #f43f5e; }
[data-bs-theme="dark"] .gt-fp-tally .ok { background: rgba(34,197,94,.15); color: #86efac; }
[data-bs-theme="dark"] .gt-fp-tally .no { background: rgba(244,63,94,.15); color: #fda4af; }
[data-bs-theme="dark"] .gt-fp-bar { background: rgba(244,63,94,.2); }
.gt-fp-glass-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.gt-fp-code { font-size: 1.6rem; font-weight: 800; color: #0f6e8c; letter-spacing: .03em; display: flex; align-items: center; gap: 10px; }
.gt-fp-code .gt-item-status { margin: 0; font-size: .8rem; letter-spacing: 0; }
.gt-fp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--gt-border, #dbe3e6); }
.gt-fp-actions form { margin: 0; }
.gt-fp-actions .btn { min-width: 190px; }
.gt-fp-glass-type { font-size: 1.1rem; font-weight: 700; margin-top: 4px; }
.gt-fp-comp { color: #64768a; font-size: .9rem; }
.gt-fp-bc { background: #fff; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--gt-border, #dbe3e6); }
.gt-fp-bc svg { display: block; }
.gt-fp-size { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 26px; margin: 20px 0; padding: 16px 20px; border-radius: 14px; background: #0e1c29; color: #fff; }
.gt-fp-size span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #8fb7c9; }
.gt-fp-size b { font-size: 1.9rem; line-height: 1.1; color: #b9f3ff; font-variant-numeric: tabular-nums; }
.gt-fp-size .x { font-size: 1.6rem; color: #8fb7c9; padding-bottom: 2px; }
.gt-fp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 6px 26px; }
.gt-fp-cols dl { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; align-content: start; }
.gt-fp-cols dt { font-size: .78rem; font-weight: 600; color: #64768a; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.gt-fp-cols dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
[data-bs-theme="dark"] .gt-fp-size { background: #07111a; }
.gt-fp-hit, .gt-fp-miss { margin-top: 12px; font-size: .9rem; font-weight: 600; }
.gt-fp-hit { color: #12794a; }
.gt-fp-miss { color: #b4532a; }
.gt-proc-h { margin: 6px 0 12px; font-size: 1rem; font-weight: 700; color: var(--bs-secondary-color, #64768a); }
.gt-proc-empty { max-width: none; display: flex; align-items: center; gap: 10px; padding: 20px 24px; }
.gt-proc-empty i { font-size: 1.3rem; color: #1a8bb0; }
.gt-proc-order { max-width: none; margin-bottom: 16px; padding: 20px 22px; }
.gt-proc-order.is-match { border: 2px solid #22b4d9; }
.gt-proc-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gt-proc-num { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.gt-proc-po { color: #64768a; }
.gt-proc-po b { color: #0f6e8c; }
.gt-proc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.gt-proc-info { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 12px 0; font-size: .9rem; }
.gt-proc-info span { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #0f6e8c; }
.gt-proc-items th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #64768a; }
.gt-uid-cell { font: 700 .82rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #0f6e8c; white-space: nowrap; }
@media (max-width: 700px) { .gt-proc-info { grid-template-columns: 1fr; } }
.gt-proc-matches { display: flex; flex-wrap: wrap; gap: 8px; max-width: 900px; }
.gt-proc-matches b { color: #0f6e8c; }

/* Production boxes */
.gt-proc-work { display: grid; grid-template-columns: minmax(340px, 30%) minmax(0, 1fr); gap: 18px; align-items: start; }
.gt-proc-left { min-width: 0; }
.gt-proc-left .gt-proc-search { flex: 1 1 300px; }
.gt-proc-left .gt-proc-hit { flex: 1 1 260px; }
.gt-boxes { margin-top: 26px; min-width: 0; }
.gt-box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.gt-optimizer { max-width: none; margin: 0; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 84px; }
.gt-optimizer-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 4px 0; }
.gt-opt-loaded { color: #0f6e8c; }
.gt-optimizer iframe { width: 100%; height: calc(100vh - 182px); min-height: 520px; border: 1px solid var(--gt-border); border-radius: 14px; background: transparent; }
[data-bs-theme="dark"] .gt-optimizer iframe { border-color: rgba(255, 255, 255, .07); }
@media (max-width: 1199px) { .gt-proc-work { grid-template-columns: 1fr; } .gt-optimizer { position: static; } }
.gt-box { max-width: none; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.gt-box header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gt-box-num { font-size: 1.15rem; font-weight: 800; color: #0f6e8c; letter-spacing: .02em; }
.gt-box-glass { font-weight: 600; font-size: .9rem; }
.gt-box-count { text-align: right; font-size: .85rem; color: #64768a; white-space: nowrap; }
.gt-box-count b { font-size: 1.3rem; color: var(--bs-body-color, #0e1c29); }
.gt-box-count span { display: block; font-size: .75rem; }
.gt-box-dat { margin: 0; max-height: 180px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: #0e1c29; color: #b9f3ff; font: 600 .82rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 4; }
.gt-box-pos { font-size: .8rem; color: #64768a; }
.gt-box-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.gt-box-actions form { margin: 0; }
.gt-box-sent { font-size: .8rem; font-weight: 600; color: #12794a; }
.gt-box.gt-box-prod { background: #e9f8ef; border-color: #7fd0a1; box-shadow: 0 0 0 1px #7fd0a1 inset, 0 10px 26px rgba(18,121,74,.12); }
.gt-box-prod .gt-box-num { color: #12794a; }
.gt-box-prodtag { font-size: .8rem; font-weight: 600; color: #fff; background: #1e9e5a; border-radius: 8px; padding: 6px 10px; }
.gt-box-closedtag { background: #b7791f; }
[data-bs-theme="dark"] .gt-box.gt-box-prod { background: #0f2a1d; border-color: #2f8a57; box-shadow: 0 0 0 1px #2f8a57 inset; }
[data-bs-theme="dark"] .gt-box-prod .gt-box-num { color: #5fe09a; }

/* ---------- Home dashboard ---------- */
.gt-dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.gt-dash-title { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.gt-dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.gt-kpi { display: flex; align-items: center; gap: 14px; padding: 18px; background: rgba(255, 255, 255, .9); border: 1px solid rgba(255, 255, 255, .95); border-radius: 18px; box-shadow: var(--gt-shadow); color: var(--gt-ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.gt-kpi:hover { transform: translateY(-3px); color: var(--gt-ink); box-shadow: 0 18px 38px rgba(15, 60, 90, .13); }
.gt-kpi > i { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--gt-teal-2), var(--gt-teal-dark)); }
.gt-kpi.is-warn > i { background: linear-gradient(135deg, #f0b955, #d48a12); }
.gt-kpi.is-bad > i { background: linear-gradient(135deg, #ef7d7d, #c93a3a); }
.gt-kpi.is-good > i { background: linear-gradient(135deg, #4cc790, #1f9663); }
.gt-dealer-acct li { padding: 7px 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.gt-dealer-acct li:last-child { border-bottom: 0; }
.gt-dealer-acct li > i { color: var(--bs-secondary-color); }
.gt-kpi b { display: block; font-size: 1.6rem; line-height: 1; letter-spacing: -.03em; }
.gt-kpi span { display: block; margin-top: 3px; font-weight: 600; font-size: .88rem; }
.gt-kpi small { display: block; color: var(--gt-muted); font-size: .76rem; }
.gt-dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; grid-auto-flow: dense; }
.gt-dash-card { max-width: none; padding: 20px 22px; }
.gt-dash-card.gt-span-2 { grid-column: span 2; }
.gt-dash-card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.gt-dash-card > header h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.gt-dash-card > header h2 i { color: var(--gt-teal); margin-right: 8px; }
.gt-dash-card > header span, .gt-dash-card > header a { font-size: .8rem; color: var(--gt-muted); text-decoration: none; }
.gt-dash-card > header a:hover { color: var(--gt-teal-dark); }
.gt-dash-empty { padding: 26px 0; text-align: center; color: var(--gt-muted); }
.gt-dash-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--gt-border); font-size: .8rem; color: var(--gt-muted); }
.gt-flow-bar { display: flex; gap: 3px; height: 22px; border-radius: 11px; overflow: hidden; }
.gt-flow-bar i { min-width: 6px; }
.gt-flow-bar i.is-empty { background: rgba(15, 27, 38, .07); }
.gt-flow-steps { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.gt-flow-steps > div { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; align-items: center; }
.gt-flow-steps > div b { font-size: 1.25rem; }
.gt-flow-steps > div small { grid-column: 2; color: var(--gt-muted); font-size: .75rem; }
.gt-flow-steps .arrow { color: #b6c3cc; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.gt-donut-wrap { display: flex; align-items: center; gap: 18px; }
.gt-donut { width: 140px; height: 140px; flex: none; }
.gt-donut-track { stroke: rgba(15, 27, 38, .06); }
.gt-donut-n { font-size: 26px; font-weight: 800; fill: var(--gt-ink); }
.gt-donut-l { font-size: 11px; fill: var(--gt-muted); }
.gt-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: .85rem; }
.gt-legend li { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.gt-legend li b { margin-left: auto; }
.gt-dash-table > :not(caption) > * > * { padding: .6rem .7rem; }
.gt-dash-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gt-muted); }
.gt-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: #eef2f5; color: #50626f; white-space: nowrap; }
.gt-pill.is-in_production { background: #dff1f8; color: var(--gt-teal-dark); }
.gt-pill.is-ready { background: #dcf4e8; color: #1c7a50; }
.gt-pill.is-new { background: #eef2f5; color: #50626f; }
.gt-mini-bar { height: 8px; border-radius: 4px; background: rgba(15, 27, 38, .07); overflow: hidden; }
.gt-mini-bar.is-thick { height: 12px; border-radius: 6px; margin: 6px 0; }
.gt-mini-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2fb37a, #22b4d9); }
.gt-cols { display: flex; align-items: flex-end; gap: 5px; height: 150px; }
.gt-cols > div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.gt-cols i { width: 100%; max-width: 22px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--gt-teal-2), var(--gt-teal-dark)); }
.gt-cols i.is-zero { background: rgba(15, 27, 38, .08); }
.gt-cols b { font-size: .7rem; }
.gt-cols small { font-size: .66rem; color: var(--gt-muted); }
.gt-box-list, .gt-stock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gt-box-list li { padding: 10px 12px; border: 1px solid var(--gt-border); border-radius: 12px; }
.gt-box-list li.is-prod { border-color: rgba(47, 179, 122, .45); background: rgba(47, 179, 122, .06); }
.gt-box-list .t { display: flex; justify-content: space-between; align-items: center; }
.gt-box-list .s { font-size: .78rem; color: var(--gt-muted); margin: 2px 0 6px; }
.gt-stock-list .t { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; margin-bottom: 4px; }
.gt-stock-list .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-stock-bar { position: relative; height: 8px; border-radius: 4px; background: rgba(15, 27, 38, .07); }
.gt-stock-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gt-teal-2), var(--gt-teal)); }
.gt-stock-bar em { position: absolute; top: -3px; width: 2px; height: 14px; background: #c93a3a; }
.gt-stock-list li.is-low .gt-stock-bar i { background: linear-gradient(90deg, #ef7d7d, #c93a3a); }
.gt-stock-list li.is-low .t b { color: #c93a3a; }
.gt-sales { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.gt-sales > div { padding: 12px 14px; border-radius: 12px; background: rgba(26, 139, 176, .07); }
.gt-sales small { display: block; color: var(--gt-muted); font-size: .75rem; }
.gt-sales b { display: block; font-size: 1.35rem; letter-spacing: -.02em; }
.gt-sales span { font-size: .75rem; color: var(--gt-muted); }
@media (max-width: 1199px) { .gt-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .gt-dash-grid { grid-template-columns: 1fr; } .gt-dash-card.gt-span-2 { grid-column: auto; } .gt-donut-wrap { flex-direction: column; } }
[data-bs-theme="dark"] .gt-kpi { background: rgba(16, 28, 40, .9); border-color: rgba(255, 255, 255, .07); color: #e6eef4; }
[data-bs-theme="dark"] .gt-donut-n { fill: #e6eef4; }
[data-bs-theme="dark"] .gt-donut-track, [data-bs-theme="dark"] .gt-mini-bar, [data-bs-theme="dark"] .gt-stock-bar, [data-bs-theme="dark"] .gt-cols i.is-zero { stroke: rgba(255, 255, 255, .08); background-color: rgba(255, 255, 255, .08); }
[data-bs-theme="dark"] .gt-pill { background: rgba(255, 255, 255, .08); color: #c7d4dd; }
[data-bs-theme="dark"] .gt-box-list li { border-color: rgba(255, 255, 255, .08); }

/* Factory Point · Racks mode */
.gt-fp-rackcard { max-width: none; margin-top: 16px; }
.gt-fp-rackhead { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.gt-fp-rackhead img, .gt-fp-rackhead .ph { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; flex: none; }
.gt-fp-rackhead .ph { display: grid; place-items: center; font-size: 2rem; color: #8aa4b8; background: rgba(15, 27, 38, .05); }
.gt-fp-rackchips { display: flex; flex-wrap: wrap; gap: 8px; }

/* Racks page: what a rack holds */
.gt-rack-load { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(26, 139, 176, .07); font-size: .82rem; display: grid; gap: 4px; }
.gt-rack-load .who b { font-size: .9rem; }
.gt-rack-load .who span { display: block; color: #64768a; }
.gt-rack-load .po b { color: var(--gt-teal-dark); }
.gt-rack-load .codes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.gt-rack-load .codes span { padding: 2px 7px; border-radius: 6px; background: #fff; border: 1px solid var(--gt-border); font: 600 .74rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.gt-rack-load .codes small { color: #64768a; font-weight: 500; }
.gt-rack-load .n { color: #64768a; font-size: .76rem; }
[data-bs-theme="dark"] .gt-rack-load { background: rgba(34, 180, 217, .08); }
[data-bs-theme="dark"] .gt-rack-load .codes span { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .08); }

/* Orders: racks holding the order's glass */
.gt-order-racks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.gt-order-racks span { font-size: .72rem; font-weight: 600; color: #11698a; background: #e3f3f8; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.gt-order-racks i { margin-right: 3px; }
.gt-order-rackgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gt-order-rack { border: 1px solid #d6e6ee; border-radius: 10px; padding: 10px 12px; background: #f6fbfd; }
.gt-order-rack .hd { display: flex; align-items: baseline; gap: 8px; }
.gt-order-rack .hd b { color: #0f5d7a; }
.gt-order-rack .hd span { font-size: .8rem; color: #5b7183; }
.gt-order-rack .hd em { margin-left: auto; font-style: normal; font-size: .78rem; font-weight: 600; color: #5b7183; }
.gt-order-rack .codes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.gt-order-rack .codes span { font: 600 .74rem ui-monospace, monospace; background: #fff; border: 1px solid #d6e6ee; border-radius: 6px; padding: 1px 6px; }
[data-bs-theme="dark"] .gt-order-racks span { color: #8fd3ea; background: rgba(26,139,176,.18); }
[data-bs-theme="dark"] .gt-order-rack { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
[data-bs-theme="dark"] .gt-order-rack .hd b { color: #8fd3ea; }
[data-bs-theme="dark"] .gt-order-rack .codes span { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }

/* Organize Deliveries */
.gt-dlv-pick, .gt-dlv-cur { max-width: none; margin-bottom: 16px; }
.gt-dlv-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gt-dlv-row .form-select { flex: 1 1 320px; max-width: 560px; }
.gt-dlv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.gt-dlv-head > div { margin-right: auto; }
.gt-dlv-head form { margin: 0; }
.gt-dlv-printed { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #fdf1e1; color: #a3620c; }
.gt-dlv-printed.is-done { background: #e2f6ec; color: #1d7a4c; }
[data-bs-theme="dark"] .gt-dlv-printed { background: rgba(224, 164, 59, .15); color: #f0c27a; }
[data-bs-theme="dark"] .gt-dlv-printed.is-done { background: rgba(47, 179, 122, .15); color: #7fdcae; }

/* Factory Point Delivery: last rack loaded */
.gt-fp-load { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 18px; max-width: none; }
.gt-fp-load > i { font-size: 1.4rem; color: var(--gt-teal, #1a8bb0); }
.gt-fp-load form { margin: 0; }

/* Order status: delivered */
.gt-st-delivered { background: #12794a; color: #fff; }
[data-bs-theme="dark"] .gt-st-delivered { background: rgba(52, 211, 153, .28); color: #d1fae5; }
.gt-fp-loaded { font-weight: 600; color: #12794a; background: #e1f7ea; border-radius: 10px; padding: 8px 14px; }
[data-bs-theme="dark"] .gt-fp-loaded { color: #5eead4; background: rgba(52, 211, 153, .16); }

/* Remnants: leftover pieces drawn to scale (rectangle or L shape) */
.gt-rem-draw { position: relative; padding: 12px; min-height: 190px; display: flex; align-items: center; justify-content: center; background:
    linear-gradient(rgba(26, 139, 176, .07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(26, 139, 176, .07) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(160deg, #f4fafd, #e6f2f9); border-bottom: 1px solid var(--gt-border); }
.gt-rem-draw-lg { height: 100%; border: 0; }
.gt-rem-svg { display: block; width: 100%; height: auto; max-height: 230px; }
.gt-rem-draw-lg .gt-rem-svg { max-height: 320px; }
.gt-rem-dim { stroke: #5d6b78; stroke-width: 1; }
.gt-rem-label { fill: #33424f; font-size: 12px; font-weight: 600; }
.gt-rem-notch { fill: #c94f4f; font-size: 11px; font-weight: 600; }
.gt-rem-empty { color: #6b7d8c; font-size: .9rem; text-align: center; }
.gt-rem-empty i { display: block; font-size: 2rem; margin-bottom: 6px; opacity: .6; }
.gt-rem-notchrow > .row { padding: 10px 12px 12px; border: 1px dashed var(--gt-border); border-radius: 14px; margin: 0; }
.gt-rem-notchrow[hidden] { display: none !important; }
[data-bs-theme="dark"] .gt-rem-draw { background:
    linear-gradient(rgba(26, 139, 176, .09) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(26, 139, 176, .09) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(160deg, #e9f4fa, #d7eaf4); }
.gt-rem-card .gt-rem-draw { padding: 58px 16px 12px; }
/* Remnant of the same glass recommended for a box */
.gt-box-rem { margin-top: 6px; padding: 6px 10px; border-radius: 10px; font-size: .82rem; background: rgba(47, 179, 122, .1); color: #1f7f56; border: 1px dashed rgba(47, 179, 122, .45); }
.gt-box-rem span { color: var(--bs-secondary-color); }
.gt-opt-rem { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; font-size: .88rem; background: rgba(47, 179, 122, .1); color: #1f7f56; border: 1px solid rgba(47, 179, 122, .35); }
.gt-opt-rem[hidden] { display: none; }
[data-bs-theme="dark"] .gt-box-rem, [data-bs-theme="dark"] .gt-opt-rem { color: #7fdcb0; }

/* Move order manually */
.gt-mo { max-width: none; }
.gt-mo-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.gt-mo-title { font-size: 1.25rem; font-weight: 700; }
.gt-mo-title span { font-size: .9rem; font-weight: 500; color: var(--bs-secondary-color); margin-left: .35rem; }
.gt-mo-foot { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.gt-mo-foot > span { margin-right: auto; }
.gt-mo-sel.is-changed { border-color: #f59e0b; box-shadow: 0 0 0 .15rem rgba(245, 158, 11, .25); }
.gt-mo-ordered { background: #eceff3; color: #5d6b78; }
.gt-mo-in_production { background: #fff3e0; color: #b45309; }
.gt-mo-cut { background: #e0f2fe; color: #0369a1; }
.gt-mo-packaged { background: #ede9fe; color: #6d28d9; }
.gt-mo-ready { background: #e1f7ea; color: #12794a; }
.gt-mo-delivered { background: #12794a; color: #fff; }

/* Settings → Printed codes */
.gt-code-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.gt-code-opt { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--bs-border-color); border-radius: 12px; padding: .7rem .85rem; cursor: pointer; margin: 0; }
.gt-code-opt:has(input:checked) { border-color: #0e7490; box-shadow: 0 0 0 .15rem rgba(14, 116, 144, .18); }
.gt-code-opt .form-check-input { margin: 0; flex: none; }
.gt-code-opt span { display: grid; grid-template-columns: auto 1fr; column-gap: .45rem; line-height: 1.2; }
.gt-code-opt i { grid-row: span 2; font-size: 1.5rem; align-self: center; }
.gt-code-opt small { color: var(--bs-secondary-color); font-size: .75rem; }

/* Reports */
.gt-rep-head { flex-wrap: wrap; }
.gt-rep-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gt-rep-filter .form-select { width: auto; }
.gt-rep-custom { display: none; gap: 6px; align-items: center; }
.gt-rep-custom.is-on, .gt-rep-filter.is-custom .gt-rep-custom { display: inline-flex; }
.gt-rep-custom .form-control { width: 150px; }
.gt-dash-card.gt-span-3 { grid-column: 1 / -1; }
.gt-rep-cols { height: 190px; }
.gt-rep-cols b { font-size: .62rem; white-space: nowrap; }
.gt-rep-cols .pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; min-height: 0; }
.gt-rep-cols .pair i, .gt-rep-cols .pair em { width: 45%; max-width: 16px; border-radius: 5px 5px 2px 2px; }
.gt-rep-cols .pair em { background: #cfe3ec; }
.gt-rep-cols .pair em.is-zero { background: rgba(15, 27, 38, .06); }
.gt-rep-days { height: 110px; margin-top: 12px; }
.gt-dash-foot .dot, .gt-rep-mini .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.gt-rep-list { list-style: none; margin: 0; padding: 0; }
.gt-rep-list li { padding: 8px 0; border-bottom: 1px solid var(--gt-border); }
.gt-rep-list li:last-child { border-bottom: 0; }
.gt-rep-list .t { display: flex; justify-content: space-between; gap: 8px; font-size: .86rem; margin-bottom: 5px; }
.gt-rep-mini { list-style: none; margin: 10px 0 0; padding: 0; font-size: .86rem; }
.gt-rep-mini li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--gt-border); }
.gt-rep-mini li:last-child { border-bottom: 0; }
@media (max-width: 767px) { .gt-dash-card.gt-span-3 { grid-column: auto; } }
@media print {
    .gt-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gt-dash-card { break-inside: avoid; }
}

/* Glass categories */
.badge.gt-cat-laminated { background: #e7f1f6; color: #24576b; }
.badge.gt-cat-shower { background: #e3f4ee; color: #1c7a50; }
.badge.gt-cat-partition { background: #f1ecfa; color: #5b45a0; }

/* Settings: estimated value of the application */
.gt-estimate { margin-top: 18px; }
.gt-estimate-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.gt-estimate-head h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 4px; }
.gt-estimate-head h2 i { color: var(--gt-teal-dark); margin-right: 8px; }
.gt-estimate-total { text-align: right; padding: 10px 16px; border-radius: 14px; background: linear-gradient(135deg, #e6f4f9, #eaf7f0); }
.gt-estimate-total b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--gt-teal-dark); }
.gt-estimate-total span { font-size: .78rem; color: var(--gt-muted); }

/* Process Orders: replacement glass */
.gt-box-repl { margin-top: 6px; padding: 5px 9px; border-radius: 8px; background: #fdecec; color: #b42318; font-size: .78rem; font-weight: 600; }
.gt-repl-order { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--gt-bg-soft, #f3f7f9); font-size: .9rem; }
.gt-repl-lines { display: grid; gap: 6px; }
.gt-repl-line { display: grid; grid-template-columns: auto 1.1fr 2fr auto auto; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--gt-border); border-radius: 10px; cursor: pointer; font-size: .88rem; }
.gt-repl-line:has(input:checked) { border-color: #0e7490; box-shadow: 0 0 0 .15rem rgba(14, 116, 144, .18); background: #f2fafc; }
.gt-repl-line input { margin: 0; }
.gt-repl-line .u { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
.gt-repl-line .u em { font-style: normal; font-family: inherit; font-weight: 600; color: var(--gt-muted); margin-left: 4px; }
.gt-repl-line .g small.r { display: block; color: #b42318; font-weight: 600; }
.gt-repl-line .s { font-weight: 700; white-space: nowrap; }
.gt-repl-line .q { text-align: right; white-space: nowrap; }
.gt-repl-line .q small { display: block; color: var(--gt-muted); font-size: .72rem; }
@media (max-width: 767.98px) { .gt-repl-line { grid-template-columns: auto 1fr auto; } .gt-repl-line .g { grid-column: 2 / -1; } }
