/* ==========================================================================
   QUEEN PLUS PERDE - BAYI PORTALI & YÖNETİM STYLESHEET (bayi.css)
   Modern Executive Indigo-Slate & Obsidian Noir Theme
   Subtle Architectural Curves (5% Radius = 6px) | Full-Width White Logo
   Permanently Fixed Desktop Sidebar & Mobile Off-Canvas Architecture
   ========================================================================== */

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #eff6ff;
    --nav: #090d16;
    --nav-2: #0f172a;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #2563eb;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --shadow-auth: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    --sidebar: 270px;
    font-family: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    font-synthesis: none;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    font-size: 13.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--brand-dark);
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}
button {
    cursor: pointer;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Shell */
.shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

/* Permanently Fixed Desktop Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar);
    min-width: var(--sidebar);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%);
    color: #ffffff;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    z-index: 40;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

/* Full Width Centered White Logo in Desktop Sidebar */
.brand {
    padding: 10px 10px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}

.brand-logo {
    width: 100%;
    max-width: 215px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block;
    margin: 0 auto;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-link:hover .brand-logo {
    transform: scale(1.02);
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #94a3b8;
    padding: 9px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    position: relative;
    transition: all 0.15s ease;
}

.side-nav a span {
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: #64748b;
    transition: color 0.15s ease;
}

.side-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}
.side-nav a:hover span {
    color: #60a5fa;
}

.side-nav a.is-active {
    background: rgba(37, 99, 235, 0.14);
    color: #93c5fd;
    font-weight: 700;
    border-left: 3px solid var(--brand);
    border-radius: 0 6px 6px 0;
    padding-left: 9px;
}
.side-nav a.is-active span {
    color: #60a5fa;
}

.side-nav .badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    background: var(--brand);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
}

.sidebar-foot {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 8px 4px;
    flex-shrink: 0;
}

.sidebar-foot small {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-button {
    border: 0;
    background: none;
    color: #cbd5e1;
    padding: 6px 0;
    font-weight: 600;
    font-size: 12.5px;
    transition: color 0.15s ease;
}
.link-button:hover {
    color: #ffffff;
}

/* Page Area (Offset by fixed sidebar) */
.page-area {
    margin-left: var(--sidebar);
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: calc(100vw - var(--sidebar));
}

.topbar {
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.2;
}

.topbar p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.top-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.secure-pill, .notification-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
}

.secure-pill {
    background: #ecfdf5;
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.notification-pill {
    background: #fffbeb;
    color: var(--warning);
    border: 1px solid #fde68a;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    font-size: 18px;
    color: var(--ink);
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}
.menu-toggle:active {
    background: var(--surface-2);
}

.main-content {
    padding: 24px 28px 48px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.page-footer {
    margin-top: auto;
    padding: 14px 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    background: #ffffff;
}

.drawer-backdrop {
    display: none;
}

/* ==========================================================================
   GUEST & AUTH PAGES (5% Radius, Sapphire Glow)
   ========================================================================== */
.guest-main {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 30px 16px;
    background: radial-gradient(circle at 50% 20%, #172554 0%, #090d16 100%);
    position: relative;
}

.auth-card {
    width: min(100%, 460px);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 36px 30px;
    box-shadow: var(--shadow-auth);
}

.auth-logo {
    text-align: center;
    margin-bottom: 20px;
}
.auth-logo img {
    max-height: 52px;
    max-width: 220px;
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}

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

.auth-head {
    margin-bottom: 20px;
}

.auth-head h1 {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.2;
    margin: 6px 0 8px;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.auth-head p {
    color: var(--muted);
    margin: 0;
    font-size: 13px;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    font-weight: 600;
    font-size: 12.5px;
}

.security-note, .info-box, .note-box, .credit-box {
    border-radius: 6px;
    padding: 12px 14px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    border: 1px solid var(--line);
}

.security-note {
    margin-top: 20px;
}

.eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: var(--brand);
    text-transform: uppercase;
}

/* ==========================================================================
   PANELS, METRICS & FORMS (5% Radius)
   ========================================================================== */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 20px;
}

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

.panel-head h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

.alert {
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 13px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
}

.error-list {
    color: var(--danger);
    text-align: left;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.form-grid .full {
    grid-column: 1 / -1;
}

.form-grid label, .form-stack label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
}

.form-grid label small, .form-stack label small {
    font-weight: 500;
    color: var(--muted);
}

input, select, textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: var(--ink);
    padding: 9px 12px;
    font-size: 13.5px;
    outline: none;
    transition: border 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

input:disabled, button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

.section-title {
    font-size: 13px;
    font-weight: 800;
    border-bottom: 1px solid var(--line);
    padding: 6px 0 8px;
    margin-top: 4px;
    color: var(--ink);
}

.check-row {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 8px !important;
}
.check-row input {
    width: auto;
    margin-top: 3px;
}

.check-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0;
}
.check-stack label {
    flex-direction: row;
    align-items: center;
}
.check-stack input {
    width: auto;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Buttons (5% Radius) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand-dark);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.32);
    color: #ffffff;
}

.btn-secondary {
    background: var(--nav);
    border-color: var(--nav);
    color: #ffffff;
}
.btn-secondary:hover {
    background: var(--nav-2);
}

.btn-ghost {
    background: #ffffff;
    border-color: var(--line);
    color: var(--ink);
}
.btn-ghost:hover {
    background: var(--surface-2);
    border-color: #cbd5e1;
}

.btn-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 5px 10px;
    font-size: 11.5px;
    border-radius: 4px;
}

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

/* Metrics */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.metric-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.metric:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.metric span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.metric strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin: 6px 0 2px;
    letter-spacing: -0.02em;
}

.metric small {
    color: var(--muted);
    font-size: 11.5px;
}

.metric a {
    margin-top: 8px;
    font-weight: 700;
    font-size: 12px;
}

.financial {
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}

/* Announcements */
.announcement-list {
    display: grid;
    gap: 10px;
}

.announcement {
    border-left: 4px solid var(--info);
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.announcement p { margin: 4px 0; }
.announcement small { color: var(--muted); }

.severity-warning { border-left-color: var(--warning); background: #fffbeb; }
.severity-critical { border-left-color: var(--danger); background: #fef2f2; }
.severity-success { border-left-color: var(--success); background: #ecfdf5; }

/* Tables (5% Radius) */
.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

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

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

th {
    background: #f8fafc;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: 0;
}
tbody tr:hover {
    background: #f8fafc;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.status {
    display: inline-flex;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--line);
}

.status-active, .status-confirmed, .status-completed, .status-delivered, .status-approved, .status-shipped {
    background: #ecfdf5;
    color: var(--success);
    border-color: #a7f3d0;
}

.status-pending_review, .status-awaiting_approval, .status-awaiting_payment, .status-pending, .status-held, .status-queued {
    background: #fffbeb;
    color: var(--warning);
    border-color: #fde68a;
}

.status-suspended, .status-rejected, .status-cancelled, .status-closed, .status-disabled {
    background: #fef2f2;
    color: var(--danger);
    border-color: #fecaca;
}

.status-processing, .status-cutting, .status-sewing, .status-quality, .status-packed {
    background: #eff6ff;
    color: var(--info);
    border-color: #bfdbfe;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 8px;
    max-width: 600px;
    flex: 1;
}

.toolbar-note {
    color: var(--muted);
    font-size: 12.5px;
}

/* Products & Detail (5% Radius) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.product-image {
    height: 180px;
    background: #f1f5f9;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--brand-dark);
    font-weight: 800;
    letter-spacing: 0.1em;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}
.product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 10.5px;
}

.product-card h2 {
    font-size: 14.5px;
    font-weight: 700;
    margin: 6px 0 4px;
}
.product-card h2 a { color: var(--ink); }

.product-card p {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 12px;
}

.product-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    gap: 10px;
}

.product-foot strong {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--brand);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(440px, 1.15fr);
    gap: 20px;
}

.product-visual, .config-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.product-visual > img, .image-placeholder {
    aspect-ratio: 4/3;
    width: 100%;
    object-fit: cover;
    border-radius: 6px;
    background: #f1f5f9;
}

.image-placeholder {
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--brand-dark);
    font-size: 24px;
    font-weight: 900;
}

.detail-copy h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 6px 0;
}
.detail-copy p { color: var(--muted); }

.detail-copy dl, .detail-list {
    display: grid;
    gap: 8px;
}

.detail-copy dl div, .detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 7px 0;
}
.detail-copy dt, .detail-list dt { color: var(--muted); }
.detail-copy dd, .detail-list dd { margin: 0; font-weight: 700; }

.price-preview {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.price-preview strong { font-size: 18px; color: var(--brand-dark); }
.price-preview span { font-size: 11px; color: var(--muted); }

/* Cart (5% Radius) */
.cart-list { display: grid; gap: 10px; }

.cart-line {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 170px auto auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 14px;
}
.cart-line h3 { margin: 4px 0; font-size: 14px; }
.cart-line p, .cart-line small { margin: 0; color: var(--muted); }

.line-tag {
    display: inline-flex;
    padding: 3px 6px;
    border-radius: 4px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 10px;
    font-weight: 800;
}

.cart-price {
    text-align: right;
    display: flex;
    flex-direction: column;
}
.cart-price strong { font-size: 16px; color: var(--ink); }
.cart-price span, .cart-price small { font-size: 11px; color: var(--muted); }

.inline-form, .inline-fields {
    display: flex;
    align-items: center;
    gap: 8px;
}
.inline-form input, .inline-form select {
    width: auto;
    min-width: 70px;
}
.inline-fields { flex-wrap: wrap; }
.inline-fields > * { width: auto; min-width: 130px; flex: 1; }

.summary-box {
    margin: 16px 0 0 auto;
    max-width: 380px;
    background: var(--surface-2);
    border-radius: 6px;
    border: 1px solid var(--line);
    padding: 14px;
}
.summary-box div, .summary-line {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 6px 0;
}
.summary-box .grand, .summary-line.grand {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 800;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 20px;
}
.order-summary { position: sticky; top: 88px; height: max-content; }
.credit-box { margin-top: 12px; display: flex; justify-content: space-between; }

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}
.detail-header h2 { font-size: 22px; font-weight: 800; margin: 2px 0; }
.detail-header p { margin: 0; color: var(--muted); }
.detail-total { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.detail-total strong { font-size: 21px; color: var(--brand-dark); }

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

.order-items { display: grid; gap: 10px; }
.order-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 12px 14px;
}
.order-item h3 { margin: 4px 0; font-size: 13.5px; }
.order-item p { margin: 0; color: var(--muted); }
.spec-list { padding-left: 18px; margin: 6px 0; color: #475569; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 10px;
    position: relative;
    padding-bottom: 16px;
}
.timeline li > span {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}
.timeline li:not(:last-child):before {
    content: "";
    position: absolute;
    left: 4.5px;
    top: 15px;
    bottom: 2px;
    width: 1px;
    background: #cbd5e1;
}

/* Kanban (5% Radius) */
.kanban {
    display: grid;
    grid-template-columns: repeat(9, minmax(210px, 1fr));
    gap: 10px;
    overflow: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.compact-kanban { grid-template-columns: repeat(9, minmax(190px, 1fr)); }

.kanban-column {
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    min-height: 200px;
}
.kanban-column h3 {
    display: flex;
    justify-content: space-between;
    margin: 0 0 8px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
}
.kanban-column h3 b {
    background: #ffffff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10.5px;
}

.job-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 7px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.job-card > span { font-size: 10px; color: var(--brand-dark); font-weight: 800; }
.job-card small, .job-card p { color: var(--muted); margin: 0; font-size: 10.5px; }

/* Documents, Addresses, Members (5% Radius) */
.document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.document-card {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 12px;
}
.doc-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
}

.address-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.address-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 12px;
}
.address-card span { font-size: 10px; color: var(--brand); font-weight: 800; text-transform: uppercase; }

.member-list { display: grid; gap: 8px; }
.member-card {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 10px 12px;
}
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: var(--nav);
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
}

.ticket-list { display: grid; }
.ticket-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.ticket-row:hover { background: var(--surface-2); text-decoration: none; }

.messages { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.message {
    max-width: 75%;
    border-radius: 6px;
    padding: 10px 12px;
    background: #e2e8f0;
    font-size: 13px;
}
.message-dealer { align-self: flex-end; background: var(--brand-soft); border: 1px solid var(--line); }

.state-card {
    max-width: 580px;
    margin: 8vh auto;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 36px 28px;
    box-shadow: var(--shadow-card);
}
.state-code { font-size: 64px; line-height: 1; font-weight: 900; color: #cbd5e1; }
.status-orb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: #fde68a;
    box-shadow: 0 0 0 8px #fffbeb;
}
.status-orb.status-active { background: #a7f3d0; box-shadow: 0 0 0 8px #ecfdf5; }

.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checklist div {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-2);
    border-radius: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
}
.checklist b {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: var(--nav);
    color: #ffffff;
    font-size: 11px;
}

.action-panel { display: flex; justify-content: space-between; align-items: center; gap: 18px; }

.list-links { display: grid; gap: 6px; margin-top: 14px; }
.list-links a {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--ink);
}
.list-links a.is-active { border-color: var(--brand); background: var(--brand-soft); }

.order-admin-list { display: grid; gap: 8px; }
.admin-order {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 12px 14px;
}

.change-list { display: grid; gap: 10px; }
.change-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    padding: 12px 14px;
}

.diff-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.diff-grid div {
    display: grid;
    grid-template-columns: 100px 1fr 1fr;
    gap: 6px;
    background: var(--surface-2);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--line);
}
.diff-grid del { color: var(--danger); }
.diff-grid ins { color: var(--success); text-decoration: none; font-weight: 700; }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 4px;
}

.hide { display: none !important; }

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Specialized Mobile & Tablet Layout)
   ========================================================================== */
@media (max-width: 1280px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-order { grid-template-columns: 1fr auto; }
    .admin-order form { grid-column: 1 / -1; }
    .address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    :root { --sidebar: 270px; }
    .shell { display: block; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        width: min(85vw, 290px);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.4);
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom, 24px);
    }
    body.drawer-open .sidebar { transform: translateX(0); }
    .drawer-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(3, 7, 18, 0.75);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        z-index: 95;
    }
    body.drawer-open .drawer-backdrop { display: block; }
    .menu-toggle { display: inline-flex; }
    .page-area {
        margin-left: 0;
        max-width: 100vw;
    }
    .topbar { padding: 0 16px; height: 56px; }
    .main-content { padding: 18px 14px 40px; }
    .page-footer { padding: 12px 14px; flex-direction: column; gap: 4px; }
}

@media (max-width: 650px) {
    body { font-size: 13px; }
    .top-actions .secure-pill { display: none; }
    .topbar h1 { font-size: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .metric-grid, .metric-grid.two, .product-grid, .address-grid, .checklist { grid-template-columns: 1fr; gap: 12px; }
    .product-image { height: 170px; }
    .toolbar, .panel-head { align-items: flex-start; flex-direction: column; gap: 10px; }
    .search-form { width: 100%; flex-wrap: wrap; }
    .search-form input { flex: 1; min-width: 160px; height: 44px; font-size: 14px; }
    .panel { padding: 14px; }
    .auth-card { padding: 24px 18px; width: 100%; }
    .auth-links { flex-direction: column; gap: 10px; }
    .guest-main { padding: 20px 12px; }
    .cart-line { grid-template-columns: 1fr; }
    .cart-price { text-align: left; }
    .inline-form { flex-wrap: wrap; }
    .detail-header { align-items: flex-start; flex-direction: column; }
    .detail-total { align-items: flex-start; text-align: left; margin-top: 10px; }
    .order-item { flex-direction: column; }
    .order-item .right { text-align: left; }
    .member-card { grid-template-columns: 38px 1fr; }
    .member-actions { grid-column: 1 / -1; flex-wrap: wrap; }
    .ticket-row { grid-template-columns: auto 1fr; }
    .ticket-row > small { grid-column: 2; }
    .message { max-width: 92%; }
    .admin-order { grid-template-columns: 1fr; }
    .diff-grid { grid-template-columns: 1fr; }
    .diff-grid div { grid-template-columns: 1fr; }
    .page-footer { flex-direction: column; gap: 3px; }
    input, select, textarea {
        height: 44px;
        font-size: 14px;
    }
    .btn {
        padding: 9px 14px;
    }
}

@media print {
    .sidebar, .topbar, .page-footer, .btn, .inline-form, .drawer-backdrop { display: none !important; }
    .shell { display: block; }
    .main-content { padding: 0; }
    .panel { box-shadow: none; border: 0; padding: 0; }
    .metric-grid { display: none; }
    body { background: #ffffff; }
    table { min-width: 0; font-size: 10px; }
    .print-panel { display: block; }
}
