/* =========================================================
   SEYNCLOTHING — ADMIN.CSS
   Painel · Tokens + Componentes + Login + Estoque + Reembolsos
   ========================================================= */


/* ---------------------------------------------------------
   01. TOKENS
   --------------------------------------------------------- */
:root {

    --bg:            #08090d;
    --surface-0:     #0d1117;
    --surface-1:     #12171f;
    --surface-2:     #1a212c;
    --surface-3:     #232b38;

    --border:        #1f2937;
    --border-strong: #2d3748;
    --border-subtle: rgba(255, 255, 255, .06);

    --text-1:        #f7f9fc;
    --text-2:        #9ba7b8;
    --text-3:        #6b7685;
    --text-4:        #4a5566;

    --accent:        #2563eb;
    --accent-hover:  #1d4ed8;
    --accent-soft:   rgba(37, 99, 235, .14);

    --success:       #10b981;
    --success-soft:  rgba(16, 185, 129, .14);
    --warning:       #f59e0b;
    --warning-soft:  rgba(245, 158, 11, .14);
    --danger:        #ef4444;
    --danger-soft:   rgba(239, 68, 68, .14);
    --info:          #3b82f6;
    --info-soft:     rgba(59, 130, 246, .14);

    --ff-sans:       'Inter', system-ui, -apple-system, sans-serif;
    --ff-mono:       'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 56px;

    --sidebar-w: 260px;
    --sidebar-w-collapsed: 72px;
    --topbar-h: 72px;

    --radius-sm: 6px;
    --radius:    8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow:    0 4px 16px rgba(0, 0, 0, .4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .6);

    --t: .2s cubic-bezier(.4, 0, .2, 1);
}


/* ---------------------------------------------------------
   02. RESET
   --------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.app {
    background: var(--bg);
    color: var(--text-1);
    font-family: var(--ff-sans);
    font-size: 14px;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    font-size: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

svg {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

ul {
    list-style: none;
}

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

::selection {
    background: var(--accent);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--surface-3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.mono {
    font-family: var(--ff-mono);
    font-size: .85em;
    letter-spacing: -.01em;
    color: var(--text-2);
}


/* ---------------------------------------------------------
   03. TELA DE LOGIN
   --------------------------------------------------------- */
.admin-login {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
    transition: opacity .3s ease, pointer-events .3s ease;
}

.admin-login-backdrop {
    position: absolute;
    inset: 0;
    background: #04060b;
    background-image:
        radial-gradient(800px 600px at 20% -10%, rgba(37, 99, 235, .12), transparent 60%),
        radial-gradient(600px 500px at 100% 100%, rgba(30, 64, 175, .15), transparent 65%);
}

.admin-login-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    background: linear-gradient(180deg, #0d1117, #12171f);
    border: 1px solid #2d3748;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
    animation: loginIn .6s cubic-bezier(.22, 1, .36, 1);
}

@keyframes loginIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.admin-login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid #1f2937;
}

.admin-login-brand .brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    border-radius: 8px;
}

.admin-login-brand strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #f7f9fc;
}

.admin-login-brand small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6b7685;
}

.admin-login-box h1 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: #f7f9fc;
}

.admin-login-box h1 em {
    display: block;
    font-style: normal;
    font-weight: 400;
    color: #6b7685;
}

.admin-login-box > p {
    margin: 0 0 30px;
    font-size: 13px;
    line-height: 1.6;
    color: #9ba7b8;
}

.admin-login-field {
    margin-bottom: 20px;
}

.admin-login-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #9ba7b8;
}

.admin-login-input {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-login-input input {
    width: 100%;
    padding: 14px 46px 14px 16px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    letter-spacing: .04em;
    color: #f7f9fc;
    background: #08090d;
    border: 1px solid #2d3748;
    border-radius: 6px;
    outline: none;
    transition: border-color .2s, background .2s;
}

.admin-login-input input::placeholder {
    color: #4a5566;
}

.admin-login-input input:focus {
    border-color: #2563eb;
    background: #0d1117;
}

.admin-login-input button {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #6b7685;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: color .2s, background .2s;
}

.admin-login-input button:hover {
    color: #f7f9fc;
    background: #1a212c;
}

.admin-login-input button.active {
    color: #2563eb;
}

.admin-login-input button svg {
    width: 16px;
    height: 16px;
}

.admin-login-erro {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #ef4444;
    min-height: 16px;
}

.admin-login-btn {
    width: 100%;
    padding: 15px 24px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.admin-login-btn:hover {
    background: #1d4ed8;
}

.admin-login-btn:active {
    transform: translateY(1px);
}

.admin-login-foot {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #1f2937;
    text-align: center;
}

.admin-login-foot a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #9ba7b8;
    text-decoration: none;
    transition: color .2s;
}

.admin-login-foot a:hover {
    color: #f7f9fc;
}

.admin-login-foot svg {
    width: 14px;
    height: 14px;
}

.admin-login-box.shake {
    animation: shake .4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-6px); }
    40%, 60% { transform: translateX(6px); }
}

.admin-login-box.sucesso {
    border-color: #10b981;
}

.admin-login-box.sucesso .admin-login-btn {
    background: #10b981;
}

body.admin-locked {
    overflow: hidden;
}


/* ---------------------------------------------------------
   04. SIDEBAR
   --------------------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface-0);
    border-right: 1px solid var(--border);
    z-index: 100;
    transition: width var(--t), transform var(--t);
}

.sidebar.collapsed {
    width: var(--sidebar-w-collapsed);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-search,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item span:not(.nav-badge),
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .system-health,
.sidebar.collapsed .back-store span {
    display: none;
}

.sidebar.collapsed .sidebar-collapse svg {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .back-store {
    justify-content: center;
    padding: 12px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--topbar-h);
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent), #1e40af);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.brand-text strong {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-1);
}

.brand-text small {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .02em;
    color: var(--text-3);
}

.sidebar-collapse {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--text-3);
    border-radius: var(--radius-sm);
    transition: background var(--t), color var(--t);
}

.sidebar-collapse:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.sidebar-collapse svg {
    width: 14px;
    height: 14px;
    transition: transform var(--t);
}

.sidebar-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 12px 4px;
    padding: 0 10px;
    height: 34px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--t), background var(--t);
}

.sidebar-search:focus-within {
    border-color: var(--accent);
    background: var(--surface-2);
}

.sidebar-search svg {
    width: 14px;
    height: 14px;
    color: var(--text-3);
}

.sidebar-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-1);
}

.sidebar-search input::placeholder {
    color: var(--text-3);
}

.sidebar-search kbd {
    padding: 2px 5px;
    font-family: var(--ff-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-section + .nav-section {
    margin-top: 16px;
}

.nav-label {
    display: block;
    padding: 0 10px 6px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-4);
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    transition: background var(--t), color var(--t);
}

.nav-item svg {
    width: 16px;
    height: 16px;
}

.nav-item:hover {
    background: var(--surface-1);
    color: var(--text-1);
}

.nav-item.active {
    background: var(--accent-soft);
    color: var(--text-1);
}

.nav-item.active svg {
    color: var(--accent);
}

.nav-badge {
    margin-left: auto;
    padding: 1px 6px;
    font-family: var(--ff-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-1);
    background: var(--surface-3);
    border-radius: 99px;
}

.nav-badge-warn {
    color: var(--warning);
    background: var(--warning-soft);
}

.sidebar-foot {
    padding: 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.system-health {
    padding: 10px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.health-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 11px;
}

.health-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--success);
    flex-shrink: 0;
}

.health-label {
    color: var(--text-2);
}

.health-value {
    margin-left: auto;
    font-family: var(--ff-mono);
    font-weight: 600;
    color: var(--success);
}

.health-bar {
    height: 3px;
    background: var(--surface-3);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #34d399);
    border-radius: 99px;
}

.system-health small {
    font-size: 10px;
    color: var(--text-3);
}

.back-store {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    transition: background var(--t), color var(--t);
}

.back-store svg {
    width: 14px;
    height: 14px;
    transition: transform var(--t);
}

.back-store:hover {
    background: var(--surface-1);
    color: var(--text-1);
}

.back-store:hover svg {
    transform: translateX(-2px);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    z-index: 90;
}


/* ---------------------------------------------------------
   05. APP SHELL
   --------------------------------------------------------- */
.app-shell {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--t);
}

.sidebar.collapsed ~ .app-shell {
    margin-left: var(--sidebar-w-collapsed);
}


/* ---------------------------------------------------------
   06. TOPBAR
   --------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--topbar-h);
    padding: 0 var(--space-8);
    background: rgba(8, 9, 13, .9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

.mobile-menu {
    display: none;
}

.topbar-title {
    flex: 1;
    min-width: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
}

.breadcrumb a {
    transition: color var(--t);
}

.breadcrumb a:hover {
    color: var(--text-1);
}

.breadcrumb svg {
    width: 12px;
    height: 12px;
    color: var(--text-4);
}

.breadcrumb span {
    color: var(--text-2);
}

.topbar-title h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}


/* ---------------------------------------------------------
   07. BOTÕES E ICON BTNS
   --------------------------------------------------------- */
.icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    transition: background var(--t), color var(--t);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.icon-btn:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.icon-btn-sm {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--text-3);
    border-radius: var(--radius-sm);
    transition: background var(--t), color var(--t);
}

.icon-btn-sm svg {
    width: 16px;
    height: 16px;
}

.icon-btn-sm:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -.005em;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}

.btn svg {
    width: 14px;
    height: 14px;
}

.btn-primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 1px 2px rgba(0, 0, 0, .4);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

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

.btn-ghost {
    color: var(--text-2);
    background: transparent;
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text-1);
    border-color: var(--border-strong);
}


/* ---------------------------------------------------------
   08. DROPDOWNS
   --------------------------------------------------------- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 320px;
    padding: 4px;
    background: var(--surface-1);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all var(--t);
    z-index: 60;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--border);
}

.dropdown-head strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.dropdown-head span {
    font-size: 11px;
    color: var(--text-3);
}

.dropdown-foot {
    display: block;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: var(--accent);
    border-top: 1px solid var(--border);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    transition: background var(--t);
}

.dropdown-foot:hover {
    background: var(--surface-2);
}

.notif-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: background var(--t);
}

.notif-item.unread {
    background: var(--surface-2);
}

.notif-item + .notif-item {
    margin-top: 2px;
}

.notif-item:hover {
    background: var(--surface-3);
}

.notif-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.notif-icon svg {
    width: 14px;
    height: 14px;
}

.notif-icon.info    { background: var(--info-soft);    color: var(--info); }
.notif-icon.warn    { background: var(--warning-soft); color: var(--warning); }
.notif-icon.success { background: var(--success-soft); color: var(--success); }

.notif-item > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.notif-item strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.notif-item small {
    font-size: 12px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-item em {
    font-size: 11px;
    font-style: normal;
    color: var(--text-3);
    margin-top: 2px;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: var(--radius-sm);
    transition: background var(--t);
}

.user-btn:hover {
    background: var(--surface-2);
}

.user-avatar,
.user-avatar-lg {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #1e40af);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.user-avatar    { width: 28px; height: 28px; font-size: 12px; }
.user-avatar-lg { width: 40px; height: 40px; font-size: 16px; }

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.user-info strong {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.2;
}

.user-info small {
    font-size: 10px;
    color: var(--text-3);
    line-height: 1.2;
}

.user-chevron {
    width: 12px;
    height: 12px;
    color: var(--text-3);
}

.user-menu {
    min-width: 260px;
    padding: 4px;
}

.dropdown-user-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.dropdown-user-head strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.dropdown-user-head small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
}

.user-menu ul {
    padding: 4px;
}

.user-menu ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    transition: background var(--t), color var(--t);
}

.user-menu ul li a:hover {
    background: var(--surface-2);
    color: var(--text-1);
}

.user-menu ul li svg {
    width: 15px;
    height: 15px;
    color: var(--text-3);
}

.dropdown-user-foot {
    padding: 4px;
    border-top: 1px solid var(--border);
}

.dropdown-user-foot .logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--danger);
    border-radius: var(--radius-sm);
    transition: background var(--t);
}

.dropdown-user-foot .logout:hover {
    background: var(--danger-soft);
}

.dropdown-user-foot .logout svg {
    width: 15px;
    height: 15px;
}


/* ---------------------------------------------------------
   09. CONTENT
   --------------------------------------------------------- */
.content {
    flex: 1;
    padding: var(--space-8);
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn .35s cubic-bezier(.4, 0, .2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: var(--space-7);
}

.page-head h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text-1);
    margin-bottom: 4px;
}

.page-head p {
    font-size: 13px;
    color: var(--text-2);
}


/* ---------------------------------------------------------
   10. KPI CARDS
   --------------------------------------------------------- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--t);
}

.kpi:hover {
    border-color: var(--border-strong);
}

.kpi header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.kpi header > span:first-child {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-2);
}

.kpi-period {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-4);
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--text-1);
    font-family: var(--ff-sans);
}

.kpi footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    font-family: var(--ff-mono);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.trend svg {
    width: 11px;
    height: 11px;
}

.trend-up      { color: var(--success); background: var(--success-soft); }
.trend-down    { color: var(--danger);  background: var(--danger-soft); }
.trend-neutral { color: var(--text-3);  background: var(--surface-2); }

.kpi footer small {
    font-size: 11px;
    color: var(--text-3);
}


/* ---------------------------------------------------------
   11. PANELS
   --------------------------------------------------------- */
.panel {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: var(--space-6);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-head h2 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--text-1);
    margin-bottom: 2px;
}

.panel-sub {
    font-size: 12px;
    color: var(--text-3);
}

.panel-tabs {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.tab {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text-3);
    border-radius: 4px;
    transition: all var(--t);
}

.tab:hover {
    color: var(--text-1);
}

.tab.active {
    background: var(--surface-3);
    color: var(--text-1);
}

.grid-2col {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.grid-2col .panel {
    margin-bottom: 0;
}

.panel-chart {
    padding-bottom: 4px;
}

.chart-wrap {
    padding: 20px 24px 8px;
}

.chart-svg {
    width: 100%;
    height: 240px;
    display: block;
}

.chart-grid line {
    stroke: var(--border);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.chart-area {
    animation: chartIn 1s ease-out;
}

.chart-line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: chartLineIn 1.6s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes chartLineIn {
    to { stroke-dashoffset: 0; }
}

@keyframes chartIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.chart-axis-x {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    padding: 0 24px;
    margin-top: -6px;
    text-align: center;
}

.chart-axis-x span {
    font-family: var(--ff-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .08em;
    color: var(--text-4);
}

.panel-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.stat-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-2);
}

.stat-inline strong {
    font-family: var(--ff-mono);
    font-weight: 600;
    color: var(--text-1);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.dot-accent { background: var(--accent); }
.dot-muted  { background: var(--surface-3); }

.activity-list {
    padding: 8px 12px 16px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--t);
}

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

.activity-item:hover {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-dot.success { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.activity-dot.accent  { background: var(--accent);  box-shadow: 0 0 0 3px var(--accent-soft); }
.activity-dot.warn    { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.activity-dot.muted   { background: var(--text-4); }

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-content strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 2px;
}

.activity-content small {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-item em {
    font-family: var(--ff-mono);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    color: var(--text-4);
    flex-shrink: 0;
    margin-top: 2px;
}


/* ---------------------------------------------------------
   12. TABELAS
   --------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
}

.table {
    font-size: 13px;
}

.table th,
.table td {
    padding: 12px 24px;
    text-align: left;
    vertical-align: middle;
}

.table th {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-3);
    background: var(--surface-0);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    color: var(--text-1);
    border-bottom: 1px solid var(--border-subtle);
}

.table tbody tr {
    transition: background var(--t);
}

.table tbody tr:hover {
    background: var(--surface-2);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table td > strong {
    font-weight: 600;
}

.table .col-check {
    width: 44px;
    padding-right: 0;
}

.table .col-actions {
    width: 60px;
    text-align: right;
}

.table input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    background: var(--surface-0);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all var(--t);
}

.table input[type="checkbox"]:hover {
    border-color: var(--accent);
}

.table input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.table input[type="checkbox"]:checked::after {
    content: "";
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.cell-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.avatar-sm {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #1e40af);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cell-user strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.cell-user small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
}

.cell-product {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cell-product img {
    width: 40px;
    height: 50px;
    object-fit: cover;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.cell-product strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.cell-product small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
    border-radius: 99px;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge-success { color: var(--success); background: var(--success-soft); }
.badge-warn    { color: var(--warning); background: var(--warning-soft); }
.badge-info    { color: var(--info);    background: var(--info-soft); }
.badge-danger  { color: var(--danger);  background: var(--danger-soft); }
.badge-muted   { color: var(--text-3);  background: var(--surface-2); }

.table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-3);
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.pagination button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--t);
}

.pagination button svg {
    width: 14px;
    height: 14px;
}

.pagination button:hover:not(:disabled) {
    background: var(--surface-2);
    color: var(--text-1);
    border-color: var(--border-strong);
}

.pagination button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pagination span {
    font-family: var(--ff-mono);
    font-size: 12px;
    color: var(--text-2);
}


/* ---------------------------------------------------------
   13. TOOLBAR
   --------------------------------------------------------- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--space-5);
}

.toolbar-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 380px;
    padding: 0 12px;
    height: 36px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--t), background var(--t);
}

.toolbar-search:focus-within {
    border-color: var(--accent);
    background: var(--surface-2);
}

.toolbar-search svg {
    width: 15px;
    height: 15px;
    color: var(--text-3);
}

.toolbar-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    color: var(--text-1);
}

.toolbar-search input::placeholder {
    color: var(--text-3);
}

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

.select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    background-color: var(--surface-1);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7685' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    outline: none;
    transition: border-color var(--t);
}

.select:hover {
    border-color: var(--border-strong);
}

.select:focus {
    border-color: var(--accent);
}

.select option {
    background: var(--surface-2);
    color: var(--text-1);
}


/* ---------------------------------------------------------
   14. EMPTY STATE
   --------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 80px 24px;
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    color: var(--text-3);
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    margin-bottom: 6px;
}

.empty-icon svg {
    width: 28px;
    height: 28px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
}

.empty-state p {
    max-width: 420px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-2);
    margin-bottom: 6px;
}


/* ---------------------------------------------------------
   15. MODAL
   --------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t), visibility var(--t);
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(6px);
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: var(--surface-1);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(12px) scale(.98);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.modal.open .modal-dialog {
    transform: translateY(0) scale(1);
}

.modal-dialog.modal-lg {
    max-width: 720px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-head h3 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-1);
    margin-bottom: 3px;
}

.modal-head p {
    font-size: 12px;
    color: var(--text-3);
}

.modal-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 22px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
}

.modal-foot-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-foot-split .danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, .3);
}

.modal-foot-split .danger:hover {
    background: rgba(239, 68, 68, .08);
    border-color: var(--danger);
}

.modal-foot-split > div {
    display: flex;
    gap: 10px;
}

.modal-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.modal-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 14px;
}

.modal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.modal-info > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-info span {
    font-size: 11px;
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.modal-info strong {
    font-size: 13px;
    color: var(--text-1);
    font-weight: 500;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.order-item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.order-item img {
    width: 44px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--surface-2);
}

.order-item > div {
    min-width: 0;
}

.order-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-item small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
}

.order-item > strong {
    font-family: var(--ff-mono);
    font-size: 13px;
    color: var(--text-1);
}

.order-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: var(--text-2);
}

.order-total-row strong {
    color: var(--text-1);
    font-weight: 600;
}

.order-total-final {
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.order-total-final strong {
    font-size: 16px;
    font-weight: 700;
}


/* ---------------------------------------------------------
   16. FORMS
   --------------------------------------------------------- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--text-2);
}

.field label span {
    color: var(--danger);
}

.field input,
.field select,
.field textarea {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-1);
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--t), background var(--t);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: var(--border-strong);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    background: var(--surface-1);
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-4);
}

.field textarea {
    resize: vertical;
    min-height: 70px;
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7685' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 32px;
}

.field select option {
    background: var(--surface-2);
    color: var(--text-1);
}


/* ---------------------------------------------------------
   17. ESTOQUE (por tamanho)
   --------------------------------------------------------- */
.estoque-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.estoque-aviso-total {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    border-radius: 8px;
}

.estoque-aviso-total.warn {
    color: var(--warning);
    background: var(--warning-soft);
    border: 1px solid rgba(245, 158, 11, .25);
}

.estoque-aviso-total.danger {
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid rgba(239, 68, 68, .25);
}

.estoque-aviso-total svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.estoque-produto {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.estoque-produto-head {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    background: var(--surface-0);
    border-bottom: 1px solid var(--border);
}

.estoque-produto-head img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--surface-2);
}

.estoque-produto-head strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 2px;
}

.estoque-produto-head small {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--ff-mono);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.estoque-total {
    padding: 6px 12px;
    font-family: var(--ff-mono);
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    white-space: nowrap;
}

.estoque-total.ok {
    color: var(--success);
    background: var(--success-soft);
}

.estoque-total.baixo {
    color: var(--warning);
    background: var(--warning-soft);
}

.estoque-total.zero {
    color: var(--danger);
    background: var(--danger-soft);
}

.estoque-tamanhos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    padding: 14px 18px;
}

.estoque-tamanho {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.estoque-tamanho-label {
    font-family: var(--ff-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    letter-spacing: .1em;
}

.estoque-tamanho-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.estoque-tamanho-controls button {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-2);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    flex-shrink: 0;
}

.estoque-tamanho-controls button:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.estoque-tamanho-input {
    flex: 1;
    min-width: 0;
    height: 26px;
    padding: 0 4px;
    font-family: var(--ff-mono);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    color: var(--text-1);
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    -moz-appearance: textfield;
}

.estoque-tamanho-input::-webkit-outer-spin-button,
.estoque-tamanho-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.estoque-tamanho-input:focus {
    border-color: var(--accent);
}

.estoque-vazio {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}


/* ---------------------------------------------------------
   18. RELATÓRIOS — barras
   --------------------------------------------------------- */
.relatorio-bars {
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.relatorio-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.relatorio-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.relatorio-bar-head strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.relatorio-bar-head span {
    font-family: var(--ff-mono);
    font-size: 12px;
    color: var(--text-2);
}

.relatorio-bar-track {
    height: 6px;
    background: var(--surface-2);
    border-radius: 99px;
    overflow: hidden;
}

.relatorio-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #3b82f6);
    border-radius: 99px;
    transition: width .8s cubic-bezier(.22, 1, .36, 1);
}

.relatorio-bar small {
    font-size: 11px;
    color: var(--text-3);
}


/* ---------------------------------------------------------
   19. TOAST
   --------------------------------------------------------- */
.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 300;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    padding: 12px 16px;
    background: var(--surface-1);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    pointer-events: auto;
    transition: opacity .3s, transform .3s;
    animation: toastIn .4s cubic-bezier(.34, 1.56, .64, 1);
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warn    { border-left-color: var(--warning); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(120%); }
    to   { opacity: 1; transform: translateX(0); }
}


/* ---------------------------------------------------------
   20. BANNER DE ALERTA — REEMBOLSOS PENDENTES
   --------------------------------------------------------- */
.alerta-reembolsos {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    margin-bottom: 24px;
    background: linear-gradient(90deg, rgba(245, 158, 11, .15), rgba(245, 158, 11, .05));
    border: 1px solid rgba(245, 158, 11, .4);
    border-left: 4px solid var(--warning);
    border-radius: 8px;
    color: var(--warning);
    font-size: 13px;
}

.alerta-reembolsos svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alerta-reembolsos span {
    flex: 1;
    color: var(--text-1);
}

.alerta-reembolsos strong {
    color: var(--warning);
    font-weight: 700;
}

.alerta-reembolsos button {
    padding: 8px 16px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    background: var(--warning);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all .3s;
    white-space: nowrap;
}

.alerta-reembolsos button:hover {
    background: #d97706;
    transform: translateY(-1px);
}


/* ---------------------------------------------------------
   21. RESPONSIVO
   --------------------------------------------------------- */
@media (max-width: 1024px) {

    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop.active {
        display: block;
    }

    .app-shell {
        margin-left: 0 !important;
    }

    .mobile-menu {
        display: grid;
    }

    .sidebar-collapse {
        display: none;
    }

    .grid-2col {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 20px;
    }

    .content {
        padding: 24px 20px;
    }
}

@media (max-width: 720px) {

    .topbar {
        gap: 12px;
        padding: 0 16px;
    }

    .topbar-title h1 {
        font-size: 17px;
    }

    .breadcrumb {
        display: none;
    }

    .user-info {
        display: none;
    }

    .user-chevron {
        display: none;
    }

    .content {
        padding: 20px 16px;
    }

    .page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .page-head .btn {
        width: 100%;
        justify-content: center;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-search {
        max-width: none;
    }

    .toolbar-filters {
        flex-direction: column;
    }

    .kpi-value {
        font-size: 24px;
    }

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

    .table th,
    .table td {
        padding: 10px 16px;
    }

    .panel-head {
        padding: 16px;
        flex-wrap: wrap;
    }

    .chart-wrap {
        padding: 16px 16px 8px;
    }

    .chart-axis-x {
        padding: 0 16px;
    }

    .panel-foot {
        padding: 14px 16px;
        gap: 16px;
    }

    .cell-product strong {
        max-width: 180px;
    }

    .toast-stack {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: 0;
        max-width: none;
    }

    .modal-head,
    .modal-body {
        padding: 20px;
    }

    .table-foot {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .estoque-tamanhos {
        grid-template-columns: repeat(2, 1fr);
    }

    .estoque-produto-head {
        grid-template-columns: 50px 1fr;
    }

    .estoque-produto-head img {
        width: 50px;
        height: 50px;
    }

    .estoque-total {
        grid-column: 1 / -1;
        text-align: center;
    }

    .modal-foot-split {
        flex-direction: column;
        gap: 12px;
    }

    .modal-foot-split > div {
        width: 100%;
    }

    .modal-foot-split button {
        flex: 1;
    }

    .alerta-reembolsos {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .alerta-reembolsos svg {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {

    .admin-login-box {
        padding: 30px 24px;
    }

    .admin-login-box h1 {
        font-size: 22px;
    }
}


/* ---------------------------------------------------------
   22. ACESSIBILIDADE
   --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

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

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

@media (max-width: 900px) {
    .kpi-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .kpi-grid-6 { grid-template-columns: 1fr; }
}