:root {
    /* Color Palette - Premium dark theme (Estamparia Lisboa — cyan / magenta accents) */
    --bg-dark: #0f1115;
    --bg-panel: rgba(25, 28, 36, 0.6);
    --bg-card: rgba(30, 34, 45, 0.8);
    --border-light: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    
    --accent-cyan: #00f0ff;
    --accent-magenta: #ff0055;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --glass-blur: blur(12px);
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-accent: 0 0 20px rgba(0, 240, 255, 0.15);
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(255, 0, 85, 0.04) 0%, transparent 50%);
}

/* Utilities */
.accent { color: var(--accent-cyan); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }

/* View Management */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.view.active {
    display: flex;
    opacity: 1;
}

/* =========================================
   ROLE SELECTION (LOGIN)
   ========================================= */
#role-selection {
    height: 100vh;
    width: 100vw;
    align-items: center;
    justify-content: center;
}

.role-container {
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.logo-wrapper {
    margin-bottom: 4rem;
    animation: slideDown 0.6s ease-out;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
    margin-bottom: 1rem;
    color: white;
    box-shadow: var(--shadow-accent);
}

.logo-wrapper h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo-wrapper p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.role-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.role-card {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    width: 280px;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.role-card:nth-child(1) { animation-delay: 0.1s; }
.role-card:nth-child(2) { animation-delay: 0.2s; }
.role-card:nth-child(3) { animation-delay: 0.3s; }

.role-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-accent);
    background: var(--bg-card);
}

.role-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-cyan);
    transition: var(--transition);
}

.role-card:hover .role-icon {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

.role-card h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.role-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.login-screen-wide.role-container {
    max-width: 1280px;
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.logo-wrapper--compact {
    margin-bottom: 2rem;
}

.login-error-banner {
    max-width: 42rem;
    margin: 0 auto 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    font-size: 0.9rem;
}

.login-error-banner.hidden {
    display: none !important;
}

.login-cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    text-align: left;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.login-card {
    flex: 1 1 0;
    min-width: min(280px, 92vw);
    max-width: 400px;
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
    scroll-snap-align: start;
}

.login-card:nth-child(1) { animation-delay: 0.05s; }
.login-card:nth-child(2) { animation-delay: 0.12s; }
.login-card:nth-child(3) { animation-delay: 0.18s; }

.login-card--admin {
    border-color: rgba(0, 240, 255, 0.2);
}

.login-card .role-icon {
    margin: 0 0 1rem 0;
}

.login-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
    text-align: left;
}

.login-card-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
}

.login-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.login-input:focus {
    outline: none;
    border-color: rgba(0, 240, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.12);
}

.login-btn {
    width: 100%;
    margin-top: 0.35rem;
    justify-content: center;
}

.cfg-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}

.user-email-line {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    word-break: break-all;
}

.nav-item-voltar-admin {
    border-left: 3px solid var(--accent-cyan) !important;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.nav-item-voltar-admin:hover {
    border-left-color: var(--accent-magenta) !important;
}

/* =========================================
   MAIN LAYOUT (DASHBOARD)
   ========================================= */
#main-layout {
    height: 100vh;
    width: 100vw;
    display: none; /* Handled by JS */
}
#main-layout.active {
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    background: var(--bg-panel);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon.small {
    width: 32px;
    height: 32px;
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.nav-item.active {
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.role-name {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: capitalize;
}

.status {
    font-size: 0.75rem;
    color: var(--success);
}

.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.topbar {
    height: 80px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    background: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(10px);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.btn-icon:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-magenta);
    color: white;
    font-size: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.btn-primary, .btn-secondary {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}

.btn-primary:hover {
    background: #00d5ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}
.content-area::-webkit-scrollbar { width: 8px; }
.content-area::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* =========================================
   COMPONENTS
   ========================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-card--dash-clickable {
    cursor: pointer;
    border-left: 3px solid rgba(245, 158, 11, 0.5);
}

.stat-card--dash-clickable:hover {
    border-left-color: var(--accent-warn);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.stat-card--dash-clickable:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.trend {
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: block;
}
.trend.positive { color: var(--success); }

/* Tables */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: rgba(0,0,0,0.2);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: var(--transition);
}
.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge.pendente { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.producao { background: rgba(0, 240, 255, 0.15); color: var(--accent-cyan); }
.status-badge.pronto { background: rgba(16, 185, 129, 0.15); color: var(--success); }

/* Forms */
.form-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.col-span-2 {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

input, select {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-light);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

option {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.05);
}

.sizes-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1rem;
}
.sizes-grid div { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.sizes-grid input { width: 100%; text-align: center; }

.file-upload {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-sm);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.file-upload:hover {
    border-color: var(--accent-magenta);
    background: rgba(255, 0, 85, 0.05);
}
.file-upload i { color: var(--accent-magenta); width: 32px; height: 32px; }
.file-upload span { font-size: 0.8rem; color: var(--text-secondary); }

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.price-calc {
    font-size: 1.2rem;
    color: var(--text-secondary);
}
.price-calc strong {
    color: var(--accent-cyan);
    font-size: 1.5rem;
    margin-left: 0.5rem;
}

/* Quadro Produção — lista horizontal (tabela) */
.producao-kanban-resumo {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: rgba(0,0,0,0.18);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
}
.producao-kanban-resumo-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
}
.producao-kanban-resumo-item .badge {
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 240, 255, 0.14);
    color: var(--accent-cyan);
    font-variant-numeric: tabular-nums;
}
.producao-kanban-table-wrap {
    overflow-x: auto;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}
.producao-kanban-table td {
    vertical-align: top;
    font-size: 0.88rem;
}
.producao-kanban-table .producao-kanban-th-accoes,
.producao-kanban-table .producao-kanban-actions-cell {
    width: 1%;
    min-width: 12rem;
    text-align: right;
    white-space: nowrap;
}
.producao-kanban-etapa-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.55rem;
    border-radius: var(--radius-sm);
}
.producao-kanban-etapa-badge.imprimir {
    background: rgba(245, 158, 66, 0.2);
    color: var(--accent-orange, #f59e42);
}
.producao-kanban-etapa-badge.prensar {
    background: rgba(99, 102, 241, 0.22);
    color: #a5b4fc;
}
.producao-kanban-etapa-badge.pronto {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}
.producao-kanban-actions-cell-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
}
.producao-kanban-actions-cell-inner .btn-small {
    font-size: 0.74rem;
    padding: 0.38rem 0.62rem;
}
.producao-kanban-actions-cell-inner .btn-secondary.btn-small {
    background: rgba(255,255,255,0.12);
}
.producao-kanban-status-cell select {
    width: 100%;
    max-width: 13rem;
    font-size: 0.78rem;
    padding: 0.35rem 0.4rem;
    margin-bottom: 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-dark);
    color: inherit;
}
.producao-kanban-status-cell textarea {
    width: 100%;
    max-width: 16rem;
    font-size: 0.76rem;
    margin-top: 0.35rem;
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    resize: vertical;
    min-height: 2.4rem;
}
.producao-kanban-status-cell .btn-aplica-estado {
    margin-top: 0.4rem;
    font-size: 0.73rem;
    padding: 0.35rem 0.65rem;
}
.producao-kanban-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.75rem 1rem !important;
    font-style: italic;
}

/* Kanban legacy (cards) — já não usados no Quadro Produção; mantidos por compatibilidade */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    height: 100%;
}

.kanban-column {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
}

.kanban-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kanban-header h3 { font-size: 1rem; }
.kanban-header span { color: var(--text-secondary); font-size: 0.85rem; font-weight: normal;}

.kanban-items {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    cursor: grab;
    transition: var(--transition);
}
.kanban-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.2); }

.k-card-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem;}
.k-card-id { color: var(--accent-cyan); font-weight: 600;}
.k-card-time { color: var(--text-secondary); }
.k-card-title { font-weight: 500; margin-bottom: 0.5rem; }
.k-card-details { display: flex; gap: 0.5rem; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 1rem; }

.k-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}
.btn-small { background: rgba(255,255,255,0.1); border: none; color: white; padding: 0.4rem 0.8rem; border-radius: 4px; font-size: 0.8rem; cursor: pointer; transition: 0.2s;}
.btn-small:hover { background: var(--accent-cyan); color: var(--bg-dark); }

.kanban-historico-section {
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px dashed var(--border-light);
}
.kanban-historico-header h3 {
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
}
.kanban-historico-sub {
    margin: 0 0 1.1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.45;
    max-width: 52rem;
}
.req-th-accoes,
.req-accoes-cell {
    width: 1%;
    min-width: 14rem;
    text-align: right;
    white-space: nowrap;
    vertical-align: top;
}
.req-accoes-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    align-items: center;
}
.req-table-wrap .btn-small,
.req-table-wrap .btn-secondary.btn-small {
    font-size: 0.76rem;
    padding: 0.38rem 0.58rem;
}

.kanban-concluidos-list:empty::before {
    content: 'Ainda não existem serviços arquivados. Na coluna «Controlo / Pronto», utilize «Arquivar como concluído» após finalizar o trabalho.';
    display: block;
    color: var(--text-secondary);
    font-size: 0.88rem;
    padding: 1rem 1.1rem;
    background: rgba(0,0,0,0.15);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}
.kanban-historico-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.kanban-historico-table th,
.kanban-historico-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
.kanban-historico-table th {
    background: rgba(0,240,255,0.06);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.kanban-historico-table .kanban-hist-actions {
    white-space: nowrap;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.kanban-historico-table .hist-ref {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Admin Charts Mock */
.admin-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}
.chart-container h3 { margin-bottom: 1.5rem; font-size: 1rem; color: var(--text-secondary); }

.mock-chart.bar-chart {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 10%;
    padding: 0 10%;
}
.bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent-magenta), var(--accent-cyan));
    border-radius: 4px 4px 0 0;
    transition: height 1s ease-out;
    position: relative;
}
.bar:hover::after {
    content: attr(title);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    background: var(--bg-dark);
    padding: 2px 6px;
    border-radius: 4px;
}

.list-widget { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.list-widget li { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 0.5rem; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* Positions Grid */
.positions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.pos-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.pos-item label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Produção → Atendimento: alertas de requisição */
.req-alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.25rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-md);
    animation: slideDown 0.35s ease;
}
.req-alert-banner strong { color: var(--warning); }
.req-alert-banner.hidden { display: none !important; }

.app-toast {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 1000;
    max-width: 380px;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-accent);
    animation: slideDown 0.35s ease;
}
.app-toast.hidden { display: none !important; }
.app-toast p { margin: 0 0 0.75rem 0; font-size: 0.95rem; }
.app-toast .btn-secondary { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.app-toast--status { top: 200px; border-color: rgba(245, 158, 11, 0.35); }
.app-toast--admin { top: 248px; border-color: rgba(0, 240, 255, 0.28); max-width: 400px; }
.app-toast--atend-pdf { top: 296px; border-color: rgba(16, 185, 129, 0.35); max-width: 400px; }
