:root {
    --sm-primary: #2563eb;
    --sm-primary-dark: #1d4ed8;
    --sm-primary-soft: #eff6ff;
    --sm-sidebar: #0f172a;
    --sm-bg: #f6f8fc;
    --sm-border: #dbe5f3;
    --sm-text: #172033;
    --sm-muted: #64748b;
    --sm-sidebar-width: 270px;
}

.admin-body { margin: 0; overflow-x: hidden; background: var(--sm-bg); color: var(--sm-text); }
.admin-shell { min-height: 100vh; display: flex; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1040; width: var(--sm-sidebar-width); display: flex; flex-direction: column; color: #dce8e1; background: var(--sm-sidebar); transition: transform .2s ease; }
.admin-sidebar-brand { min-height: 104px; display: flex; align-items: center; gap: 15px; padding: 16px 22px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.09); text-decoration: none; }
.admin-sidebar-brand:hover { color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 15px; }
.logo-wrapper { width: 72px; height: 72px; min-width: 72px; min-height: 72px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; background: #fff; flex-shrink: 0; color: var(--sm-primary-dark); }
.logo-wrapper img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.logo-wrapper svg { max-width: 52px; max-height: 52px; width: auto; height: auto; fill: currentColor; display: block; }
.brand-info { flex: 1; min-width: 0; line-height: 1.18; }
.brand-info h5 { margin: 0; color: inherit; font-size: 1rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-info small { display: block; margin-top: 4px; color: #b7c7e5; font-size: .73rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-brand-logo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: #fff; color: var(--sm-primary-dark); font-weight: 800; }
.admin-brand-logo svg { width: 24px; height: 24px; fill: currentColor; }
.admin-brand-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; border-radius: inherit; object-fit: contain; }
.admin-sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px 24px; scrollbar-width: none; -ms-overflow-style: none; }
.admin-sidebar-nav::-webkit-scrollbar { display: none; }
.admin-nav-group + .admin-nav-group { margin-top: 20px; }
.admin-nav-label { padding: 0 11px 7px; color: #8ba3c7; font-size: .67rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.admin-nav-link { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 8px 11px; border-radius: 9px; color: #c9d9d0; font-size: .89rem; font-weight: 600; text-decoration: none; }
.admin-nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.admin-nav-link.active { color: #fff; background: var(--sm-primary); box-shadow: 0 7px 16px rgba(0,0,0,.14); }
.admin-nav-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.09); font-size: .9rem; }
.admin-nav-symbol svg { width: 17px; height: 17px; fill: currentColor; }
.admin-nav-link.active .admin-nav-symbol { background: rgba(255,255,255,.18); }
.admin-sidebar-footer { padding: 15px 22px; border-top: 1px solid rgba(255,255,255,.09); }
.admin-sidebar-footer a { color: #9fcdb4; font-size: .8rem; text-decoration: none; }
.admin-stage { width: calc(100% - var(--sm-sidebar-width)); min-height: 100vh; margin-left: var(--sm-sidebar-width); display: flex; flex-direction: column; }
.admin-topbar { min-height: 76px; display: flex; align-items: center; gap: 14px; padding: 12px 26px; background: #fff; border-bottom: 1px solid var(--sm-border); }
.admin-topbar-title { flex: 1; line-height: 1.2; }
.admin-topbar-title strong { font-size: 1.05rem; }
.admin-user { display: flex; align-items: center; gap: 10px; }
.admin-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--sm-primary-soft); color: var(--sm-primary-dark); font-weight: 800; }
.admin-user-copy { line-height: 1.1; }
.admin-user-copy strong, .admin-user-copy span { display: block; }
.admin-user-copy strong { font-size: .82rem; }
.admin-user-copy span { margin-top: 3px; color: var(--sm-muted); font-size: .7rem; }
.admin-menu-toggle { display: none; width: 38px; height: 38px; border: 1px solid var(--sm-border); border-radius: 8px; color: var(--sm-text); background: #fff; }
.admin-breadcrumb-wrap { background: #fff; border-bottom: 1px solid var(--sm-border); }
.admin-breadcrumb-wrap .breadcrumb { --bs-breadcrumb-divider-color: #a2afa8; color: var(--sm-muted); }
.admin-breadcrumb-wrap .breadcrumb a { color: var(--sm-primary); font-weight: 600; text-decoration: none; }
.admin-breadcrumb-wrap .breadcrumb a:hover { color: var(--sm-primary-dark); text-decoration: underline; }
.admin-breadcrumb-wrap .breadcrumb-item.active { color: var(--sm-muted); }
.admin-content { flex: 1; width: 100%; max-width: 1600px; padding: 26px; margin: 0 auto; }
.admin-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 15px; padding: 18px 26px; color: var(--sm-muted); background: #fff; border-top: 1px solid var(--sm-border); font-size: .78rem; }
.admin-footer-link { color: var(--sm-primary); font-weight: 800; text-decoration: none; }
.admin-footer-link:hover { color: var(--sm-primary-dark); text-decoration: underline; }
.admin-sidebar-overlay { display: none; }

.admin-content > .container, .admin-content > main.container, .admin-content > div.container { max-width: none; padding: 0; margin: 0; }
.admin-content .card { border-color: var(--sm-border); border-radius: 13px; }
.admin-content .shadow-sm { box-shadow: 0 8px 24px rgba(20,45,32,.06) !important; }
.admin-content .table-responsive { border-radius: 12px; }
.admin-content .table { margin-bottom: 0; }
.admin-content .table > :not(caption) > * > * { padding: .8rem .75rem; border-color: #edf1ef; }
.admin-content .table thead th, .admin-content .table > tbody:first-child > tr:first-child > th { color: #596860; background: #f7faf8; font-size: .74rem; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.admin-content .admin-data-table { min-width: 860px; }
.admin-content .product-data-table { min-width: 720px; }
.admin-content .order-data-table { min-width: 980px; }
.admin-content .admin-data-table tbody td { vertical-align: middle; }
.admin-content .cell-description { max-width: 420px; overflow: hidden; color: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; overflow-wrap: anywhere; }
.admin-content .text-keep { overflow-wrap: anywhere; }
.admin-content .table-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-content .table-actions .btn { white-space: nowrap; }
.admin-content .optional-upload { padding: 14px 16px; border: 1px dashed #c9d8d0; border-radius: 10px; background: #fbfdfc; }
.admin-content .optional-upload summary { cursor: pointer; color: var(--sm-primary-dark); font-weight: 700; }
.admin-content .section-label { color: var(--sm-primary-dark); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-content .brand-preview { display: flex; align-items: center; gap: 15px; padding: 18px; border-radius: 14px; color: #fff; background: var(--sm-sidebar); }
.admin-content .brand-preview-logo { width: 72px; height: 72px; min-width: 72px; min-height: 72px; border-radius: 12px; }
.admin-content .brand-preview .brand-info h5 { font-size: 1.15rem; }
.admin-content .brand-preview .brand-info small { margin-top: 4px; color: #abc2b6; }
.admin-content .form-control, .admin-content .form-select { min-height: 43px; border-color: #d8e1dc; border-radius: 8px; }
.admin-content .form-control:focus, .admin-content .form-select:focus { border-color: #60a5fa; box-shadow: 0 0 0 .2rem rgba(37,99,235,.12); }
.admin-content .btn { border-radius: 8px; font-weight: 600; }
.admin-content .btn-primary, .admin-content .btn-success { background-color: var(--sm-primary); border-color: var(--sm-primary); }
.admin-content .btn-primary:hover, .admin-content .btn-success:hover { background-color: var(--sm-primary-dark); border-color: var(--sm-primary-dark); }
.admin-body .btn-success, .auth-body .btn-success { background-color: var(--sm-primary); border-color: var(--sm-primary); }
.admin-body .btn-success:hover, .auth-body .btn-success:hover { background-color: var(--sm-primary-dark); border-color: var(--sm-primary-dark); }
.admin-body .text-success, .auth-body .text-success { color: var(--sm-primary) !important; }
.admin-body .bg-success, .auth-body .bg-success { background-color: var(--sm-primary) !important; }
.admin-body .btn-outline-success, .auth-body .btn-outline-success { color: var(--sm-primary); border-color: var(--sm-primary); }
.admin-body .btn-outline-success:hover, .auth-body .btn-outline-success:hover { color: #fff; background-color: var(--sm-primary); border-color: var(--sm-primary); }
.admin-body .text-bg-success, .auth-body .text-bg-success { color: #fff !important; background-color: var(--sm-primary) !important; }
.admin-body .alert-success, .auth-body .alert-success { color: #1e3a8a; background-color: var(--sm-primary-soft); border-color: #bfdbfe; }
.admin-body .border-success, .auth-body .border-success { border-color: var(--sm-primary) !important; }
.admin-content .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.admin-content .page-heading h1 { margin-bottom: 4px; font-size: 1.55rem; font-weight: 700; }
.admin-content .page-heading p { margin-bottom: 0; color: var(--sm-muted); }

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-stage { width: 100%; margin-left: 0; }
    .admin-menu-toggle { display: inline-grid; place-items: center; }
    .admin-body.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-sidebar-overlay { position: fixed; inset: 0; z-index: 1030; width: 100%; height: 100%; border: 0; background: rgba(9,24,16,.48); }
    .admin-body.sidebar-open .admin-sidebar-overlay { display: block; }
}

@media (max-width: 575.98px) {
    .admin-content { padding: 18px 14px; }
    .admin-topbar { min-height: 66px; padding: 10px 14px; }
    .admin-user-copy { display: none; }
    .admin-user .btn { padding: .3rem .5rem; }
    .admin-footer { flex-direction: column; padding: 14px; }
    .admin-content .page-heading { align-items: stretch; flex-direction: column; }
}

@media print {
    .admin-sidebar, .admin-topbar, .admin-breadcrumb-wrap, .admin-footer, .admin-sidebar-overlay { display: none !important; }
    .admin-stage { width: 100%; margin: 0; }
    .admin-content { max-width: none; padding: 0; }
}

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #e0efff 0, transparent 38%), linear-gradient(135deg, #f8fbff, #edf4ff); }
.auth-shell { width: min(100%, 960px); display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border: 1px solid var(--sm-border); border-radius: 20px; background: #fff; box-shadow: 0 24px 60px rgba(16,38,28,.12); }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; min-height: 540px; padding: 42px; color: #fff; background: linear-gradient(145deg, #0f172a, #2563eb); }
.auth-brand-logo { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 14px; color: var(--sm-primary-dark); background: #fff; font-weight: 800; }
.card .auth-brand-logo { color: var(--sm-primary-dark); background: var(--sm-primary-soft); }
.auth-brand-logo img { width: 100%; height: 100%; display: block; object-fit: contain; padding: 5px; border-radius: inherit; background: #fff; }
.object-fit-cover { object-fit: cover; }
.auth-brand h1 { font-size: 2rem; font-weight: 750; }
.auth-brand p { color: #c9ded2; }
.auth-brand small { color: #9fc2af; }
.auth-panel { display: flex; align-items: center; padding: 42px; }
.auth-panel-inner { width: 100%; max-width: 420px; margin: auto; }
.auth-panel .form-control { min-height: 46px; border-radius: 9px; }
.auth-panel .btn { min-height: 44px; border-radius: 9px; font-weight: 700; }
.auth-help-card { position: relative; display: flex; gap: 14px; margin-top: 24px; padding: 18px; overflow: hidden; border: 1px solid #bfdbfe; border-radius: 12px; background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 100%); box-shadow: inset 4px 0 0 #2563eb, 0 12px 28px rgba(30,64,175,.08); }
.auth-help-card::after { content: ''; position: absolute; right: -36px; top: -44px; width: 120px; height: 120px; border-radius: 999px; background: rgba(37,99,235,.08); pointer-events: none; }
.auth-help-mark { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 12px; background: #2563eb; color: #fff; font-size: .82rem; font-weight: 900; letter-spacing: 0; box-shadow: 0 10px 22px rgba(37,99,235,.24); }
.auth-help-content { position: relative; z-index: 1; min-width: 0; }
.auth-help-kicker { margin-bottom: 4px; color: #2563eb; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.auth-help-title { margin-bottom: 5px; color: #0f172a; font-size: .98rem; font-weight: 900; line-height: 1.3; }
.auth-help-copy { margin-bottom: 12px; color: #475569; font-size: .84rem; line-height: 1.6; }
.auth-help-actions { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-help-link { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 10px; border-radius: 9px; font-size: .8rem; font-weight: 900; line-height: 1.2; text-align: center; text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease; }
.auth-help-link:hover { transform: translateY(-1px); }
.auth-help-link-phone { border: 1px solid #bfdbfe; background: #fff; color: #1d4ed8; }
.auth-help-link-phone:hover { border-color: #2563eb; background: #2563eb; color: #fff; }
.auth-help-static { cursor: default; user-select: text; }
.auth-help-static:hover { border-color: #bfdbfe; background: #fff; color: #1d4ed8; transform: none; }
.auth-help-link-wa { border: 1px solid #bbf7d0; background: #16a34a; color: #fff; }
.auth-help-link-wa:hover { border-color: #15803d; background: #15803d; color: #fff; }
.auth-help-address { margin-top: 10px; color: #64748b; font-size: .75rem; line-height: 1.45; }
.auth-brand .auth-help-card { margin-top: 26px; margin-bottom: 22px; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); box-shadow: inset 4px 0 0 rgba(255,255,255,.7), 0 16px 34px rgba(15,23,42,.2); backdrop-filter: blur(8px); }
.auth-brand .auth-help-card::after { background: rgba(255,255,255,.1); }
.auth-brand .auth-help-mark { background: #fff; color: #1d4ed8; box-shadow: 0 10px 22px rgba(15,23,42,.16); }
.auth-brand .auth-help-kicker { color: #bfdbfe; }
.auth-brand .auth-help-title { color: #fff; }
.auth-brand .auth-help-copy { color: #dbeafe; }
.auth-brand .auth-help-actions { grid-template-columns: 1fr; }
.auth-brand .auth-help-link-phone,
.auth-brand .auth-help-static:hover { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.96); color: #1d4ed8; }
.auth-brand .auth-help-address { color: #c7d2fe; }

@media (max-width: 767.98px) {
    .auth-shell { display: block; max-width: 520px; }
    .auth-brand { min-height: auto; padding: 28px; }
    .auth-brand-copy p, .auth-brand > small { display: none; }
    .auth-brand-logo { width: 42px; height: 42px; margin-bottom: 14px; }
    .auth-brand h1 { font-size: 1.45rem; }
    .auth-panel { padding: 28px; }
    .auth-help-card { flex-direction: column; }
    .auth-help-actions { grid-template-columns: 1fr; }
}
