:root{
    --bg:#0b1220;
    --bg-soft:#101827;
    --bg-soft-2:#0f172a;
    --panel:#ffffff;
    --panel-soft:#f8fafc;
    --panel-muted:#eef2f7;
    --text:#111827;
    --text-soft:#6b7280;
    --text-light:#94a3b8;
    --line:#e5e7eb;
    --line-soft:#edf2f7;
    --primary:#2563eb;
    --primary-2:#1d4ed8;
    --primary-3:#60a5fa;
    --success:#15803d;
    --warning:#d97706;
    --danger:#dc2626;
    --sidebar:#09111f;
    --sidebar-2:#0d1730;
    --white:#ffffff;
    --shadow-sm:0 10px 24px rgba(15,23,42,.06);
    --shadow-md:0 18px 40px rgba(15,23,42,.10);
    --shadow-lg:0 24px 60px rgba(15,23,42,.18);
    --radius:20px;
    --radius-sm:14px;
}

*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

html,body{
    width:100%;
    min-height:100%;
    font-family:Arial, Helvetica, sans-serif;
    background:#eef2f7;
    color:var(--text);
}

/* =========================
   LOGIN
========================= */
.login-body{
    min-height:100vh;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,.30), transparent 26%),
        radial-gradient(circle at bottom right, rgba(96,165,250,.18), transparent 26%),
        linear-gradient(135deg, #08111f, #0e172b 42%, #111827);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.login-wrapper{
    width:100%;
    max-width:480px;
}

.login-card{
    background:rgba(255,255,255,.98);
    border-radius:28px;
    box-shadow:0 24px 70px rgba(0,0,0,.30);
    padding:40px;
}

.login-brand{
    width:74px;
    height:74px;
    border-radius:22px;
    background:linear-gradient(135deg, var(--primary), var(--primary-3));
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    font-weight:800;
    margin-bottom:18px;
}

.login-title{
    font-size:30px;
    margin-bottom:8px;
    line-height:1.1;
}

.login-subtitle{
    color:var(--text-soft);
    line-height:1.6;
    margin-bottom:24px;
}

.login-footer-text{
    margin-top:22px;
    text-align:center;
    color:var(--text-soft);
    font-size:14px;
}

/* =========================
   FORM
========================= */
.form-group{
    margin-bottom:18px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    font-weight:700;
    font-size:14px;
    color:#1f2937;
}

.form-group input,
.form-group select,
.form-group textarea,
.search-bar input,
.search-bar select{
    width:100%;
    border:1px solid #d1d5db;
    background:#fff;
    border-radius:16px;
    padding:14px 16px;
    font-size:15px;
    outline:none;
    transition:.2s ease;
    color:var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.search-bar input:focus,
.search-bar select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.10);
}

.form-group textarea{
    resize:vertical;
    min-height:110px;
}

.form-card{
    max-width:100%;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2, minmax(240px, 1fr));
    gap:18px;
}

.form-grid .full{
    grid-column:1 / -1;
}

.checkbox-row label{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
}

.search-bar{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

/* =========================
   BUTTONS
========================= */
.btn-primary,
.quick-btn,
.hero-secondary-btn,
.logout-btn,
.btn-small{
    transition:.2s ease;
}

.btn-primary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:none;
    background:linear-gradient(135deg, var(--primary), var(--primary-2));
    color:#fff;
    font-weight:800;
    border-radius:16px;
    padding:14px 18px;
    cursor:pointer;
    text-decoration:none;
    box-shadow:0 10px 24px rgba(37,99,235,.18);
}

.btn-primary:hover{
    transform:translateY(-1px);
    box-shadow:0 14px 28px rgba(37,99,235,.24);
}

.quick-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:50px;
    text-align:center;
    text-decoration:none;
    background:#f8fafc;
    border:1px solid #e5e7eb;
    color:#0f172a;
    border-radius:16px;
    font-weight:800;
    padding:12px 14px;
}

.quick-btn:hover{
    border-color:#bfdbfe;
    background:#eff6ff;
    color:#1d4ed8;
    transform:translateY(-1px);
}

.hero-secondary-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:14px 18px;
    border-radius:16px;
    text-decoration:none;
    font-weight:800;
    color:#fff;
    border:1px solid rgba(255,255,255,.18);
    background:rgba(255,255,255,.08);
}

.hero-secondary-btn:hover{
    background:rgba(255,255,255,.14);
    transform:translateY(-1px);
}

.logout-btn{
    display:block;
    width:100%;
    text-align:center;
    text-decoration:none;
    background:#ef4444;
    color:#fff;
    padding:12px 14px;
    border-radius:14px;
    font-weight:800;
}

.logout-btn:hover{
    background:#dc2626;
}

.btn-small{
    border:none;
    background:#2563eb;
    color:#fff;
    font-weight:800;
    border-radius:12px;
    padding:8px 12px;
    cursor:pointer;
}

.btn-small:hover{
    background:#1d4ed8;
}

/* =========================
   ALERTS
========================= */
.alert{
    padding:14px 16px;
    border-radius:14px;
    margin-bottom:18px;
    font-size:14px;
    font-weight:700;
}

.alert-success{
    background:#ecfdf3;
    color:#166534;
    border:1px solid #bbf7d0;
}

.alert-error{
    background:#fef2f2;
    color:#991b1b;
    border:1px solid #fecaca;
}

/* =========================
   APP SHELL
========================= */
.app-shell{
    display:flex;
    min-height:100vh;
    background:#eef2f7;
}

/* =========================
   SIDEBAR
========================= */
.sidebar{
    width:300px;
    background:
        radial-gradient(circle at top left, rgba(96,165,250,.18), transparent 22%),
        linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
    color:#fff;
    padding:22px 18px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    position:sticky;
    top:0;
    min-height:100vh;
    box-shadow:inset -1px 0 0 rgba(255,255,255,.05);
}

.sidebar-top{
    display:flex;
    flex-direction:column;
}

.premium-brand{
    display:flex;
    align-items:center;
    gap:14px;
    padding:4px 6px 12px 6px;
}

.brand-logo{
    width:56px;
    height:56px;
    border-radius:18px;
    background:linear-gradient(135deg, #2563eb, #60a5fa);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    font-size:20px;
    color:#fff;
    box-shadow:0 12px 24px rgba(37,99,235,.24);
    flex-shrink:0;
}

.brand-texts{
    min-width:0;
}

.brand-title{
    font-size:17px;
    font-weight:900;
    line-height:1.2;
    color:#fff;
}

.brand-subtitle{
    font-size:12px;
    color:rgba(255,255,255,.72);
    margin-top:4px;
}

.sidebar-divider{
    height:1px;
    background:rgba(255,255,255,.08);
    margin:12px 0 16px;
}

.menu{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.menu-link{
    display:flex;
    align-items:center;
    min-height:48px;
    text-decoration:none;
    color:#cbd5e1;
    padding:12px 14px;
    border-radius:15px;
    transition:.2s ease;
    font-weight:700;
    border:1px solid transparent;
}

.menu-link:hover{
    background:rgba(255,255,255,.06);
    color:#fff;
    border-color:rgba(255,255,255,.04);
}

.menu-link.active{
    background:linear-gradient(135deg, rgba(37,99,235,.24), rgba(96,165,250,.12));
    color:#fff;
    border-color:rgba(96,165,250,.20);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}

.premium-sidebar-footer{
    border-top:1px solid rgba(255,255,255,.08);
    padding-top:18px;
}

.premium-user-mini{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:14px;
}

.user-avatar{
    width:44px;
    height:44px;
    border-radius:50%;
    background:linear-gradient(135deg, #1d4ed8, #60a5fa);
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    color:#fff;
    flex-shrink:0;
}

.user-meta{
    min-width:0;
}

.user-name{
    font-weight:800;
    color:#fff;
}

.user-role{
    font-size:13px;
    color:#cbd5e1;
    margin-top:2px;
}

/* =========================
   MAIN
========================= */
.main-content{
    flex:1;
    padding:28px;
    background:#eef2f7;
}

.topbar{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:24px;
}

.topbar h1{
    font-size:32px;
    line-height:1.1;
    margin-bottom:6px;
    color:#0f172a;
}

.topbar p{
    color:var(--text-soft);
    line-height:1.6;
}

.topbar-badge{
    background:#dbeafe;
    color:#1d4ed8;
    border:1px solid #bfdbfe;
    padding:10px 14px;
    border-radius:999px;
    font-weight:800;
    white-space:nowrap;
}

.topbar-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

/* =========================
   HERO DASHBOARD
========================= */
.hero-dashboard{
    display:grid;
    grid-template-columns:1.4fr .8fr;
    gap:20px;
    margin-bottom:24px;
    padding:28px;
    border-radius:24px;
    background:
        radial-gradient(circle at top left, rgba(96,165,250,.22), transparent 28%),
        radial-gradient(circle at bottom right, rgba(29,78,216,.16), transparent 28%),
        linear-gradient(135deg, #0f172a, #13213c 45%, #1d4ed8 130%);
    color:#fff;
    box-shadow:var(--shadow-lg);
}

.hero-dashboard__content h1{
    font-size:34px;
    line-height:1.1;
    margin-bottom:10px;
    color:#fff;
}

.hero-dashboard__content p{
    color:rgba(255,255,255,.86);
    max-width:760px;
    line-height:1.6;
    margin-bottom:22px;
}

.hero-eyebrow{
    display:inline-flex;
    align-items:center;
    padding:8px 14px;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.12);
    font-size:13px;
    font-weight:800;
    margin-bottom:14px;
}

.hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.hero-dashboard__side{
    display:grid;
    gap:14px;
}

.hero-mini-card{
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.10);
    border-radius:18px;
    padding:18px;
    backdrop-filter:blur(8px);
}

.hero-mini-label{
    display:block;
    color:rgba(255,255,255,.75);
    font-size:13px;
    margin-bottom:10px;
}

.hero-mini-card strong{
    font-size:24px;
    color:#fff;
}

/* =========================
   KPI
========================= */
.kpi-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
    gap:18px;
    margin-bottom:24px;
}

.kpi-card{
    background:var(--panel);
    border-radius:22px;
    padding:22px;
    box-shadow:var(--shadow-sm);
    border:1px solid #edf2f7;
}

.kpi-label{
    display:block;
    color:var(--text-soft);
    font-size:14px;
    margin-bottom:10px;
    font-weight:700;
}

.kpi-value{
    font-size:32px;
    font-weight:900;
    color:#0f172a;
    line-height:1;
}

.kpi-foot{
    display:block;
    margin-top:8px;
    color:#6b7280;
    font-size:13px;
    font-weight:600;
}

.kpi-card--blue{background:linear-gradient(135deg, #eff6ff, #ffffff);}
.kpi-card--indigo{background:linear-gradient(135deg, #eef2ff, #ffffff);}
.kpi-card--green{background:linear-gradient(135deg, #ecfdf5, #ffffff);}
.kpi-card--orange{background:linear-gradient(135deg, #fff7ed, #ffffff);}
.kpi-card--red{background:linear-gradient(135deg, #fef2f2, #ffffff);}
.kpi-card--dark{background:linear-gradient(135deg, #f8fafc, #ffffff);}

/* =========================
   PANELS
========================= */
.panel-grid,
.dashboard-grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    margin-bottom:24px;
}

.panel-card{
    background:var(--panel);
    border-radius:22px;
    padding:22px;
    box-shadow:var(--shadow-sm);
    border:1px solid #edf2f7;
    margin-bottom:24px;
}

.panel-head{
    margin-bottom:18px;
}

.panel-head h2{
    font-size:21px;
    line-height:1.2;
    color:#0f172a;
}

/* =========================
   STATS
========================= */
.stats-list{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.stat-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:14px 0;
    border-bottom:1px solid var(--line);
}

.stat-row:last-child{
    border-bottom:none;
}

.stat-row span{
    color:#64748b;
    font-weight:600;
}

.stat-row strong{
    color:#0f172a;
    font-weight:800;
}

.status-ok,
.text-success{
    color:#15803d !important;
}

.text-danger{
    color:#dc2626 !important;
}

/* =========================
   QUICK ACTIONS
========================= */
.quick-actions{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
}

.quick-actions-4{
    grid-template-columns:repeat(2, 1fr);
}

/* =========================
   MODULE STATUS
========================= */
.module-status-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.module-status-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid #e5e7eb;
}

.module-status-item:last-child{
    border-bottom:none;
}

.module-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:74px;
    padding:7px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
}

.module-badge.ok{
    background:#dcfce7;
    color:#166534;
}

/* =========================
   TABLES
========================= */
.table-responsive{
    width:100%;
    overflow-x:auto;
    border-radius:16px;
}

.table-clean{
    width:100%;
    border-collapse:collapse;
    overflow:hidden;
}

.table-clean thead th{
    text-align:left;
    background:#f8fafc;
    color:#334155;
    padding:15px 14px;
    border-bottom:1px solid var(--line);
    font-size:13px;
    font-weight:800;
    letter-spacing:.2px;
}

.table-clean tbody td{
    padding:15px 14px;
    border-bottom:1px solid var(--line);
    font-size:14px;
    vertical-align:top;
    color:#111827;
}

.table-clean tbody tr:hover{
    background:#f8fbff;
}

.table-link{
    color:#1d4ed8;
    text-decoration:none;
    font-weight:800;
}

.table-link:hover{
    text-decoration:underline;
}

.badge{
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:7px 11px;
    font-size:12px;
    font-weight:900;
}

.badge.success{
    background:#dcfce7;
    color:#166534;
}

.badge.pending{
    background:#fef3c7;
    color:#92400e;
}

/* =========================
   HELPERS
========================= */
.w-100{
    width:100%;
}

.muted-text{
    color:#6b7280;
    font-size:14px;
}

.sep{
    border:none;
    border-top:1px solid #e5e7eb;
    margin:20px 0;
}

.alert-panel{
    border-left:5px solid #f59e0b;
}

.alert-list{
    display:grid;
    gap:12px;
}

.alert-item{
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:#9a3412;
    border-radius:14px;
    padding:14px 16px;
    font-weight:700;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px){
    .hero-dashboard{
        grid-template-columns:1fr;
    }

    .panel-grid,
    .dashboard-grid-2{
        grid-template-columns:1fr;
    }
}

@media (max-width: 980px){
    .app-shell{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        min-height:auto;
        position:relative;
    }

    .main-content{
        padding:18px;
    }

    .topbar{
        flex-direction:column;
    }
}

@media (max-width: 800px){
    .form-grid{
        grid-template-columns:1fr;
    }

    .quick-actions,
    .quick-actions-4{
        grid-template-columns:1fr;
    }
}

@media (max-width: 600px){
    .login-card{
        padding:28px 22px;
    }

    .login-title{
        font-size:24px;
    }

    .hero-dashboard{
        padding:22px;
    }

    .hero-dashboard__content h1{
        font-size:28px;
    }

    .kpi-grid{
        grid-template-columns:1fr;
    }

    .topbar h1{
        font-size:26px;
    }
}
.thumb-mini{
    width:64px;
    height:64px;
    object-fit:cover;
    border-radius:12px;
    border:1px solid #e5e7eb;
    background:#fff;
}

.thumb-placeholder{
    width:64px;
    height:64px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:12px;
    background:#f3f4f6;
    color:#6b7280;
    font-size:12px;
    text-align:center;
    padding:6px;
    border:1px solid #e5e7eb;
}

.product-image-large{
    width:100%;
    max-width:420px;
    border-radius:18px;
    border:1px solid #e5e7eb;
    display:block;
    background:#fff;
}

.product-image-placeholder{
    width:100%;
    min-height:280px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:18px;
    background:#f3f4f6;
    color:#6b7280;
    border:1px solid #e5e7eb;
    font-weight:700;
    text-align:center;
    padding:20px;
}

.text-muted-soft{
    color:#64748b;
}

.item-line{
    display:grid;
    grid-template-columns: 1.4fr 1.6fr .6fr .8fr;
    gap:12px;
    margin-bottom:12px;
}

.inline-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    align-items:center;
}

.mt-12{
    margin-top:12px;
}


.form-note{
    font-size:13px;
    color:#64748b;
    margin-top:6px;
}

.active-tab-btn{
    background:#dbeafe;
    border-color:#bfdbfe;
    color:#1d4ed8;
}

.row-unread{
    background:#f8fbff;
}

.message-body-box{
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:16px;
    padding:18px;
    line-height:1.7;
    color:#111827;
    white-space:normal;
}

.priority-urgent{
    color:#b91c1c;
    font-weight:800;
}

.role-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:7px 12px;
    border-radius:999px;
    background:#eef2ff;
    color:#3730a3;
    font-size:12px;
    font-weight:800;
}

.permissions-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:14px;
}

.permission-card{
    display:flex;
    gap:12px;
    align-items:flex-start;
    border:1px solid #e5e7eb;
    background:#fff;
    border-radius:16px;
    padding:14px;
    cursor:pointer;
}

.permission-card input[type="checkbox"]{
    margin-top:4px;
    transform:scale(1.15);
}

.permission-content{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.permission-content strong{
    color:#0f172a;
    font-size:14px;
}

.permission-content span{
    color:#2563eb;
    font-size:12px;
    font-weight:700;
}

.permission-content small{
    color:#64748b;
    font-size:12px;
    line-height:1.5;
}

select[multiple]{
    min-height:220px;
}

.mail-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border-radius:999px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:12px;
    font-weight:700;
}

.item-line-mostrador{
    grid-template-columns: .9fr 1.5fr 1.3fr .6fr .8fr;
}

.table-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.report-highlight{
    border-left:5px solid #2563eb;
}

.sidebar-link{
    position:relative;
}

.sidebar-notification-badge{
    margin-left:auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:22px;
    height:22px;
    padding:0 6px;
    border-radius:999px;
    background:#dc2626;
    color:#fff;
    font-size:11px;
    font-weight:700;
    box-shadow:0 0 0 2px rgba(255,255,255,.85);
}

