*{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;
    }
}