* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6fb;
    color: #172033;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #101828, #172033);
    color: #fff;
    padding: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 38px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #d96c8c, #4db6c6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.brand strong {
    display: block;
    font-size: 16px;
    letter-spacing: 1px;
}

.brand span {
    font-size: 12px;
    color: #b9c2d6;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar nav a {
    color: #d7def0;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 14px;
    font-weight: 600;
}

.sidebar nav a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.main {
    flex: 1;
    padding: 26px;
}

.topbar {
    background: #fff;
    border-radius: 24px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 12px 30px rgba(16,24,40,.08);
    margin-bottom: 24px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 5px 0 0;
    color: #667085;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-box a {
    background: #101828;
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
}

.content {
    background: #fff;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(16,24,40,.06);
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 18px;
}

.card {
    border: 1px solid #edf0f7;
    border-radius: 20px;
    padding: 22px;
    background: linear-gradient(180deg, #fff, #f9fbff);
}

.card span {
    color: #667085;
    font-size: 14px;
}

.card strong {
    display: block;
    font-size: 28px;
    margin-top: 8px;
}

.form-inline {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

input {
    padding: 13px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    font-size: 15px;
}

button {
    border: 0;
    background: #d96c8c;
    color: #fff;
    padding: 13px 18px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px;
    border-bottom: 1px solid #edf0f7;
    text-align: left;
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #027a48;
    font-weight: 700;
    font-size: 12px;
}

.btn-primary {
    display: inline-block;
    background: #d96c8c;
    color: #fff;
    text-decoration: none;
    padding: 13px 18px;
    border-radius: 12px;
    font-weight: 800;
}

select,
textarea {
    width: 100%;
    max-width: 620px;
    padding: 13px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    font-size: 15px;
    font-family: Arial, Helvetica, sans-serif;
}

form label {
    font-weight: 700;
    color: #344054;
}

form input {
    width: 100%;
    max-width: 620px;
}

.btn-small {
    display: inline-block;
    background: #101828;
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.image-card {
    border: 1px solid #edf0f7;
    border-radius: 18px;
    padding: 12px;
    background: #fff;
}

.image-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 14px;
    background: #f4f6fb;
}

.image-card p {
    margin: 10px 0 0;
    color: #667085;
    font-size: 13px;
}

#flash-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:99999;
    backdrop-filter:blur(4px);
}

.flash-modal{
    background:#fff;
    padding:22px 28px;
    border-radius:18px;
    min-width:320px;
    max-width:500px;
    text-align:center;
    font-weight:600;
    box-shadow:0 20px 60px rgba(0,0,0,.25);
}

.flash-erro{
    border-left:6px solid #dc2626;
}

.flash-sucesso{
    border-left:6px solid #16a34a;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.32);
}

.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.store-logo {
    max-width: 160px;
    max-height: 86px;
    object-fit: contain;
    border-radius: 14px;
}


/* =========================================================
   STRATUM COMMERCE - TENANT BRANDING
   ========================================================= */

.store-branding {
    text-align: center;
    padding: 18px 12px 20px;
}

.store-logo {
    display: block;
    object-fit: contain;
    margin: 0 auto 14px;
}

.store-logo.logo-small {
    width: 80px;
    max-height: 80px;
}

.store-logo.logo-medium {
    width: 120px;
    max-height: 120px;
}

.store-logo.logo-large {
    width: 160px;
    max-height: 160px;
}

.store-logo.logo-xl {
    width: 220px;
    max-height: 220px;
}

.store-brand-title {
    font-size: 24px;
    line-height: 1.05;
    text-align: center;
    margin: 8px 0;
}

.store-brand-tagline {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tenant-primary, #0f6674);
    margin: 8px auto;
}

.store-brand-description {
    font-size: 13px;
    line-height: 1.35;
    color: #334155;
    max-width: 160px;
    margin: 8px auto 0;
}

.store-branding.branding-fashion .store-brand-title {
    display: none;
}

.store-branding.branding-minimal .store-brand-title,
.store-branding.branding-minimal .store-brand-description,
.store-branding.branding-minimal .store-brand-tagline {
    display: none;
}

@media (max-width: 768px) {
    .store-logo.logo-large,
    .store-logo.logo-xl {
        width: 130px;
        max-height: 130px;
    }
}

.btn-open-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    transition: 0.18s ease;
}

.btn-open-order:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.20);
}

.btn-open-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    transition: 0.18s ease;
}

.btn-open-order:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.20);
}

.badge-aguardando_separacao {
    background: #fef3c7;
    color: #92400e;
}

.badge-separado {
    background: #dbeafe;
    color: #1e40af;
}

.badge-postado {
    background: #dcfce7;
    color: #166534;
}

.badge-entregue {
    background: #bbf7d0;
    color: #14532d;
}

.whatsapp-link {
    text-decoration: none;
    font-weight: 800;
    color: #16a34a;
}

.kpi-atrasado {
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
}

.badge {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.order-link {
    font-weight: 900;
    color: #0f172a;
    text-decoration: none;
}

.order-link:hover {
    text-decoration: underline;
}

.pedido-atrasado {
    background: rgba(239, 68, 68, 0.04);
}

.pedido-atrasado {
    background: rgba(239, 68, 68, 0.055);
}

.pedido-atrasado td {
    border-top: 1px solid rgba(239, 68, 68, 0.12);
    border-bottom: 1px solid rgba(239, 68, 68, 0.12);
}
