:root {
    color-scheme: light;
    --bg: #eef3fb;
    --ink: #0f172a;
    --muted: #64748b;
    --card: #ffffff;
    --line: #e2e8f0;
    --blue: #0b7cff;
    --deep: #061327;
    --green: #12b981;
    --red: #ef4444;
    --amber: #f59e0b;
}

/* Centro de control web K-POS */
.app-shell {
    grid-template-columns: 288px minmax(0, 1fr);
    background: #f3f7fc;
}
.sidebar {
    background: radial-gradient(circle at 10% 0%, rgba(19, 124, 255, .24), transparent 34%), linear-gradient(180deg, #07162d 0%, #08152a 52%, #061124 100%);
    padding: 24px 16px;
    box-shadow: inset -1px 0 0 rgba(255,255,255,.08);
    overflow-y: auto;
}
.logo-row { margin: 0 8px 28px; }
.sidebar-logo { width: 180px; border-radius: 12px; }
.main-nav { display: grid; gap: 7px; }
.main-nav a, .logout {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dbeafe;
    font-weight: 800;
    border-radius: 12px;
}
.main-nav a span { width: 24px; text-align: center; color: #f8fbff; font-weight: 900; }
.main-nav a em {
    margin-left: auto;
    min-width: 24px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-style: normal;
    font-size: 12px;
}
.main-nav a.active, .main-nav a:hover {
    background: linear-gradient(135deg, #0b7cff, #0f54d8);
    color: white;
    box-shadow: 0 14px 30px rgba(11, 124, 255, .25);
}
.sidebar-store, .sidebar-user {
    margin: 18px 8px 0;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.05);
}
.sidebar-store strong, .sidebar-store span, .sidebar-user strong, .sidebar-user span { display: block; }
.sidebar-store span, .sidebar-user span { color: #cbd5e1; margin-top: 4px; }
.sidebar-store small { display: flex; align-items: center; gap: 7px; color: #c7f9d4; margin-top: 9px; }
.sidebar-store i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.sidebar-user { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #2563eb;
    font-weight: 900;
}
.logout { margin: 14px 8px 0; }
.dashboard { padding: 24px 28px; background: #f3f7fc; }
.live-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 28px; color: #07162d; }
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #dcfce7;
    color: #047857;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
}
.live-pill i { width: 8px; height: 8px; background: #16a34a; border-radius: 50%; }
.store-select {
    height: 50px;
    min-width: 162px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    color: #0f172a;
}
.live-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.dashboard-filter-bar {
    display: grid;
    grid-template-columns: minmax(150px, 190px) 150px 150px 112px minmax(170px, 1fr);
    gap: 10px;
    align-items: end;
    margin: 0 0 16px;
    padding: 12px;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: #f8fbff;
}
.dashboard-filter-bar label {
    display: grid;
    gap: 5px;
    color: #516783;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.dashboard-filter-bar select,
.dashboard-filter-bar input {
    height: 40px;
    border: 1px solid #d7e2f0;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    padding: 0 10px;
    font-weight: 800;
}
.dashboard-filter-bar button {
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: #0b7cff;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.dashboard-filter-bar span {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 9px;
    background: #eef6ff;
    color: #0b4ea2;
    font-size: 12px;
    font-weight: 900;
}
.live-kpi {
    position: relative;
    min-height: 170px;
    padding: 18px;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    background: white;
    overflow: visible;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .04);
    display: flex;
    flex-direction: column;
}
.kpi-head { display: flex; align-items: flex-start; gap: 12px; min-width: 0; width: 100%; }
.live-kpi .kpi-head > div:last-child { flex: 1; min-width: 0; }
.live-kpi .kpi-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    margin-bottom: 0;
    background: #eff6ff;
    color: #0b7cff;
    font-size: 22px;
    font-weight: 900;
}
.live-kpi.green .kpi-icon { background: #dcfce7; color: #059669; }
.live-kpi.purple .kpi-icon { background: #f3e8ff; color: #7c3aed; }
.live-kpi.orange .kpi-icon { background: #fff7ed; color: #f97316; }
.live-kpi.cyan .kpi-icon { background: #ccfbf1; color: #0891b2; }
.live-kpi span { color: #50658a; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.live-kpi strong { display: block; margin: 4px 0 2px; color: #08152a; font-size: 26px; }
.live-kpi small { color: #4f6387; }
.kpi-chart { width: 100%; height: 50px; margin-top: auto; padding-top: 14px; align-self: end; color: #0b7cff; }
.live-kpi.green .kpi-chart { color: #10b981; }
.live-kpi.purple .kpi-chart { color: #8b5cf6; }
.live-kpi.orange .kpi-chart { color: #f97316; }
.live-kpi.cyan .kpi-chart { color: #06b6d4; }
.kpi-line { display: block; fill: none; }
.kpi-line path { fill: none; stroke: currentColor; stroke-width: 4; opacity: .9; }
.kpi-bars { display: flex; align-items: end; gap: 8px; padding: 0 8px; }
.kpi-bars i { flex: 1; min-width: 8px; border-radius: 8px 8px 3px 3px; background: currentColor; opacity: .82; }
.kpi-donut {
    width: 56px;
    height: 56px;
    margin-left: auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(currentColor calc(var(--value) * 1%), #e6edf7 0);
    position: relative;
}
.kpi-donut::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.kpi-donut span { position: relative; z-index: 1; font-size: 11px; color: #07162d; }
.control-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(330px, .75fr) minmax(330px, .92fr);
    gap: 16px;
    align-items: start;
}
.control-panel {
    min-width: 0;
    background: white;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .04);
}
.control-panel .panel-head a, .panel-head a {
    color: #0b7cff;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}
.activity-panel { min-height: 458px; }
.right-rail { display: grid; gap: 16px; }
.live-activity-list, .mirror-list { display: grid; gap: 10px; }
.live-activity {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto 56px;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e6edf7;
}
.live-activity:last-child { border-bottom: 0; }
.live-activity > span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #dcfce7;
    color: #047857;
    font-weight: 900;
}
.live-activity.danger > span { background: #fee2e2; color: #dc2626; }
.live-activity.warning > span { background: #fff7ed; color: #f97316; }
.live-activity.request > span { background: #ede9fe; color: #7c3aed; }
.live-activity strong, .live-activity small { display: block; }
.live-activity small { color: #50658a; margin-top: 2px; }
.live-activity b { color: #08152a; }
.live-activity em { color: #50658a; font-style: normal; font-size: 12px; text-align: right; }
.status-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.status-hero > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #059669;
    font-size: 28px;
    font-weight: 900;
}
.status-hero h2 { margin: 0 0 4px; font-size: 18px; }
.status-hero strong { color: #059669; }
.status-list { display: grid; }
.status-list > div {
    display: grid;
    grid-template-columns: 1fr auto 24px;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #e6edf7;
}
.status-list > div:last-child { border-bottom: 0; }
.status-list span { color: #50658a; }
.status-list strong { color: #13213a; font-size: 13px; }
.status-list i {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-style: normal;
    font-size: 11px;
}
.status-list i.ok { background: #dcfce7; color: #059669; }
.status-list i.warn { background: #fff7ed; color: #f97316; }
.pos-preview .pos-screen, .cashier-mirror .pos-screen {
    min-height: 150px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef6ff, #ffffff);
    border: 1px solid #dbe5f2;
}
.pos-screen div { padding: 10px; border-radius: 12px; background: rgba(255,255,255,.72); }
.pos-screen strong, .pos-screen span { display: block; }
.pos-screen span { color: #50658a; margin-top: 3px; font-size: 12px; }
.primary-action { width: 100%; height: 44px; margin: 14px 0 0; background: #0b7cff; }
.alert-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}
.alert-item > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #dcfce7;
    color: #059669;
    font-weight: 900;
}
.alert-item strong, .alert-item small { display: block; }
.alert-item small { color: #50658a; margin-top: 2px; }
.alert-item em { color: #64748b; font-style: normal; font-size: 12px; }
.alert-item.critical > span { background: #fee2e2; color: #dc2626; }
.alert-item.warning > span { background: #fff7ed; color: #f97316; }
.health-score {
    width: 118px;
    height: 118px;
    margin: 4px auto 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#0f9f67 calc(var(--score) * 1%), #e6edf7 0);
    position: relative;
}
.health-score::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: white; }
.health-score strong, .health-score span { position: relative; z-index: 1; grid-area: 1 / 1; }
.health-score strong { font-size: 34px; color: #0f9f67; transform: translateY(-6px); }
.health-score span { color: #50658a; transform: translateY(22px); }
.health-card h3 { margin: 0; text-align: center; color: #0f9f67; }
.health-card p { text-align: center; margin: 6px 0 12px; }
.health-tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.health-tags button { padding: 9px; text-align: center; border: 0; border-radius: 10px; background: #f0fdf4; color: #047857; font-size: 12px; font-weight: 800; cursor: pointer; }
.health-tags button.active, .health-tags button:hover { background: #dbeafe; color: #0b4ee8; }
.health-explain { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; color: #334a72; border: 1px solid #e2e8f0; font-size: 12px; line-height: 1.45; }
.dashboard-charts {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}
.category-chart { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: center; }
.donut { width: 160px; height: 160px; border-radius: 50%; position: relative; }
.donut::after { content: ""; position: absolute; inset: 42px; border-radius: 50%; background: white; }
.category-list { display: grid; gap: 10px; }
.category-row { display: grid; grid-template-columns: 1fr 44px auto; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.category-row:hover { background: #f1f6ff; }
.category-list span { display: flex; align-items: center; gap: 8px; color: #13213a; }
.category-list i { width: 10px; height: 10px; border-radius: 3px; }
.category-list em { color: #50658a; font-style: normal; }
.category-detail { grid-column: 1 / -1; display: grid; gap: 12px; }
.category-detail-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e2e8f0; }
.category-detail-head button { width: auto; height: 34px; margin: 0; padding: 0 12px; border: 0; border-radius: 10px; background: #0b7cff; color: #fff; font-weight: 900; cursor: pointer; }
.category-detail-head strong, .category-detail-head span { display: block; }
.category-detail-head span { color: #64748b; font-size: 12px; margin-top: 2px; }
.product-breakdown { display: grid; gap: 9px; }
.product-breakdown-row { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.product-breakdown-row div { min-width: 0; }
.product-breakdown-row strong, .product-breakdown-row span { display: block; }
.product-breakdown-row span { color: #64748b; font-size: 12px; margin-top: 2px; }
.product-breakdown-row em { color: #0b4ee8; font-style: normal; font-weight: 900; text-align: right; }
.product-breakdown-row i { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: #e6edf7; overflow: hidden; }
.product-breakdown-row i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b7cff, #10b981); }
.empty-state { padding: 24px; border-radius: 14px; background: #f8fafc; color: #50658a; }
.control-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 16px;
    padding: 14px 0;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    background: white;
}
.control-strip div { padding: 0 18px; border-right: 1px solid #dbe5f2; }
.control-strip div:last-child { border-right: 0; }
.control-strip strong, .control-strip span { display: block; }
.control-strip strong { color: #0b4ee8; text-transform: uppercase; font-size: 13px; }
.control-strip span { color: #50658a; margin-top: 4px; font-size: 12px; }
.cashier-mirror { display: grid; gap: 16px; }
.pos-connection {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
    color: #166534;
}
.pos-connection.off {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}
.pos-connection i {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #16a34a;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, .16);
}
.pos-connection.off i {
    background: #dc2626;
    box-shadow: 0 0 0 5px rgba(220, 38, 38, .14);
}
.pos-connection strong {
    font-weight: 900;
}
.pos-connection span {
    margin-left: auto;
    font-size: 12px;
    font-weight: 800;
}
.coming-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.coming-grid div { padding: 18px; border: 1px solid #dbe5f2; border-radius: 14px; background: #f8fafc; }
.coming-grid strong, .coming-grid span { display: block; }
.coming-grid span { margin-top: 6px; color: #50658a; }

@media (max-width: 1280px) {
    .live-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .control-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); }
    .right-rail { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .main-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .live-kpi-grid, .control-grid, .right-rail, .dashboard-charts, .control-strip, .coming-grid { grid-template-columns: 1fr; }
    .control-strip div { border-right: 0; border-bottom: 1px solid #dbe5f2; padding: 12px 18px; }
    .control-strip div:last-child { border-bottom: 0; }
}

@media (max-width: 560px) {
    .dashboard { padding: 16px; }
    .main-nav { grid-template-columns: 1fr; }
    .live-activity { grid-template-columns: 38px minmax(0, 1fr); }
    .live-activity b, .live-activity em { text-align: left; }
    .category-chart { grid-template-columns: 1fr; }
    .pos-preview .pos-screen, .cashier-mirror .pos-screen { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html {
    width: 100%;
    overflow-x: hidden;
}
body {
    width: 100%;
    min-width: 0;
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 20% 0%, #dbeafe 0, transparent 28%), var(--bg);
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
}

.brand-panel {
    background:
        radial-gradient(circle at 68% 22%, rgba(11, 124, 255, .32) 0, transparent 30%),
        linear-gradient(135deg, #020917 0%, #07172e 48%, #09265a 100%);
    color: white;
    display: grid;
    grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr);
    align-items: center;
    align-content: center;
    gap: clamp(22px, 3.6vw, 54px);
    padding: clamp(26px, 4vw, 58px);
    min-width: 0;
    overflow: hidden;
    position: relative;
}
.brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -20% -30% 25%;
    height: 48%;
    background: radial-gradient(circle, rgba(11, 124, 255, .28), transparent 62%);
    pointer-events: none;
}
.brand-copy,
.brand-preview {
    position: relative;
    z-index: 1;
    min-width: 0;
}
.brand-logo {
    width: min(238px, 72vw);
    height: auto;
    margin-bottom: 22px;
    border-radius: 12px;
    object-fit: contain;
}
.eyebrow.light {
    color: #48b5ff;
}
.brand-copy h1 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(34px, 4vw, 62px);
    line-height: 1.02;
    letter-spacing: 0;
}
.brand-lead {
    max-width: 620px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 1.5vw, 23px);
    line-height: 1.45;
}
.brand-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.brand-badges span {
    padding: 10px 13px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #e2e8f0;
    font-weight: 800;
    font-size: 13px;
}
.brand-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 620px;
    margin-top: 24px;
}
.brand-highlights article {
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 14px;
    background: rgba(15, 23, 42, .62);
}
.brand-highlights strong,
.brand-highlights span {
    display: block;
}
.brand-highlights strong {
    font-size: 14px;
    color: white;
}
.brand-highlights span {
    margin-top: 4px;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.35;
}
.brand-preview {
    align-self: center;
    transform: rotate(-.55deg);
}
.hero-carousel {
    position: relative;
    width: min(980px, 100%);
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 26px;
    box-shadow: 0 30px 100px rgba(0,0,0,.42);
    overflow: hidden;
    background: #061327;
}
.hero-carousel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(2, 9, 23, .28), transparent 32%),
        linear-gradient(0deg, rgba(2, 9, 23, .7), transparent 35%);
    pointer-events: none;
}
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity .7s ease, transform 4.5s ease;
}
.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}
.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}
.hero-dots span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.45);
    box-shadow: 0 1px 8px rgba(0,0,0,.25);
}
.hero-dots span.active {
    width: 28px;
    background: #0b7cff;
}
.hero-caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 38px;
    z-index: 2;
    display: grid;
    gap: 4px;
    max-width: 520px;
}
.hero-caption strong {
    font-size: clamp(20px, 2vw, 30px);
    line-height: 1.08;
    color: white;
}
.hero-caption span {
    color: #dbeafe;
    font-size: 14px;
    line-height: 1.35;
}

.brand-mark {
    width: 118px;
    height: 118px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    font-size: 74px;
    font-weight: 900;
    background: linear-gradient(145deg, #1292ff, #0356f5);
    box-shadow: 0 22px 70px rgba(11, 124, 255, .35);
}
.brand-mark.small {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 27px;
}
.brand-panel p { margin: 0; }

.login-card {
    align-self: center;
    margin: clamp(18px, 3vw, 40px);
    padding: clamp(24px, 3vw, 34px);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .12);
    min-width: 0;
}
.login-logo-wrap {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 20px;
    border-radius: 10px;
    padding: 10px 14px;
    background: #061327;
    box-shadow: 0 10px 28px rgba(2, 6, 23, .12);
}
.login-logo {
    width: 210px;
    height: auto;
}
.login-card h2 { margin: 0 0 8px; font-size: 28px; }
.muted { color: var(--muted); }
label { display: block; margin: 18px 0 7px; font-weight: 700; }
input, select {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 12px;
    font: inherit;
    background: white;
}
button {
    width: 100%;
    height: 46px;
    margin-top: 22px;
    border: 0;
    border-radius: 12px;
    background: var(--blue);
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.alert { padding: 12px; border-radius: 10px; margin: 16px 0; }
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.success { background: #dcfce7; color: #047857; }
.forgot-link,
.back-login {
    display: block;
    margin-top: 14px;
    color: var(--blue);
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}
.reset-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at 30% 0%, #1d4ed8 0, transparent 34%), #061327;
}
.reset-card {
    width: min(460px, 100%);
    padding: 32px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: 0 24px 90px rgba(2, 6, 23, .32);
}
.reset-card .login-logo {
    width: 190px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #061327;
    margin-bottom: 20px;
}
.reset-card h1 {
    margin: 0 0 8px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}
.sidebar {
    background: var(--deep);
    color: white;
    padding: 22px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.logo-row { display: flex; gap: 12px; align-items: center; margin-bottom: 30px; }
.logo-row span { display: block; color: #94a3b8; font-size: 12px; }
.sidebar-logo {
    width: 178px;
    height: auto;
    border-radius: 10px;
}
nav { display: grid; gap: 8px; }
nav a, .logout {
    color: #cbd5e1;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
}
nav a.active, nav a:hover { background: rgba(255,255,255,.12); color: white; }
.logout { margin-top: auto; background: rgba(239, 68, 68, .14); color: #fecaca; }

.dashboard {
    min-width: 0;
    padding: 28px;
    overflow-x: hidden;
    overflow-y: auto;
}
.view-section { display: none; }
.view-section.active { display: block; }
.topbar {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}
.topbar > div:first-child { min-width: 0; }
.eyebrow { margin: 0; color: var(--blue); font-weight: 800; text-transform: uppercase; font-size: 12px; }
.topbar h1 { margin: 4px 0 0; font-size: 30px; }
.user-line { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.privacy-toggle {
    width: auto;
    min-width: 130px;
    height: 42px;
    margin: 0;
    padding: 0 14px;
    background: #111827;
}
.sync-state {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
}
#syncDot { width: 12px; height: 12px; border-radius: 50%; background: var(--amber); }
.sync-state small { display: block; color: var(--muted); }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.kpi {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}
.kpi span { color: var(--muted); font-weight: 700; font-size: 12px; }
.kpi strong { display: block; margin-top: 8px; font-size: 25px; }

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 14px;
    min-width: 0;
}
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    min-width: 0;
}
.panel.wide { grid-row: span 2; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h2 { margin: 0; font-size: 18px; }
.panel p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.panel select { width: 130px; }
.panel input[type="search"] { max-width: 240px; }
canvas { width: 100%; max-width: 100%; background: #f8fafc; border-radius: 12px; }

.alert-list { display: grid; gap: 10px; }
.alert-item {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
}
.alert-item.critical { border-color: #fecaca; background: #fff1f2; }
.alert-item.warning { border-color: #fde68a; background: #fffbeb; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.filter-bar {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin: 12px 0 16px;
}
.professional-filter {
    padding: 12px;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: #f8fbff;
}
.filter-bar label {
    display: grid;
    gap: 5px;
    color: #516783;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.filter-bar select,
.filter-bar input {
    min-height: 40px;
    width: 100%;
    border: 1px solid #d7e2f0;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    padding: 0 10px;
    font-size: 13px;
    text-transform: none;
    font-weight: 700;
}
.filter-bar button,
.view-toggle button {
    min-height: 40px;
    border: 1px solid #0b7cff;
    border-radius: 9px;
    background: #0b7cff;
    color: #fff;
    font-weight: 900;
    padding: 0 14px;
    cursor: pointer;
}
.filter-summary {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 9px;
    background: #eef6ff;
    color: #0b4ea2;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.view-toggle {
    display: inline-flex;
    gap: 0;
    border: 1px solid #d7e2f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.view-toggle button {
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #50658a;
}
.view-toggle button.active {
    background: #0b7cff;
    color: #fff;
}
.stock-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(112px, 136px)) minmax(150px, 170px);
    align-items: stretch;
    gap: 10px;
    width: min(100%, 860px);
    margin-left: auto;
    flex: 1 1 680px;
}
.stock-panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
}
.stock-panel-head > div:first-child {
    min-width: 230px;
}
.panel .stock-toolbar input[type="search"] {
    width: 100%;
    max-width: none;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid #d7e2f0;
    border-radius: 10px;
    padding: 0 13px;
    font-weight: 700;
    line-height: 44px;
}
.stock-view-button {
    width: 100%;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid #c7d7ee;
    border-radius: 10px;
    background: #fff;
    color: #253b5f;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 14px;
    margin: 0;
}
.stock-view-button.active {
    border-color: #0b7cff;
    background: #0b7cff;
    color: #fff;
}
.stock-view-button:hover {
    border-color: #0b7cff;
}
.stock-manage-link {
    width: 100%;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 900;
    border-radius: 10px;
    line-height: 1;
    margin: 0;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    gap: 16px;
    align-items: stretch;
}
.product-grid-card {
    min-width: 0;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
    display: grid;
    grid-template-rows: 150px 1fr;
    min-height: 330px;
}
.product-grid-card:hover {
    border-color: #8cc5ff;
    transform: translateY(-1px);
}
.product-card-media {
    position: relative;
    height: 150px;
    display: grid;
    place-items: center;
    padding: 12px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
    border-bottom: 1px solid #e3edf9;
    overflow: hidden;
}
.product-card-media img {
    width: 100%;
    height: 126px;
    max-width: 190px;
    object-fit: contain;
    display: block;
}
.product-card-media .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    box-shadow: 0 7px 16px rgba(15, 23, 42, .12);
}
.product-card-placeholder {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #dbeafe;
    color: #0b4ea2;
    font-size: 24px;
    font-weight: 900;
}
.product-card-body {
    display: grid;
    grid-template-rows: minmax(42px, auto) 20px auto minmax(18px, auto);
    gap: 10px;
    padding: 14px;
    min-width: 0;
}
.product-card-title {
    min-width: 0;
}
.product-card-title strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.28;
}
.product-card-category,
.product-card-supplier {
    color: #64748b;
    min-width: 0;
}
.product-card-category {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.product-card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.product-card-metrics div {
    min-height: 58px;
    padding: 9px 10px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #edf2f8;
}
.product-card-metrics small,
.product-card-metrics b {
    display: block;
}
.product-card-metrics b {
    color: #0f172a;
    margin-top: 3px;
}
.product-card-metrics b.danger {
    color: #dc2626;
}
.product-card-supplier {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-top: 2px;
    border-top: 1px solid #edf2f8;
    line-height: 18px;
}
.products-list {
    display: grid;
    gap: 10px;
}
.product-list-row {
    display: grid;
    grid-template-columns: 58px minmax(180px, 1fr) 92px 116px 82px;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .04);
}
.product-list-row:hover {
    border-color: #8cc5ff;
    background: #f8fbff;
}
.product-list-media {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #edf2f8;
}
.product-list-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-list-placeholder {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #dbeafe;
    color: #0b4ea2;
    font-weight: 900;
}
.product-list-main {
    min-width: 0;
}
.product-list-main strong,
.product-list-main span,
.product-list-metric small,
.product-list-metric b {
    display: block;
}
.product-list-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #0f172a;
}
.product-list-main span,
.product-list-metric small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 12px;
}
.product-list-metric {
    min-width: 0;
}
.product-list-metric b {
    color: #0f172a;
}
.product-list-metric b.danger {
    color: #dc2626;
}
.product-list-state {
    justify-self: end;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; cursor: pointer; user-select: none; }
th:hover { color: var(--blue); }
tr[data-detail] { cursor: pointer; }
tr[data-detail]:hover td { background: #eff6ff; }
.solicitud-form-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.solicitud-form-title h3 {
    margin: 0;
}
.solicitud-form-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 8px;
    background: #eef6ff;
    color: #0b4ea2;
    font-size: 12px;
    font-weight: 900;
}
.solicitud-form-badge.editing {
    background: #fff7ed;
    color: #c2410c;
}
.solicitud-edit-summary {
    display: grid;
    gap: 4px;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #431407;
}
.solicitud-edit-summary span,
.solicitud-edit-summary small {
    color: #7c2d12;
}
.solicitud-edit-table th {
    cursor: default;
}
.solicitud-edit-row td {
    vertical-align: middle;
    background: #fff;
}
.solicitud-edit-row td:first-child strong,
.solicitud-edit-row td:first-child small {
    display: block;
}
.solicitud-edit-row td:first-child small {
    margin-top: 3px;
    color: var(--muted);
}
.solicitud-line-input {
    width: 110px;
    min-height: 36px;
    padding: 8px;
    border: 1px solid #b7c7dc;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
}
.solicitud-line-input:focus {
    outline: 2px solid #93c5fd;
    border-color: #2563eb;
}
.activity-list { display: grid; gap: 10px; }
.activity-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.activity-item strong { display: block; }
.activity-item span { color: var(--muted); font-size: 12px; }
.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 6, 23, .55);
    z-index: 20;
}
.modal[hidden] { display: none; }
.modal-card {
    width: min(620px, 100%);
    max-height: 86vh;
    overflow: auto;
    position: relative;
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 30px 90px rgba(2, 6, 23, .28);
}
.modal-close {
    width: 34px;
    height: 34px;
    margin: 0;
    position: absolute;
    top: 14px;
    right: 14px;
    border-radius: 50%;
    background: #ef4444;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.detail-grid div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}
.detail-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.detail-image-wrap {
    width: 100%;
    min-height: 190px;
    display: grid;
    place-items: center;
    margin: 4px 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--muted);
    overflow: hidden;
}
.solicitud-image-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 8px;
}
.solicitud-image-tools button,
.btn-download-image {
    height: 30px;
    min-width: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    padding: 0 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.detail-image {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    transition: transform .15s ease;
}
.solicitud-image-wrap {
    min-height: 120px;
    max-height: 170px;
}
.solicitud-image {
    max-height: 150px;
    width: auto;
}
.product-thumb {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f8fafc;
    vertical-align: middle;
    margin-right: 8px;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #047857;
    font-weight: 800;
    font-size: 11px;
}
.status-pill.off {
    background: #fee2e2;
    color: #b91c1c;
}
.status-pill.warn {
    background: #fef3c7;
    color: #b45309;
}
.status-pill.danger {
    background: #fee2e2;
    color: #b91c1c;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}
.pagination button {
    width: auto;
    min-width: 96px;
    height: 36px;
    margin: 0;
    padding: 0 12px;
}
.pagination button:disabled {
    opacity: .45;
    cursor: not-allowed;
    filter: grayscale(.25);
}
.sales-pagination {
    justify-content: space-between;
    padding-top: 2px;
}
.sales-pagination span {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 9px;
    background: #f1f6fd;
    color: #274365;
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 900px) {
    .login-shell, .app-shell, .panel-grid { grid-template-columns: 1fr; }
    .brand-panel { grid-template-columns: 1fr; }
    .brand-preview { transform: none; }
    .sidebar { position: static; padding: 14px; }
    nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .logout { margin-top: 12px; text-align: center; }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand-panel { min-height: 260px; }
    .hero-carousel { width: 100%; }
    .dashboard { padding: 16px; }
    .topbar { display: grid; gap: 12px; }
    .top-actions { display: grid; gap: 10px; }
    .privacy-toggle { width: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .panel-head { display: grid; }
    .panel input[type="search"] { max-width: none; }
}

@media (max-width: 560px) {
    .login-shell { display: block; }
    .brand-panel { min-height: 190px; gap: 20px; padding: 22px; }
    .brand-logo { width: 210px; margin-bottom: 18px; }
    .brand-copy h1 { font-size: 38px; }
    .brand-lead { font-size: 16px; }
    .brand-badges { gap: 8px; }
    .brand-highlights { grid-template-columns: 1fr; }
    .hero-caption { left: 14px; right: 14px; bottom: 32px; }
    .hero-caption span { display: none; }
    .brand-mark { width: 76px; height: 76px; font-size: 48px; border-radius: 18px; }
    .login-card { margin: 14px; padding: 22px; }
    .login-logo { width: 180px; }
    .kpi-grid { grid-template-columns: 1fr; }
    nav { grid-template-columns: 1fr; }
    .sync-state { width: 100%; }
}

/* K-POS Web 2026: centro de control remoto del negocio */
body:has(.app-shell) {
    background: #f5f8fc;
}

.app-shell {
    grid-template-columns: 292px minmax(0, 1fr) !important;
    background: #f5f8fc !important;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 16px !important;
    background:
        radial-gradient(circle at 0% 0%, rgba(33, 137, 255, .25), transparent 36%),
        linear-gradient(180deg, #061833 0%, #07162d 54%, #041021 100%) !important;
    border-right: 1px solid rgba(255,255,255,.08);
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18);
    border-radius: 999px;
}

.sidebar-logo {
    width: 194px !important;
    max-height: 66px;
    object-fit: contain;
    object-position: left center;
    border-radius: 12px;
}

.main-nav {
    display: grid;
    gap: 7px;
}

.main-nav a,
.logout {
    min-height: 48px;
    padding: 12px 14px !important;
    border-radius: 13px !important;
    color: #e5eefc !important;
    font-size: 15px;
    font-weight: 800;
}

.main-nav a.active,
.main-nav a:hover {
    background: linear-gradient(135deg, #0b7cff 0%, #0758dc 100%) !important;
    color: #fff !important;
    box-shadow: 0 16px 34px rgba(11, 124, 255, .28);
}

.dashboard {
    padding: 26px 28px !important;
    background:
        radial-gradient(circle at 82% 0%, rgba(11, 124, 255, .08), transparent 34%),
        #f5f8fc !important;
}

.live-topbar {
    align-items: flex-start;
    margin-bottom: 22px !important;
}

.topbar h1 {
    font-size: 31px !important;
    letter-spacing: 0;
    color: #07162d !important;
}

.user-line {
    color: #62718c !important;
    font-size: 14px !important;
}

.top-actions {
    justify-content: flex-end;
}

.privacy-toggle,
.store-select,
.sync-state {
    min-height: 50px;
    border-radius: 15px !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .04);
}

.privacy-toggle {
    width: auto !important;
    margin: 0 !important;
    background: #07162d !important;
    padding: 0 18px;
}

.sync-state,
.store-select {
    background: #fff !important;
    border: 1px solid #dbe5f2 !important;
}

.live-kpi-grid {
    grid-template-columns: repeat(5, minmax(170px, 1fr)) !important;
    gap: 16px !important;
}

.live-kpi,
.control-panel,
.panel,
.sync-state,
.store-select {
    border: 1px solid #dbe5f2 !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .055) !important;
}

.live-kpi {
    min-height: 154px !important;
    border-radius: 18px !important;
    padding: 18px !important;
}

.live-kpi strong {
    font-size: 28px !important;
    color: #07162d !important;
}

.live-kpi span {
    color: #334a72 !important;
}

.control-grid {
    grid-template-columns: minmax(420px, 1.12fr) minmax(330px, .78fr) minmax(330px, .86fr) !important;
    gap: 16px !important;
}

.control-panel,
.panel {
    border-radius: 18px !important;
    padding: 19px !important;
    background: rgba(255,255,255,.96) !important;
}

.panel-head h2,
.control-panel h2 {
    color: #07162d !important;
    font-size: 18px !important;
}

.panel-head p,
.control-panel p {
    color: #63718a !important;
}

.live-activity {
    grid-template-columns: 46px minmax(0, 1fr) auto 68px !important;
    padding: 12px 0 !important;
}

.live-activity > span,
.alert-item > span {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

.status-hero > span {
    box-shadow: 0 10px 24px rgba(18, 185, 129, .18);
}

.pos-preview .pos-screen,
.cashier-mirror .pos-screen {
    background:
        linear-gradient(135deg, rgba(11, 124, 255, .09), rgba(255,255,255,.94)),
        #fff !important;
}

.primary-action {
    border-radius: 13px !important;
    background: linear-gradient(135deg, #0b7cff, #0758dc) !important;
}

.dashboard-charts {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) !important;
}

.control-strip {
    border-radius: 18px !important;
    overflow: hidden;
}

.view-section:not([data-section="dashboard"]) .panel,
.view-section:not([data-section="dashboard"]) .control-panel {
    min-height: 320px;
}

.table-wrap {
    border: 1px solid #e3ebf6;
    border-radius: 14px;
    background: #fff;
}

table {
    min-width: 780px;
}

th {
    color: #3d4f6d !important;
    background: #f7faff;
}

td {
    color: #13213a;
}

.modal-card {
    border-radius: 22px !important;
}

.detail-sections {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.detail-sections section {
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
}

.detail-sections h3 {
    margin: 0 0 10px;
    color: #07162d;
    font-size: 15px;
}

.detail-list {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.detail-list li,
.empty-list {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 11px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.detail-list strong {
    color: #0f172a;
}

.detail-list span,
.empty-list {
    color: #64748b;
    font-size: 13px;
}

.modal-intro {
    margin: 0 0 12px;
    color: #50658a;
}

.alert-item.actionable {
    cursor: pointer;
}

.alert-item.actionable:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.see-more {
    color: #0b7cff !important;
    font-weight: 900;
}

.report-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(150px, .8fr)) auto;
    gap: 12px;
    align-items: end;
    margin: 0 0 16px;
    padding: 14px;
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: #f8fafc;
}

.report-filters label {
    margin: 0;
    color: #334a72;
    font-size: 12px;
}

.report-filters select,
.report-filters input {
    margin-top: 6px;
}

.report-filters button {
    width: auto;
    min-width: 130px;
    height: 44px;
    margin: 0;
}

.login-shell {
    background: #061327;
}

.brand-panel {
    grid-template-columns: minmax(290px, .7fr) minmax(0, 1.3fr) !important;
}

.brand-logo,
.login-logo {
    object-fit: contain;
}

.hero-carousel {
    border-radius: 28px !important;
}

.live-kpi {
    min-height: 176px !important;
    overflow: visible !important;
    display: grid !important;
    grid-template-rows: auto 1fr !important;
}

.live-kpi .kpi-chart {
    position: static !important;
    width: 100% !important;
    height: 50px !important;
    margin-top: 14px !important;
    clear: both;
    z-index: 0;
}

.live-kpi .kpi-head {
    position: relative;
    z-index: 1;
}

.live-kpi .kpi-chart.kpi-donut {
    width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    flex: 0 0 52px;
}

@media (max-width: 1380px) {
    .live-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .control-grid {
        grid-template-columns: minmax(0, 1fr) minmax(330px, .86fr) !important;
    }

    .right-rail {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr !important;
    }

    .sidebar {
        position: static;
        height: auto;
        max-height: none;
    }

    .main-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard,
    .control-grid,
    .right-rail,
    .dashboard-charts,
    .control-strip,
    .brand-panel {
        grid-template-columns: 1fr !important;
    }

    .live-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .report-filters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .dashboard {
        padding: 15px !important;
    }

    .main-nav,
    .live-kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .live-activity {
        grid-template-columns: 42px minmax(0, 1fr) !important;
    }

    .live-activity b,
    .live-activity em {
        grid-column: 2;
        text-align: left;
    }
}

/* Solicitud form styles */
.solicitud-form {
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    background: #f8fafc;
}
.solicitud-form h3 {
    margin: 0 0 14px;
    color: #07162d;
    font-size: 17px;
}
.solicitud-form .form-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}
.solicitud-form .form-row-full {
    grid-column: 1 / -1;
    width: 100%;
}
.solicitud-form .form-row label {
    margin: 0;
    font-size: 12px;
    color: #334a72;
}
.solicitud-form .form-row input,
.solicitud-form .form-row select,
.solicitud-form .form-row textarea {
    margin-top: 6px;
}
.solicitud-form .form-row textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 12px;
    font: inherit;
    resize: vertical;
}
.solicitud-form .form-row button {
    width: auto;
    min-width: 110px;
    height: 44px;
    margin: 0;
}
.solicitud-form .table-wrap {
    margin: 12px 0;
}
.solicitud-form .table-wrap table {
    min-width: 0;
}
.solicitud-form .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}
.solicitud-form .form-actions button {
    width: auto;
    min-width: 140px;
    margin: 0;
}
.btn-primary {
    width: auto;
    min-width: 120px;
    height: 42px;
    margin: 0;
    padding: 0 16px;
    background: linear-gradient(135deg, #0b7cff, #0758dc) !important;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}
.btn-secondary {
    background: #334a72 !important;
    height: 44px;
    margin: 0;
    border-radius: 10px;
    font-weight: 800;
}
.btn-cancel {
    background: #64748b !important;
    height: 44px;
    border-radius: 10px;
    font-weight: 800;
}
.btn-danger {
    width: auto;
    min-width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    background: #ef4444 !important;
    border-radius: 8px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-small {
    width: auto;
    height: 32px;
    margin: 0;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
}

/* Product search in solicitud form */
.search-results {
    position: absolute;
    z-index: 10;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    background: white;
    box-shadow: 0 12px 40px rgba(2, 6, 23, .18);
    margin-top: 2px;
}
.search-results .search-result-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: #13213a;
}
.search-results .search-result-item:last-child {
    border-bottom: 0;
}
.search-results .search-result-item:hover,
.search-results .search-result-item.active {
    background: #eef6ff;
}
.search-results .search-result-item strong {
    display: block;
    font-size: 14px;
}
.search-results .search-result-item small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}
.search-results .search-result-item .price-tag {
    color: #0b7cff;
    font-weight: 800;
    font-size: 14px;
}
.search-results .search-empty {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}
/* Product browser modal */
.product-browser-card {
    max-width: 780px !important;
    width: 90vw !important;
}
.product-browser-search {
    margin-bottom: 14px;
}
.product-browser-search input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
}
.product-browser-search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(11,124,255,.15);
}
.product-browser-results {
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.browser-loading, .browser-empty {
    padding: 28px;
    text-align: center;
    color: #64748b;
}
.browser-product-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.browser-product-item:last-child { border-bottom: 0; }
.browser-product-item:hover { background: #f8fafc; }
.browser-product-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    flex: 0 0 48px;
}
.browser-product-img.empty {
    background: #eef3fb;
    border-radius: 8px;
}
.browser-product-info {
    flex: 1;
    min-width: 0;
}
.browser-product-info strong {
    display: block;
    font-size: 14px;
    color: #13213a;
}
.browser-product-info small {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}
.browser-product-info .browser-product-price {
    color: var(--blue);
    font-weight: 800;
    font-size: 13px;
}
.browser-product-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 0 0 auto;
}
.browser-product-actions input {
    width: 62px;
    height: 34px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
}
.browser-product-actions .browser-product-add {
    white-space: nowrap;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
}
.product-browser-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    font-size: 13px;
    color: #64748b;
}
.product-browser-footer button {
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 700;
    color: #13213a;
}
.product-browser-footer button:disabled { opacity: .4; cursor: default; }
.product-browser-footer button:hover:not(:disabled) { background: #f1f5f9; }

/* Solicitud actions row */
.solicitud-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.solicitud-actions .btn-icon {
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    font-weight: 900;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 0;
}
.solicitud-actions .btn-edit {
    background: #dbeafe;
    color: #1d4ed8;
}
.solicitud-actions .btn-delete {
    background: #fee2e2;
    color: #dc2626;
}
.solicitud-actions .btn-edit:hover {
    background: #bfdbfe;
}
.solicitud-actions .btn-delete:hover {
    background: #fecaca;
}
.send-provider-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.btn-provider-send {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-provider-send.whatsapp {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.btn-provider-send.email {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.btn-provider-send:hover {
    filter: brightness(1.05);
}
.row-stock-ok { background-color: #f0fdf4 !important; }
.row-stock-ok:hover { background-color: #dcfce7 !important; }
.row-stock-zero { background-color: #fef2f2 !important; }
.row-stock-zero:hover { background-color: #fee2e2 !important; }
.badge-yes { background: #27ae60; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-no { background: #95a5a6; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 12px; }

@media (max-width: 900px) {
    .dashboard-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-filter-bar span {
        grid-column: 1 / -1;
    }
    .filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .filter-summary {
        grid-column: 1 / -1;
    }
    .product-list-row {
        grid-template-columns: 52px minmax(0, 1fr) 82px 104px;
    }
    .product-list-state {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .dashboard-filter-bar,
    .filter-bar,
    .products-grid {
        grid-template-columns: 1fr;
    }
    .stock-toolbar {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .stock-view-button,
    .stock-manage-link {
        width: 100%;
    }
    .product-list-row {
        grid-template-columns: 52px minmax(0, 1fr);
    }
    .product-list-metric,
    .product-list-state {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

.mobile-menu-toggle,
.mobile-menu-backdrop,
.mobile-bottom-nav {
    display: none;
}

.mobile-menu-backdrop[hidden] {
    display: none !important;
    pointer-events: none !important;
}

@media (max-width: 980px) {
    .mobile-menu-toggle {
        display: none;
        align-items: center;
        gap: 8px;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1400;
        border: 0;
        border-radius: 10px;
        padding: 10px 12px;
        background: #07162d;
        color: #fff;
        font-weight: 800;
        box-shadow: 0 10px 28px rgba(15, 23, 42, .28);
    }

    .mobile-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1300;
        background: rgba(2, 6, 23, .45);
        pointer-events: auto;
    }

    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: min(86vw, 330px);
        height: 100vh;
        max-height: 100vh;
        transform: translateX(-102%);
        transition: transform .22s ease;
        z-index: 1500;
        overscroll-behavior: auto;
        -webkit-overflow-scrolling: touch;
        visibility: hidden;
        pointer-events: none;
    }

    body.mobile-menu-open .sidebar {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .dashboard {
        padding-top: 24px !important;
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 7px;
        border: 1px solid rgba(199, 215, 238, .9);
        border-radius: 18px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a,
    .mobile-bottom-nav button {
        min-width: 0;
        min-height: 54px;
        display: grid;
        place-items: center;
        gap: 2px;
        border: 0;
        border-radius: 13px;
        background: transparent;
        color: #50658a;
        text-decoration: none;
        font: inherit;
        font-weight: 800;
        cursor: pointer;
        line-height: 1;
    }

    .mobile-bottom-nav svg {
        width: 22px;
        height: 22px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-nav small {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        letter-spacing: 0;
    }

    .mobile-bottom-nav a.active {
        background: #0b7cff;
        color: #fff;
        box-shadow: 0 8px 18px rgba(11, 124, 255, .24);
    }

    .mobile-bottom-nav button:active,
    .mobile-bottom-nav a:active {
        transform: translateY(1px);
    }
}
