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

:root{
    --bg:#f5f7fb;
    --bg-soft:#ffffff;
    --surface:#ffffff;
    --surface-2:#fbfcff;
    --surface-3:#fff8fc;
    --text:#121826;
    --text-soft:#667085;
    --text-muted:#7b8394;
    --border:#e7eaf1;
    --border-strong:#d9deea;

    --brand:#ff0a8c;
    --brand-strong:#d90073;
    --brand-soft:#ffe4f2;
    --brand-dark:#111111;
    --brand-dark-2:#1a1a1f;
    --brand-dark-3:#231420;

    --success-bg:#ecfdf3;
    --success-border:#bbf7d0;
    --success-text:#166534;

    --danger-bg:#fff1f2;
    --danger-border:#fecdd3;
    --danger-text:#be123c;

    --warning-bg:#fff7ed;
    --warning-border:#fed7aa;
    --warning-text:#b45309;

    --pending-bg:#fff8db;
    --pending-border:#f5de8a;
    --pending-text:#8a6a00;

    --info-bg:#eef6ff;
    --info-border:#bfdbfe;
    --info-text:#1d4ed8;

    --shadow-xs:0 4px 10px rgba(16,24,40,.04);
    --shadow-sm:0 10px 24px rgba(16,24,40,.05);
    --shadow-md:0 18px 42px rgba(16,16,20,.08);
    --shadow-lg:0 24px 60px rgba(16,16,24,.12);

    --radius-xl:28px;
    --radius-lg:22px;
    --radius-md:16px;
    --radius-sm:12px;
}

html,body{
    min-height:100%;
    width:100%;
}

body{
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
    background:linear-gradient(180deg,#f7f8fc 0%, #f2f4f8 100%);
    color:var(--text);
    font-size:15px;
    line-height:1.45;
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

a{
    text-decoration:none;
    color:inherit;
}

button,input,select,textarea{
    font:inherit;
}

textarea{
    resize:vertical;
}

img{
    max-width:100%;
    display:block;
}

.app-shell{
    width:100%;
    max-width:none;
    margin:0;
    padding:18px clamp(12px,1.2vw,24px) 34px;
}

.app-shell-page{
    padding-top:14px;
}

/* ===== Header principal ===== */
.pos-header{
    background:linear-gradient(135deg,var(--brand-dark) 0%,var(--brand-dark-2) 58%,var(--brand-dark-3) 100%);
    border-radius:var(--radius-xl);
    color:#fff;
    padding:20px 22px;
    display:grid;
    grid-template-columns:1.4fr 1fr auto;
    gap:16px;
    align-items:flex-start;
    box-shadow:0 20px 50px rgba(14,14,18,.22);
    position:relative;
    overflow:hidden;
    width:100%;
}

.pos-header:before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 86% 50%, rgba(255,10,140,.30) 0%, rgba(255,10,140,.12) 14%, transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
    pointer-events:none;
}

.pos-header:after{
    content:"";
    position:absolute;
    inset:auto -80px -80px auto;
    width:240px;
    height:240px;
    border-radius:50%;
    background:radial-gradient(circle,var(--brand) 0%,rgba(255,10,140,.24) 34%,transparent 72%);
    pointer-events:none;
}

.brand-side{
    display:flex;
    flex-direction:column;
    gap:14px;
    position:relative;
    z-index:1;
    min-width:0;
}

.brand-row{
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    min-width:0;
}

.brand-logo,
.brand-mark{
    width:56px;
    height:56px;
    border-radius:18px;
    display:grid;
    place-items:center;
    flex:0 0 56px;
    background:#fff;
    color:var(--brand-dark);
    font-size:28px;
    font-weight:700;
    box-shadow:0 10px 20px rgba(0,0,0,.18);
}

.brand-logo{
    object-fit:contain;
    padding:8px;
}

.brand-kicker{
    font-size:12px;
    letter-spacing:.12em;
    text-transform:uppercase;
    color:#fbcfe8;
    font-weight:600;
}

.brand-title{
    font-size:28px;
    font-weight:700;
    letter-spacing:-.02em;
    color:#fff;
    line-height:1.05;
}

.header-total{
    align-self:flex-start;
    background:rgba(255,255,255,.96);
    color:var(--brand-dark);
    border-radius:999px;
    padding:12px 18px;
    font-size:17px;
    font-weight:600;
    box-shadow:0 10px 24px rgba(0,0,0,.15);
}

.header-stats,
.header-right,
.quick-actions,
.message-actions,
.header-inline-actions,
.table-actions,
.graph-actions,
.alerts-anchor-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
    position:relative;
    z-index:1;
}

.pill,
.mini-pill,
.quick-chip,
.subnav-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    padding:11px 16px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.18);
    color:#fff;
    font-weight:600;
    white-space:nowrap;
}

.pill strong,
.mini-pill strong{
    font-weight:700;
}

.role-pill{
    background:rgba(255,255,255,.13);
}

.pill-link{
    background:rgba(255,255,255,.16);
}

.quick-bar,
.subnav{
    margin-top:14px;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(4px);
    border:1px solid var(--border);
    border-radius:20px;
    padding:12px 14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
    box-shadow:0 10px 26px rgba(15,15,18,.05);
    width:100%;
}

.quick-title{
    font-size:18px;
    font-weight:700;
    color:var(--brand-dark);
    letter-spacing:.01em;
}

.quick-chip{
    background:var(--brand-soft);
    border:1px solid #ffc7e2;
    color:var(--brand-strong);
    font-weight:600;
}

.quick-link-chip{
    cursor:pointer;
}

.quick-actions .quick-link-chip{
    text-decoration:none;
}

.subnav{
    padding:10px 12px;
}

.subnav-link{
    background:#fff;
    border:1px solid #efeff6;
    color:var(--brand-dark);
    padding:10px 14px;
    box-shadow:none;
}

.subnav-link.active{
    background:linear-gradient(135deg,var(--brand),var(--brand-strong));
    color:#fff;
    border-color:transparent;
    box-shadow:0 12px 22px rgba(255,10,140,.24);
}

/* ===== Layouts ===== */
.pos-grid{
    display:grid;
    grid-template-columns:minmax(320px,430px) minmax(0,1fr);
    gap:22px;
    margin-top:18px;
    width:100%;
}

.page-grid{
    display:grid;
    grid-template-columns:minmax(320px,430px) minmax(0,1fr);
    gap:22px;
    margin-top:18px;
    width:100%;
}

.page-grid-2{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px;
    width:100%;
}

/* ===== Cards ===== */
.card{
    background:rgba(255,255,255,.98);
    border:1px solid var(--border);
    border-radius:24px;
    padding:18px 16px;
    box-shadow:var(--shadow-md);
    width:100%;
}

.card h2{
    margin:0 0 14px;
    font-size:22px;
    font-weight:700;
    letter-spacing:-.01em;
    color:var(--brand-dark);
}

.card h3{
    margin:0 0 10px;
    font-size:17px;
    font-weight:600;
    color:var(--brand-dark);
}

.formal-head h2,
.sales-kpi-formal .stat-label,
.data-table thead th,
.cart-table thead th{
    font-weight:600;
}

/* ===== Forms ===== */
.form-group{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:14px;
}

.form-group label{
    font-weight:600;
    color:var(--brand-dark);
}

.form-group input,
.form-group select,
.form-group textarea,
.inline-form input,
.inline-form select,
.inline-form textarea,
.filters-grid input,
.filters-grid select,
.filters-grid-extended input,
.filters-grid-extended select,
.avisos-filters input,
.avisos-filters select,
.graph-filters input,
.graph-filters select,
.task-form input,
.task-form select,
.task-form textarea{
    width:100%;
    border:1px solid #dfdfea;
    border-radius:14px;
    padding:12px 14px;
    background:#fff;
    color:var(--text);
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.inline-form input:focus,
.inline-form select:focus,
.inline-form textarea:focus,
.filters-grid input:focus,
.filters-grid select:focus,
.filters-grid-extended input:focus,
.filters-grid-extended select:focus,
.avisos-filters input:focus,
.avisos-filters select:focus,
.graph-filters input:focus,
.graph-filters select:focus,
.task-form input:focus,
.task-form select:focus,
.task-form textarea:focus,
.task-assignee-select:focus,
.task-due-input:focus,
.line-note-input:focus{
    border-color:var(--brand);
    box-shadow:0 0 0 4px rgba(255,10,140,.10);
}

.form-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.grow{
    flex:1;
}

.switch-box{
    justify-content:flex-end;
}

.switch{
    position:relative;
    display:inline-block;
    width:62px;
    height:34px;
}

.switch input{
    opacity:0;
    width:0;
    height:0;
}

.slider{
    position:absolute;
    cursor:pointer;
    inset:0;
    background:#cfd1da;
    border-radius:999px;
    transition:.2s;
    box-shadow:inset 0 0 0 1px rgba(0,0,0,.03);
}

.slider:before{
    position:absolute;
    content:"";
    height:26px;
    width:26px;
    left:4px;
    top:4px;
    background:#fff;
    border-radius:50%;
    transition:.2s;
    box-shadow:0 3px 8px rgba(15,23,42,.20);
}

.switch input:checked + .slider{
    background:linear-gradient(135deg,var(--brand),var(--brand-strong));
}

.switch input:checked + .slider:before{
    transform:translateX(28px);
}

/* ===== Informativos ===== */
.fx-card{
    border:1px solid #ffd1e7;
    background:linear-gradient(135deg,#fff8fc,#fff0f8);
    padding:18px;
    border-radius:18px;
    margin:8px 0 16px;
}

.fx-title{
    font-weight:600;
    margin-bottom:6px;
    color:var(--brand-strong);
}

.totals-box{
    border:1px solid var(--border);
    border-radius:18px;
    padding:14px;
    background:var(--surface-2);
}

.totals-box > div{
    display:flex;
    justify-content:space-between;
    padding:7px 0;
    font-size:16px;
}

.totals-box .grand{
    font-size:25px;
    font-weight:700;
    border-top:1px solid var(--border);
    margin-top:8px;
    padding-top:12px;
}

.helper-text,
.small-formal,
.file-help,
.formal-muted,
.task-mini-meta,
.graph-subtitle,
.note-text,
.note-meta{
    color:var(--text-soft);
    font-size:14px;
    line-height:1.5;
}

.helper-text{
    margin:12px 4px 0;
}

.no-margin{
    margin:0;
}

.muted-text{
    color:var(--text-soft);
    font-size:12.5px;
}

.cell-title{
    font-weight:600;
    color:var(--brand-dark);
}

/* ===== Buttons ===== */
.btn{
    border:none;
    border-radius:14px;
    padding:13px 18px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:.18s ease;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    white-space:nowrap;
}

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

.btn-primary{
    background:linear-gradient(135deg,var(--brand),var(--brand-strong));
    color:#fff;
    box-shadow:0 10px 18px rgba(255,10,140,.22);
}

.btn-soft{
    background:#fff4fa;
    color:var(--brand-strong);
    border:1px solid #ffd1e7;
}

.btn-outline{
    background:#fff;
    color:var(--brand-dark);
    border:1px solid #e6e6ef;
}

.btn-danger{
    background:var(--danger-bg);
    color:var(--danger-text);
    border:1px solid var(--danger-border);
}

.btn-block{
    width:100%;
}

.btn-xs{
    padding:9px 12px;
    font-size:13px;
    border-radius:12px;
}

/* ===== Content ===== */
.content-column{
    display:flex;
    flex-direction:column;
    gap:18px;
    min-width:0;
}

.search-head,
.cart-head,
.action-row,
.stats-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

/* ===== Search ===== */
.search-wrap{
    position:relative;
}

.search-results{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    margin-top:10px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 20px 38px rgba(15,23,42,.12);
    z-index:30;
}

.search-item{
    display:block;
    width:100%;
    text-align:left;
    border:none;
    background:#fff;
    padding:14px 16px;
    cursor:pointer;
    border-bottom:1px solid #f0f0f6;
}

.search-item:last-child{
    border-bottom:none;
}

.search-item:hover{
    background:#fff7fb;
}

.search-title{
    font-weight:600;
    margin-bottom:4px;
}

.search-meta{
    display:flex;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
    color:var(--text-soft);
    font-size:14px;
}

.hidden{
    display:none!important;
}

/* ===== Tables ===== */
.table-wrap{
    overflow:auto;
    border:1px solid var(--border);
    border-radius:16px;
    width:100%;
}

.cart-table,
.data-table,
.mini-items-table{
    width:100%;
    border-collapse:collapse;
    min-width:760px;
}

.cart-table th,
.cart-table td,
.data-table th,
.data-table td,
.mini-items-table th,
.mini-items-table td{
    padding:14px 12px;
    border-bottom:1px solid #f0f0f6;
    text-align:left;
    vertical-align:top;
}

.cart-table thead th,
.data-table thead th,
.mini-items-table th{
    font-size:13px;
    color:#6b7280;
    background:#fdfdff;
}

.empty-row td,
.empty-cell{
    text-align:center;
    color:var(--text-soft);
    padding:26px 12px;
}

.line-input{
    width:100px;
    border:1px solid #d9dbe4;
    border-radius:10px;
    padding:10px 9px;
    background:#fff;
}

.icon-btn{
    border:none;
    background:#fff1f5;
    color:var(--brand-strong);
    width:36px;
    height:36px;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
    font-weight:700;
}

/* ===== Cart ===== */
.summary-panel{
    margin-left:auto;
    margin-top:16px;
    max-width:320px;
    width:100%;
}

.summary-line{
    display:flex;
    justify-content:space-between;
    padding:8px 0;
    font-size:18px;
}

.summary-total{
    font-size:31px;
    font-weight:700;
    border-top:2px solid #ffd1e7;
    margin-top:4px;
    padding-top:14px;
}

.cart-total-chip{
    padding:12px 16px;
    background:#fff2f9;
    border-radius:999px;
    color:var(--brand-strong);
    border:1px solid #ffd1e7;
    font-weight:600;
}

.sale-message{
    margin-top:18px;
    border-radius:18px;
    padding:16px 18px;
}

.sale-message.success{
    background:var(--success-bg);
    border:1px solid var(--success-border);
    color:var(--success-text);
}

.sale-message.error{
    background:var(--danger-bg);
    border:1px solid var(--danger-border);
    color:var(--danger-text);
}

/* ===== Login ===== */
.login-body{
    min-height:100vh;
    display:grid;
    place-items:center;
    background:linear-gradient(180deg,#0e0e11,#17171d);
    padding:20px;
}

.login-card{
    width:min(100%,480px);
    background:#fff;
    border-radius:30px;
    padding:30px 26px;
    box-shadow:0 24px 60px rgba(0,0,0,.28);
    position:relative;
    overflow:hidden;
}

.login-card:before{
    content:"";
    position:absolute;
    right:-60px;
    top:-60px;
    width:180px;
    height:180px;
    border-radius:50%;
    background:radial-gradient(circle,var(--brand) 0%,rgba(255,10,140,.2) 40%,transparent 70%);
}

.login-badge{
    display:inline-block;
    background:var(--brand-soft);
    color:var(--brand-strong);
    border-radius:999px;
    padding:8px 12px;
    font-weight:600;
    font-size:13px;
    margin-bottom:12px;
    position:relative;
    z-index:1;
}

.login-card h1{
    margin:0 0 8px;
    font-size:34px;
    position:relative;
    z-index:1;
}

.login-subtitle{
    margin:0 0 20px;
    color:var(--text-soft);
    position:relative;
    z-index:1;
}

.login-form label{
    display:block;
    margin:14px 0 7px;
    font-weight:600;
    color:#475569;
}

.login-form input{
    width:100%;
    border:1px solid #d8dbe6;
    border-radius:14px;
    padding:14px 14px;
    font-size:16px;
}

.login-form input:focus{
    outline:none;
    border-color:var(--brand);
    box-shadow:0 0 0 4px rgba(255,10,140,.10);
}

.login-help{
    margin-top:20px;
    font-size:14px;
    color:var(--text-soft);
    background:#fff8fc;
    border:1px solid #ffd8ea;
    padding:14px;
    border-radius:16px;
}

/* ===== Alerts ===== */
.alert{
    padding:14px 16px;
    border-radius:16px;
    margin-bottom:12px;
}

.alert-error{
    background:var(--danger-bg);
    border:1px solid var(--danger-border);
    color:var(--danger-text);
}

.alert-success{
    background:var(--success-bg);
    border:1px solid var(--success-border);
    color:var(--success-text);
}

/* ===== Generic layouts ===== */
.inline-form,
.filters-grid{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.filters-grid input,
.filters-grid select{
    min-width:160px;
}

.stats-row{
    margin:18px 0;
}

.stats-row-4 .stat-card{
    flex:1 1 220px;
}

.stat-card{
    flex:1 1 220px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:20px;
    padding:16px;
    box-shadow:0 10px 24px rgba(18,18,18,.04);
}

.stat-label{
    color:var(--text-soft);
    font-weight:600;
    margin-bottom:8px;
}

.stat-value{
    font-size:27px;
    font-weight:700;
    color:var(--brand-dark);
}

.preview-card{
    border:1px solid var(--border);
    border-radius:18px;
    padding:20px;
    background:#fffdfd;
}

.preview-logo{
    max-width:120px;
    max-height:120px;
    display:block;
    margin-bottom:12px;
}

.preview-footer{
    margin-top:14px;
    padding-top:14px;
    border-top:1px dashed #dfdfeb;
    color:#475569;
}

.preview-card strong{
    color:var(--brand-dark);
}

.helper-box{
    margin-top:16px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    padding:14px;
    color:#475569;
}

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

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

.permission-pill{
    background:#fff2f9;
    color:var(--brand-strong);
    border:1px solid #ffd1e7;
}

.kpi-note{
    font-size:13px;
    color:var(--text-soft);
    margin-top:8px;
}

.danger-zone{
    border:1px dashed #fecdd3;
    background:#fff7f8;
    border-radius:18px;
    padding:16px;
}

/* ===== Status badges ===== */
.status-badge,
.permission-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border-radius:999px;
    padding:7px 12px;
    font-size:12px;
    font-weight:600;
    border:1px solid transparent;
    line-height:1.1;
}

.status-active{
    background:#ecfdf3;
    color:#166534;
    border-color:#bbf7d0;
}

.status-inactive{
    background:#f8fafc;
    color:#475569;
    border-color:#cbd5e1;
}

.status-warning{
    background:#fff7ed;
    color:#b45309;
    border-color:#fed7aa;
}

.status-danger{
    background:#fff1f2;
    color:#be123c;
    border-color:#fecdd3;
}

.status-pending{
    background:#fff8db;
    color:#8a6a00;
    border-color:#f5de8a;
}

.status-process{
    background:#fff0e3;
    color:#b85a00;
    border-color:#f6be8a;
}

.status-delivered{
    background:#eaf8ee;
    color:#1f7a3d;
    border-color:#a9deb8;
}

.status-cancelled{
    background:#fdebec;
    color:#b42318;
    border-color:#f3b2b8;
}

/* ===== POS dashboard blocks ===== */
.premium-note-grid{
    display:grid;
    grid-template-columns:1.15fr .85fr;
    gap:18px;
    margin-bottom:18px;
}

.premium-note-card,
.premium-status-card{
    background:#fff;
    border:1px solid #f0d8e6;
    border-radius:18px;
    padding:18px 20px;
    box-shadow:0 10px 24px rgba(22,22,28,.04);
}

.premium-note-card h3,
.premium-status-card h3{
    margin:0 0 10px;
    font-size:1.02rem;
    font-weight:600;
}

.premium-note-list{
    display:grid;
    gap:10px;
}

.premium-note-item{
    padding:12px 14px;
    border:1px solid #f3e4ec;
    border-radius:14px;
    background:#fffafb;
}

.premium-note-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:6px;
}

.note-title{
    font-weight:600;
    color:#20212a;
}

.status-pill-soft{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border-radius:999px;
    font-size:.82rem;
    font-weight:600;
    border:1px solid #f0d0df;
    background:#fff7fb;
    color:#bc0f68;
}

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

.status-option{
    padding:14px;
    border:1px solid #f2dcea;
    border-radius:16px;
    background:#fff;
}

.status-option-title{
    display:block;
    font-weight:600;
    margin-bottom:4px;
}

/* ===== Cart line task area ===== */
.line-file-box{
    min-width:180px;
}

.line-file-box input[type="file"]{
    width:100%;
    font-size:.84rem;
}

.file-chip{
    margin-top:6px;
    display:inline-flex;
    max-width:100%;
    align-items:center;
    gap:8px;
    padding:6px 10px;
    border-radius:999px;
    background:#fff6fb;
    border:1px solid #f1d5e5;
    color:#7a234c;
    font-size:.82rem;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.file-remove-link{
    border:none;
    background:transparent;
    color:#cf116f;
    cursor:pointer;
    font-size:.8rem;
    padding:0;
}

.cart-table .price-input,
.cart-table .qty-input,
.cart-table .discount-input{
    width:88px;
}

.line-note-input{
    min-width:220px;
}

.line-task-cell{
    min-width:220px;
}

.task-mini-grid{
    display:grid;
    grid-template-columns:1fr 135px;
    gap:8px;
}

.task-assignee-select,
.task-due-input,
.line-note-input{
    width:100%;
    border:1px solid #dddfea;
    border-radius:12px;
    padding:9px 10px;
    background:#fff;
    outline:none;
}

.task-mini-help{
    margin-top:6px;
    font-size:.8rem;
    color:#70798a;
}

/* ===== Modals ===== */
.pending-modal-backdrop{
    position:fixed;
    inset:0;
    background:rgba(12,12,18,.48);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:2000;
    padding:20px;
}

.pending-modal-backdrop.show{
    display:flex;
}

.pending-modal,
.status-modal{
    width:min(760px, 96vw);
    background:#fff;
    border-radius:22px;
    border:1px solid #f1d9e7;
    box-shadow:0 22px 70px rgba(10,10,18,.26);
    overflow:hidden;
}

.modal-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    padding:22px 24px 12px;
}

.modal-title-wrap h3{
    margin:0 0 6px;
    font-size:1.15rem;
    font-weight:600;
}

.modal-title-wrap p{
    margin:0;
    color:#6b7180;
    line-height:1.5;
}

.modal-body{
    padding:0 24px 20px;
}

.modal-foot{
    padding:0 24px 24px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.modal-close{
    border:none;
    background:transparent;
    font-size:1.4rem;
    line-height:1;
    color:#6f7581;
    cursor:pointer;
}

.pending-mini-list{
    display:grid;
    gap:10px;
    max-height:300px;
    overflow:auto;
    padding-right:4px;
}

.pending-mini-item{
    border:1px solid #f3e1eb;
    background:#fffafb;
    border-radius:14px;
    padding:12px 14px;
}

.status-picker-grid{
    display:grid;
    gap:12px;
    margin-top:8px;
}

.status-picker-grid label{
    border:1px solid #efd5e4;
    border-radius:16px;
    padding:14px 16px;
    display:flex;
    align-items:flex-start;
    gap:12px;
    cursor:pointer;
    background:#fff;
}

.status-picker-grid input[type="radio"]{
    margin-top:4px;
}

.status-picker-grid strong{
    display:block;
    margin-bottom:4px;
    font-weight:600;
}

.status-save-hint{
    margin-top:12px;
    color:#6a7180;
    font-size:.92rem;
}

/* ===== Sales module ===== */
.filters-grid-extended{
    display:grid;
    grid-template-columns:1.35fr repeat(4,minmax(140px,1fr)) auto;
    gap:12px;
    align-items:end;
}

.section-head-formal,
.avisos-head,
.graph-head{
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
    flex-wrap:wrap;
    margin-bottom:16px;
}

.sales-kpi-formal .stat-value{
    font-weight:600;
}

.data-table tbody td{
    vertical-align:top;
}

.data-table .sale-summary-row td{
    padding-top:16px;
    padding-bottom:16px;
    border-bottom:1px solid #f0eef2;
}

.folio-title{
    font-size:1rem;
    font-weight:600;
    line-height:1.45;
}

.note-soft{
    margin-top:8px;
    padding:9px 11px;
    background:#fffafb;
    border:1px solid #f0dfe8;
    border-radius:12px;
}

.status-stack{
    display:grid;
    gap:8px;
}

.amount-stack{
    display:grid;
    gap:6px;
}

.amount-main{
    font-weight:700;
    font-size:1.02rem;
}

.actions-cell{
    min-width:280px;
}

.actions-toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.detail-toggle-btn{
    border:none;
    cursor:pointer;
}

.detail-toggle-btn.is-open{
    box-shadow:0 10px 24px rgba(236, 0, 140, 0.16);
}

.sale-detail-row{
    display:none;
}

.sale-detail-row.is-open{
    display:table-row;
}

.sale-detail-row td{
    padding:0 0 18px 0 !important;
    border-bottom:1px solid #ece8ef;
}

.sale-detail-shell{
    margin:8px 16px 4px 16px;
    padding:16px;
    border:1px solid #f0dfe8;
    border-radius:18px;
    background:linear-gradient(180deg,#fffbfd 0%,#ffffff 100%);
}

.sale-detail-grid{
    display:grid;
    grid-template-columns:1.35fr 1fr 1fr;
    gap:16px;
}

.detail-card{
    border:1px solid #f2e5ec;
    border-radius:16px;
    background:#fff;
    padding:14px;
}

.detail-card .subtle{
    color:#70798a;
    font-size:.88rem;
    margin-bottom:8px;
}

.detail-meta{
    display:grid;
    gap:10px;
}

.meta-item{
    padding:10px 12px;
    border:1px solid #f1e3ea;
    border-radius:14px;
    background:#fffafb;
}

.meta-item strong{
    display:block;
    margin-bottom:4px;
    font-weight:600;
}

.attachments-list{
    display:grid;
    gap:8px;
}

.attachment-link{
    display:inline-flex;
    align-items:center;
    gap:8px;
    width:max-content;
    max-width:100%;
    padding:8px 12px;
    border-radius:999px;
    border:1px solid #f0d8e6;
    background:#fff7fb;
    color:#9d0c55;
    text-decoration:none;
    font-size:.85rem;
}

.attachment-link:hover{
    background:#fff0f7;
}

.inline-status-form{
    display:grid;
    gap:10px;
    margin-top:8px;
}

.form-section-label{
    font-size:.9rem;
    color:#677081;
    font-weight:600;
    margin-bottom:2px;
}

.card-divider{
    height:1px;
    background:#f2e8ee;
    margin:12px 0;
}

.empty-inline{
    color:#6f7785;
    font-size:.92rem;
    padding:8px 0;
}

.compact-badges{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.summary-top{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:12px;
    margin-bottom:14px;
}

.summary-chip{
    border:1px solid #f2e3eb;
    border-radius:14px;
    background:#fffafb;
    padding:10px 12px;
}

.summary-chip .label{
    display:block;
    color:#70798a;
    font-size:.82rem;
    margin-bottom:4px;
}

.summary-chip .value{
    color:#1c2230;
    font-weight:600;
}

/* ===== Avisos ===== */
.avisos-shell{
    display:grid;
    gap:18px;
}

.avisos-subtitle{
    color:#6f7785;
    font-size:.94rem;
    line-height:1.55;
    max-width:920px;
}

.avisos-filters{
    display:grid;
    grid-template-columns:1.5fr 1fr 1fr 1fr auto;
    gap:12px;
    align-items:end;
}

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

.avisos-kpi{
    background:#fff;
    border:1px solid #ecdde5;
    border-radius:18px;
    padding:16px;
}

.avisos-kpi .label{
    color:#717a89;
    font-size:.84rem;
    margin-bottom:8px;
}

.avisos-kpi .value{
    font-size:1.9rem;
    font-weight:700;
    color:#171c26;
}

.avisos-list{
    display:grid;
    gap:14px;
}

.task-card{
    border:1px solid #eddde7;
    border-radius:20px;
    background:#fff;
    padding:16px;
    box-shadow:0 10px 24px rgba(20,20,28,.04);
}

.task-grid{
    display:grid;
    grid-template-columns:1.15fr .9fr 1fr;
    gap:16px;
    align-items:start;
}

.task-title{
    font-size:1.06rem;
    font-weight:700;
    color:#141923;
    margin-bottom:8px;
}

.task-sub{
    color:#6f7785;
    font-size:.92rem;
    line-height:1.45;
}

.task-meta{
    display:grid;
    gap:10px;
}

.task-meta-box{
    border:1px solid #f1e3ea;
    background:#fffafb;
    border-radius:16px;
    padding:12px 14px;
}

.task-meta-box strong{
    display:block;
    margin-bottom:5px;
    font-weight:600;
    color:#212734;
}

.task-inline-badges,
.inline-badges{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:10px;
}

.task-form{
    display:grid;
    gap:10px;
    border:1px solid #f1e4eb;
    background:#fffafb;
    border-radius:16px;
    padding:14px;
}

.task-form textarea{
    min-height:92px;
}

.attachment-chip{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-top:10px;
    padding:8px 12px;
    border-radius:999px;
    border:1px solid #f0d8e6;
    background:#fff6fb;
    color:#9c0e56;
    text-decoration:none;
    font-size:.85rem;
}

.notice-upgrade,
.graph-warning{
    border:1px dashed #f1b8ca;
    background:#fff8fb;
    color:#8c2256;
    border-radius:16px;
    padding:14px 16px;
}

.empty-state{
    border:1px dashed #ecdbe4;
    background:#fff;
    border-radius:18px;
    padding:24px 18px;
    color:#6f7785;
}

/* ===== Gráficas ===== */
.graph-shell{
    display:grid;
    gap:18px;
}

.graph-filters{
    display:grid;
    grid-template-columns:repeat(2,minmax(180px,1fr)) auto auto auto;
    gap:12px;
    align-items:end;
}

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

.graph-stat{
    background:#fff;
    border:1px solid #ecdde5;
    border-radius:20px;
    padding:16px;
    box-shadow:0 10px 24px rgba(20,20,28,.04);
}

.graph-stat .label{
    color:#717a89;
    font-size:.84rem;
    margin-bottom:8px;
}

.graph-stat .value{
    font-size:2rem;
    font-weight:700;
    color:#171c26;
}

.graph-layout{
    display:grid;
    grid-template-columns:1.1fr 1fr;
    gap:18px;
}

.graph-card{
    background:#fff;
    border:1px solid #ecdde5;
    border-radius:22px;
    padding:18px;
    box-shadow:0 12px 28px rgba(18,18,24,.05);
}

.graph-card .sub{
    color:#717a89;
    font-size:.92rem;
    margin-bottom:16px;
}

.hbars{
    display:grid;
    gap:12px;
}

.hbar-row{
    display:grid;
    grid-template-columns:180px 1fr 72px;
    gap:12px;
    align-items:center;
}

.hbar-label{
    font-size:.92rem;
    color:#1f2632;
    font-weight:600;
}

.hbar-track{
    height:14px;
    background:#f6eef3;
    border-radius:999px;
    overflow:hidden;
    border:1px solid #efdde7;
}

.hbar-fill{
    height:100%;
    border-radius:999px;
    background:linear-gradient(135deg,var(--brand),var(--brand-strong));
}

.hbar-fill.status-pending{background:#f5c94c}
.hbar-fill.status-process{background:#f0a15f}
.hbar-fill.status-delivered{background:#5fb97a}
.hbar-fill.status-cancelled{background:#ea7b84}

.hbar-value{
    text-align:right;
    font-weight:700;
    color:#1b2130;
}

.vbars{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(62px,1fr));
    gap:12px;
    align-items:end;
    min-height:220px;
}

.vbar-col{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
}

.vbar{
    width:100%;
    max-width:58px;
    border-radius:16px 16px 8px 8px;
    background:linear-gradient(180deg,#ff77bf,#ff0a8c);
    min-height:18px;
    box-shadow:0 8px 16px rgba(255,10,140,.18);
}

.vbar.secondary{
    background:linear-gradient(180deg,#91cbff,#3488ff);
}

.vbar.neutral{
    background:linear-gradient(180deg,#ffdca2,#ffb84d);
}

.vbar-label{
    font-size:.82rem;
    color:#6d7481;
    text-align:center;
}

.vbar-value{
    font-size:.85rem;
    font-weight:700;
    color:#1f2430;
}

.tasks-list{
    display:grid;
    gap:12px;
}

.task-mini{
    border:1px solid #f0dfe8;
    background:#fffafb;
    border-radius:18px;
    padding:14px 16px;
}

.task-mini-head{
    display:flex;
    justify-content:space-between;
    gap:10px;
    align-items:flex-start;
    flex-wrap:wrap;
    margin-bottom:8px;
}

.task-mini-title{
    font-weight:700;
    color:#171c26;
}

/* ===== Print ===== */
@media print{
    .pos-header,
    .subnav,
    .quick-bar .quick-actions,
    .btn,
    .inline-form,
    .filters-grid{
        display:none!important;
    }

    .card{
        box-shadow:none;
        border:1px solid #cbd5e1;
    }

    body{
        background:#fff;
    }

    .app-shell{
        padding:0;
    }
}

/* ===== Responsive ===== */
@media (min-width:1600px){
    .app-shell{
        padding-left:18px;
        padding-right:18px;
    }
}

@media (max-width:1300px){
    .pos-grid,
    .page-grid,
    .page-grid-2{
        grid-template-columns:1fr;
    }

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

    .graph-layout,
    .sale-detail-grid,
    .task-grid{
        grid-template-columns:1fr;
    }

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

    .summary-top{
        grid-template-columns:1fr;
    }
}

@media (max-width:1100px){
    .pos-header{
        grid-template-columns:1fr;
    }

    .header-right{
        justify-content:flex-start;
    }

    .quick-bar{
        flex-direction:column;
        align-items:flex-start;
    }

    .premium-note-grid{
        grid-template-columns:1fr;
    }

    .status-grid{
        grid-template-columns:1fr;
    }

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

    .graph-filters,
    .avisos-filters{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:760px){
    .app-shell{
        padding:14px 10px 26px;
    }

    .brand-title{
        font-size:23px;
    }

    .quick-title{
        font-size:17px;
    }

    .summary-total{
        font-size:24px;
    }

    .card h2{
        font-size:19px;
    }

    .form-row{
        grid-template-columns:1fr;
    }

    .cart-table,
    .data-table,
    .mini-items-table{
        min-width:640px;
    }

    .brand-logo,
    .brand-mark{
        width:48px;
        height:48px;
        border-radius:14px;
    }

    .graph-grid,
    .avisos-kpis,
    .graph-filters,
    .avisos-filters,
    .filters-grid-extended{
        grid-template-columns:1fr;
    }

    .hbar-row{
        grid-template-columns:1fr;
    }

    .actions-cell{
        min-width:220px;
    }

    .sale-detail-shell{
        margin:8px 8px 4px 8px;
        padding:12px;
    }

    .task-mini-grid{
        grid-template-columns:1fr;
    }
}
/* ======================================================================
   PUBLINEA POS · COMPACT RESPONSIVE V6 · 2026-09-23
   Capa visual global: reduce escala, aprovecha mejor el viewport y mantiene
   todos los módulos usables sin cambiar consultas ni lógica de negocio.
   ====================================================================== */
:root{
    --radius-xl:20px;
    --radius-lg:16px;
    --radius-md:12px;
    --radius-sm:9px;
}

html{font-size:14px;}
body{font-size:13px;line-height:1.38;}

.app-shell,
.app-shell-page{
    padding:8px 10px 18px!important;
}

/* Cabecera más compacta */
.pos-header{
    min-height:64px!important;
    padding:9px 13px!important;
    border-radius:18px!important;
    gap:10px!important;
    align-items:center!important;
    box-shadow:0 10px 28px rgba(14,14,18,.16)!important;
}
.brand-side{gap:6px!important;justify-content:center;}
.brand-row{gap:10px!important;flex-wrap:nowrap!important;}
.brand-logo,.brand-mark{
    width:42px!important;height:42px!important;flex-basis:42px!important;
    border-radius:12px!important;padding:6px!important;font-size:21px!important;
}
.brand-kicker{font-size:9.5px!important;letter-spacing:.10em!important;}
.brand-title{font-size:20px!important;line-height:1.02!important;}
.header-total{padding:7px 11px!important;font-size:12px!important;}
.header-stats,.header-right{gap:6px!important;}
.pill,.mini-pill{
    min-height:34px!important;padding:7px 10px!important;
    font-size:12px!important;
}

/* Navegación: una sola línea desplazable, nunca ocupa dos filas */
.subnav{
    margin-top:7px!important;padding:6px 8px!important;border-radius:15px!important;
    gap:6px!important;flex-wrap:nowrap!important;overflow-x:auto!important;
    scrollbar-width:thin;-webkit-overflow-scrolling:touch;
}
.subnav-link{
    min-height:34px!important;padding:7px 11px!important;font-size:12.5px!important;
    flex:0 0 auto!important;
}

/* Barras, tarjetas y botones generales */
.quick-bar{
    margin-top:7px!important;padding:7px 9px!important;border-radius:14px!important;
    gap:8px!important;min-height:46px!important;
}
.quick-title{font-size:14px!important;white-space:nowrap;}
.quick-actions{gap:6px!important;flex-wrap:nowrap!important;overflow-x:auto!important;max-width:100%;scrollbar-width:thin;}
.quick-chip{padding:6px 9px!important;font-size:11.5px!important;flex:0 0 auto!important;}

.card{
    border-radius:16px!important;padding:12px!important;
    box-shadow:0 8px 22px rgba(16,16,20,.055)!important;
}
.card h2{font-size:18px!important;margin-bottom:9px!important;}
.card h3{font-size:14px!important;margin-bottom:7px!important;}

.btn{padding:8px 11px!important;border-radius:10px!important;font-size:12px!important;min-height:34px!important;}
.btn-xs{padding:6px 8px!important;font-size:11px!important;min-height:29px!important;border-radius:8px!important;}

.form-group{gap:5px!important;margin-bottom:9px!important;}
.form-group label{font-size:12.5px!important;}
.form-group input,.form-group select,.form-group textarea,
.inline-form input,.inline-form select,.inline-form textarea,
.filters-grid input,.filters-grid select,
.filters-grid-extended input,.filters-grid-extended select,
.avisos-filters input,.avisos-filters select,
.graph-filters input,.graph-filters select,
.task-form input,.task-form select,.task-form textarea{
    min-height:36px!important;padding:8px 10px!important;border-radius:10px!important;font-size:12.5px!important;
}
.form-row{gap:8px!important;}
.helper-text,.small-formal,.file-help,.formal-muted,.task-mini-meta,.graph-subtitle,.note-text,.note-meta{
    font-size:12px!important;line-height:1.35!important;
}
.helper-text{margin:7px 2px 0!important;}
.muted-text{font-size:11.5px!important;}

.stack-gap{padding:8px 0 0!important;display:grid!important;gap:7px!important;}
.fx-card{padding:11px!important;border-radius:12px!important;margin:6px 0 10px!important;}
.totals-box{padding:9px!important;border-radius:12px!important;}
.totals-box>div{padding:4px 0!important;font-size:13px!important;}
.totals-box .grand{font-size:19px!important;padding-top:8px!important;margin-top:5px!important;}

/* Layouts: conservar dos columnas en laptop; colapsar sólo cuando hace falta */
.pos-grid,.page-grid{
    gap:10px!important;margin-top:9px!important;
}
.page-grid-2{gap:10px!important;margin-top:9px!important;}
.content-column{gap:9px!important;}

@media (min-width:1025px){
    .pos-grid{grid-template-columns:minmax(250px,285px) minmax(0,1fr)!important;}
    .page-grid{grid-template-columns:minmax(270px,330px) minmax(0,1fr)!important;}
    .page-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* KPIs */
.stats-row{margin:9px 0!important;gap:8px!important;}
.stats-row-4 .stat-card,.stat-card{min-width:0!important;flex:1 1 160px!important;padding:10px 11px!important;border-radius:13px!important;}
.stat-label{font-size:11.5px!important;margin-bottom:4px!important;}
.stat-value{font-size:20px!important;}

/* Tablas generales */
.table-wrap{border-radius:12px!important;}
.cart-table th,.cart-table td,.data-table th,.data-table td,.mini-items-table th,.mini-items-table td{
    padding:8px 8px!important;font-size:12px!important;
}
.cart-table thead th,.data-table thead th,.mini-items-table th{font-size:10.5px!important;}
.empty-row td,.empty-cell{padding:16px 8px!important;}
.line-input{padding:7px 7px!important;border-radius:8px!important;font-size:12px!important;}
.icon-btn{width:30px!important;height:30px!important;border-radius:8px!important;font-size:13px!important;}

/* Búsqueda y chips */
.search-results{margin-top:5px!important;border-radius:12px!important;}
.search-item{padding:9px 11px!important;}
.search-meta{font-size:11.5px!important;}
.cart-total-chip{padding:7px 10px!important;font-size:12px!important;}

/* Productos / importación masiva */
.products-grid-custom{gap:10px!important;}
.products-grid-custom.with-form{grid-template-columns:310px minmax(0,1fr)!important;}
.import-panel{margin-bottom:10px!important;}
.import-hero{padding:13px!important;border-radius:12px!important;gap:10px!important;}
.import-hero p{font-size:12px!important;line-height:1.35!important;}
.import-drop{margin-top:10px!important;padding:12px!important;border-radius:11px!important;}
.import-notes{gap:7px!important;margin:9px 0!important;}
.import-note{padding:9px!important;border-radius:10px!important;font-size:12px!important;}
.import-summary{gap:7px!important;margin:10px 0!important;}
.import-summary .mini-kpi{padding:8px 9px!important;border-radius:9px!important;}
.import-summary .mini-kpi strong{font-size:1.05rem!important;}
.import-preview-wrap{max-height:52vh!important;border-radius:10px!important;}
.import-preview-table th{padding:7px 6px!important;font-size:10.5px!important;}
.import-preview-table td{padding:6px!important;font-size:11px!important;}
.import-preview-table input[type=text],.import-preview-table input[type=number]{padding:6px 7px!important;min-height:30px!important;font-size:11px!important;}

/* Ventas y detalles */
.section-head-formal{margin-bottom:9px!important;gap:9px!important;}
.filters-grid-extended{gap:7px!important;}
.data-table .sale-summary-row td{padding-top:9px!important;padding-bottom:9px!important;}
.note-soft{margin-top:5px!important;padding:6px 8px!important;border-radius:9px!important;}
.actions-cell{min-width:235px!important;}
.actions-toolbar{gap:5px!important;}
.sale-detail-shell{margin:5px 8px 3px!important;padding:9px!important;border-radius:12px!important;}
.sale-detail-grid{gap:8px!important;}
.detail-card{padding:9px!important;border-radius:11px!important;}
.detail-meta{gap:6px!important;}
.meta-item{padding:7px 8px!important;border-radius:9px!important;}
.summary-top{gap:7px!important;margin-bottom:8px!important;}
.summary-chip{padding:7px 8px!important;border-radius:9px!important;}

/* Gráficas / avisos */
.graph-shell,.graph-layout,.tasks-list{gap:9px!important;}
.graph-grid{gap:8px!important;}
.graph-stat,.graph-card,.task-mini{padding:10px!important;border-radius:13px!important;}
.graph-stat .value{font-size:1.5rem!important;}
.vbars{min-height:170px!important;}

/* Modales */
.pending-modal,.status-modal{border-radius:16px!important;max-height:90vh;overflow:auto!important;}
.modal-head{padding:14px 16px 8px!important;}
.modal-body{padding:0 16px 12px!important;}
.modal-foot{padding:0 16px 14px!important;}
.modal-title-wrap h3{font-size:15px!important;}
.modal-title-wrap p{font-size:12px!important;}

/* Laptop pequeña / tablet horizontal */
@media (max-width:1024px){
    .pos-grid,.page-grid,.page-grid-2{grid-template-columns:1fr!important;}
    .products-grid-custom.with-form{grid-template-columns:1fr!important;}
    .pos-header{grid-template-columns:minmax(0,1fr) auto!important;}
    .header-stats{display:none!important;}
    .premium-note-grid{grid-template-columns:1fr!important;}
}

/* Tablet / móvil */
@media (max-width:760px){
    html{font-size:13px;}
    .app-shell,.app-shell-page{padding:6px 6px 14px!important;}
    .pos-header{padding:8px 9px!important;border-radius:14px!important;grid-template-columns:1fr auto!important;}
    .brand-logo,.brand-mark{width:36px!important;height:36px!important;flex-basis:36px!important;}
    .brand-title{font-size:17px!important;}
    .brand-kicker{font-size:8px!important;}
    .header-right .role-pill{display:none!important;}
    .mini-pill{min-height:31px!important;padding:6px 8px!important;font-size:11px!important;}
    .subnav{margin-top:5px!important;padding:5px!important;}
    .subnav-link{min-height:31px!important;padding:6px 9px!important;font-size:11.5px!important;}
    .quick-bar{margin-top:5px!important;display:block!important;overflow:hidden;}
    .quick-title{margin-bottom:5px!important;}
    .card{padding:10px!important;border-radius:13px!important;}
    .form-row{grid-template-columns:1fr!important;}
    .stats-row-4{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    .graph-grid,.avisos-kpis,.import-notes,.import-summary{grid-template-columns:1fr 1fr!important;}
}

@media (max-width:520px){
    .stats-row-4,.graph-grid,.avisos-kpis,.import-notes,.import-summary{grid-template-columns:1fr!important;}
    .header-right{gap:4px!important;}
    .header-right .mini-pill:not(.pill-link){display:none!important;}
    .card h2{font-size:16px!important;}
    .btn{font-size:11.5px!important;}
}


/* ==========================================================================\n   PUBLINEA · LAYOUT PREMIUM CON SIDEBAR ÚNICO\n   ========================================================================== */
body.publinea-sidebar-ui{
    background:#f5f6fa!important;
    min-height:100vh;
    overflow-x:hidden;
}
.publinea-sidebar-ui .publinea-shell{
    width:100%!important;
    max-width:none!important;
    min-height:100vh!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    grid-template-columns:276px minmax(0,1fr)!important;
    gap:0!important;
    background:#f5f6fa!important;
}
.pub-sidebar{
    position:sticky;
    top:0;
    height:100vh;
    min-height:100vh;
    z-index:1200;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    color:#fff;
    background:
        radial-gradient(circle at 20% -10%,rgba(255,22,145,.17),transparent 30%),
        linear-gradient(180deg,#171517 0%,#161316 52%,#100e10 100%);
    border-right:1px solid rgba(255,255,255,.08);
    box-shadow:14px 0 40px rgba(23,13,19,.10);
}
.pub-sidebar-brand{padding:22px 18px 18px;border-bottom:1px solid rgba(255,255,255,.09)}
.pub-brand-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:#fff;min-width:0}
.pub-brand-logo-wrap{width:52px;height:52px;flex:0 0 52px;border-radius:16px;background:#fff;display:grid;place-items:center;box-shadow:0 10px 24px rgba(0,0,0,.18);overflow:hidden}
.pub-brand-logo{display:block;width:100%;height:100%;object-fit:contain;padding:7px}
.pub-brand-fallback{font-size:25px;font-weight:900;color:#e50078}
.pub-brand-copy{display:block;min-width:0}
.pub-brand-copy small{display:block;color:#f2b8d4;font-size:9px;line-height:1.2;font-weight:900;letter-spacing:.09em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pub-brand-copy strong{display:block;margin-top:3px;font-size:18px;line-height:1.08;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pub-brand-copy em{display:block;margin-top:4px;color:#988d94;font-style:normal;font-size:10px;font-weight:650}
.pub-menu-search{margin:14px 14px 9px;height:42px;border:1px solid rgba(255,255,255,.11);border-radius:14px;background:rgba(255,255,255,.045);display:flex;align-items:center;gap:8px;padding:0 12px;color:#b8aab2}
.pub-menu-search span{font-size:17px;line-height:1}
.pub-menu-search input{width:100%;min-width:0;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:#fff!important;padding:0!important;height:auto!important;font-size:12px!important}
.pub-menu-search input::placeholder{color:#867a81}
.pub-sidebar-nav{flex:1;overflow:auto;padding:2px 10px 14px;scrollbar-width:thin;scrollbar-color:#4d3744 transparent}
.pub-sidebar-nav::-webkit-scrollbar{width:5px}.pub-sidebar-nav::-webkit-scrollbar-thumb{background:#4d3744;border-radius:999px}
.pub-nav-group{margin-top:9px}.pub-nav-group-title{padding:8px 10px 6px;color:#776d73;font-size:9px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.pub-nav-group-items{display:grid;gap:3px}
.pub-nav-item{display:grid;grid-template-columns:38px minmax(0,1fr) 14px;align-items:center;gap:8px;min-height:54px;padding:8px 10px;border-radius:14px;color:#c9c0c5;text-decoration:none;border:1px solid transparent;transition:background .18s ease,border-color .18s ease,transform .18s ease,color .18s ease}
.pub-nav-item:hover{background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.08);color:#fff;transform:translateX(2px)}
.pub-nav-item.active{background:linear-gradient(135deg,#f90087,#d90073);border-color:rgba(255,255,255,.12);color:#fff;box-shadow:0 12px 25px rgba(224,0,117,.22)}
.pub-nav-icon{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:rgba(255,255,255,.06);color:#f4aecf;font-size:15px;font-weight:900}
.pub-nav-item.active .pub-nav-icon{background:rgba(255,255,255,.18);color:#fff}
.pub-nav-copy{min-width:0}.pub-nav-copy strong{display:block;font-size:12px;font-weight:800;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pub-nav-copy small{display:block;margin-top:3px;font-size:9.5px;line-height:1.15;color:#81777d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pub-nav-item:hover .pub-nav-copy small,.pub-nav-item.active .pub-nav-copy small{color:#f3c9dc}
.pub-nav-arrow{color:#61595e;font-size:17px}.pub-nav-item.active .pub-nav-arrow{color:#fff}
.pub-sidebar-footer{flex:0 0 auto;display:grid;grid-template-columns:40px minmax(0,1fr) 34px;align-items:center;gap:9px;padding:13px 14px;border-top:1px solid rgba(255,255,255,.09);background:rgba(0,0,0,.12)}
.pub-user-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#ff4fab,#d90073);font-weight:900;color:#fff;box-shadow:0 8px 18px rgba(218,0,116,.22)}
.pub-user-copy{min-width:0}.pub-user-copy strong{display:block;color:#fff;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pub-user-copy small{display:block;margin-top:2px;color:#8e8389;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pub-logout{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;text-decoration:none;color:#d9cfd4;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);font-size:17px}.pub-logout:hover{background:#e50078;color:#fff}
.pub-sidebar-backdrop{display:none}
.pub-workspace{min-width:0;min-height:100vh;background:#f5f6fa}
.pub-topbar{position:sticky;top:0;z-index:900;min-height:72px;padding:11px 20px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-bottom:1px solid #ebe7eb;box-shadow:0 7px 24px rgba(25,16,22,.035)}
.pub-topbar-left{display:flex;align-items:center;gap:11px;min-width:0}.pub-topbar-kicker{font-size:9.5px;color:#a07189;font-weight:900;letter-spacing:.10em;text-transform:uppercase}.pub-topbar h1{margin:2px 0 0;font-size:19px;line-height:1.12;color:#171318;font-weight:850}
.pub-topbar-right{display:flex;align-items:center;gap:8px}.pub-topbar-user{display:flex;align-items:center;gap:9px;border:1px solid #eee3e9;border-radius:14px;background:#fff;padding:7px 11px}.pub-topbar-user small{display:block;font-size:9px;color:#8a7f86}.pub-topbar-user strong{display:block;font-size:11px;color:#20191d}.pub-topbar-dot{width:9px;height:9px;border-radius:50%;background:#18a66a;box-shadow:0 0 0 4px rgba(24,166,106,.11)}
.pub-pos-total,.pub-pos-mini{border:1px solid #f1dfe8;background:#fff;border-radius:13px;padding:7px 10px}.pub-pos-total{min-width:145px;background:#fff5fa}.pub-pos-total span,.pub-pos-mini span{display:block;font-size:8px;color:#8b7d85;text-transform:uppercase;font-weight:800;letter-spacing:.05em}.pub-pos-total strong{font-size:13px;color:#d50070}.pub-pos-mini strong{font-size:11px;color:#2b2227}
.pub-mobile-menu{display:none;width:38px;height:38px;border-radius:11px;border:1px solid #eadfe5;background:#fff;color:#d90073;font-size:20px;cursor:pointer}
.pub-page-content{padding:14px 16px 24px;min-width:0}

/* Elimina visualmente la navegación superior histórica si algún archivo la inyecta. */
.publinea-sidebar-ui .pos-header,
.publinea-sidebar-ui .subnav{display:none!important}

/* Dashboard: al existir sidebar único, no necesitamos un segundo lanzador de módulos. */
.publinea-sidebar-ui .home-menu{display:none!important}
.publinea-sidebar-ui .dashboard-home{gap:12px!important;padding-bottom:14px!important}
.publinea-sidebar-ui .dashboard-hero{border-radius:20px!important;padding:19px 21px!important}
.publinea-sidebar-ui .dashboard-toolbar{border-radius:16px!important}
.publinea-sidebar-ui .panel{border-radius:17px!important}

@media (min-width:1600px){
    .publinea-sidebar-ui .pub-page-content{padding:16px 20px 26px}
}
@media (max-width:1180px){
    .publinea-sidebar-ui .publinea-shell{grid-template-columns:246px minmax(0,1fr)!important}
    .pub-sidebar-brand{padding-left:14px;padding-right:14px}
    .pub-brand-logo-wrap{width:46px;height:46px;flex-basis:46px}.pub-brand-copy strong{font-size:16px}
    .pub-nav-item{grid-template-columns:34px minmax(0,1fr) 12px;padding-left:8px;padding-right:8px}.pub-nav-icon{width:32px;height:32px}
}
@media (max-width:900px){
    .publinea-sidebar-ui .publinea-shell{display:block!important}
    .pub-sidebar{position:fixed;left:0;top:0;width:min(286px,86vw);transform:translateX(-105%);transition:transform .22s ease;box-shadow:18px 0 46px rgba(18,11,15,.32)}
    body.pub-sidebar-open .pub-sidebar{transform:translateX(0)}
    .pub-sidebar-backdrop{display:block;position:fixed;inset:0;background:rgba(15,9,13,.48);z-index:1100;opacity:0;pointer-events:none;transition:opacity .2s ease}
    body.pub-sidebar-open .pub-sidebar-backdrop{opacity:1;pointer-events:auto}
    .pub-mobile-menu{display:grid;place-items:center}
    .pub-topbar{min-height:64px;padding:9px 12px}.pub-page-content{padding:10px 9px 18px}.pub-topbar h1{font-size:17px}
    .pub-pos-mini{display:none}.pub-pos-total{min-width:132px}
}
@media (max-width:560px){
    .pub-topbar-right .pub-topbar-user{display:none}
    .pub-topbar{align-items:center}.pub-page-content{padding-left:7px;padding-right:7px}
    .pub-pos-total{min-width:118px;padding:6px 8px}.pub-pos-total strong{font-size:11.5px}
}
@media print{
    .pub-sidebar,.pub-sidebar-backdrop,.pub-topbar{display:none!important}
    .publinea-sidebar-ui .publinea-shell{display:block!important}
    .pub-page-content{padding:0!important}
}


/* PUBLINEA · BADGES Y PERFIL PRODUCCIÓN */
.pub-nav-badge{min-width:23px;height:23px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#ff0a8c;color:#fff;font-size:9px;font-weight:900;box-shadow:0 5px 14px rgba(255,10,140,.25)}
.pub-nav-item.active .pub-nav-badge{background:#fff;color:#d90073}
.production-only-note{border:1px solid #bdebd0;background:#f1fcf6;color:#17643b;border-radius:13px;padding:10px 12px;font-size:.76rem;line-height:1.4}
.production-ready-alert{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #bdebd0;background:linear-gradient(135deg,#effcf5,#fff);border-radius:14px;padding:10px 12px;color:#175d39}.production-ready-alert strong{font-size:.82rem}.production-ready-alert span{font-size:.72rem;color:#547060}.production-ready-count{min-width:30px;height:30px;border-radius:999px;display:grid;place-items:center;background:#16a34a;color:#fff;font-weight:900}
.production-task-owner{display:flex;align-items:center;gap:7px;min-height:35px;padding:7px 9px;border:1px solid #e3dce1;border-radius:9px;background:#f8f7f8;color:#5f5960;font-size:.74rem}
.production-notified{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:999px;background:#ecfdf3;color:#166534;border:1px solid #bbf7d0;font-size:.67rem;font-weight:800}
@media(max-width:700px){.production-ready-alert{align-items:flex-start}.production-ready-count{flex:0 0 auto}}
