/* ═══════════════════════════════════════════════════
   PALANI — style.css
   ═══════════════════════════════════════════════════ */

/* ── Variáveis globais ──────────────────────────── */
:root {
    --palani-ocean:       #974e2b;
    --palani-ocean-light: #b5613a;
    --palani-coral:       #E8674A;
    --palani-sand:        #F5ECD7;
    --palani-gold:        #D4A843;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

/* ── Botão principal PALANI ─────────────────────── */
.btn-palani {
    background-color: var(--palani-ocean);
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s;
    cursor: pointer;
}
.btn-palani:hover { background-color: var(--palani-ocean-light); color: #fff; }

/* ── Métricas ───────────────────────────────────── */
.metric-value   { font-size: 1.5rem; font-weight: 600; }
.metric-receita { color: #1D9E75; }
.metric-despesa { color: #E8674A; }

/* ══════════════════════════════════════════════════
   CALENDÁRIO
   ══════════════════════════════════════════════════ */
#calendario-section h2 { font-size: 1.4rem; font-weight: 500; letter-spacing: 0.03em; }

.cal-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 1rem;
}
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-nav button {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1;
}
.cal-month-title { font-size: 1.1rem; font-weight: 500; min-width: 190px; text-align: center; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.cal-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; opacity: 0.8; }
.cal-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.cal-day-labels {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px; margin-bottom: 4px;
}
.cal-day-label {
    text-align: center; font-size: 10px; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 0; opacity: 0.55;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }

.cal-cell {
    min-height: 82px; border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08); padding: 6px;
    cursor: pointer; transition: border-color 0.15s, background 0.15s;
    background: var(--bs-body-bg); position: relative; overflow: hidden;
}
.cal-cell:hover       { border-color: var(--palani-ocean-light); }
.cal-cell.other-month { opacity: 0.3; }
.cal-cell.today       { border-color: var(--palani-ocean); border-width: 2px; }
.cal-cell.selected    { border-color: var(--palani-coral);  border-width: 2px; }

.cell-num { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.cal-cell.today .cell-num {
    background: var(--palani-ocean); color: #fff;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
}

/* Pills */
.event-pill {
    font-size: 11px; padding: 2px 5px; border-radius: 4px; margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600;
}
.pill-financeiro { background: #48adcc; color: #fff; }
.pill-evento     { background: #e40d0d; color: #fff; }
.pill-envio      { background: #009700; color: #fff; }
.pill-reuniao    { background: #d504ff; color: #fff; }

body.bg-dark .cal-cell       { border-color: rgba(255,255,255,0.1); background: #1e2530; }
body.bg-dark .cal-cell:hover { border-color: var(--palani-ocean-light); }

/* Painel de detalhe */
#detail-panel { display: none; }

.event-list-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.07); font-size: 13px;
}
.event-list-item:last-child { border-bottom: none; }
body.bg-dark .event-list-item { border-bottom-color: rgba(255,255,255,0.08); }

.event-type-badge {
    font-size: 10px; font-weight: 700; padding: 2px 8px;
    border-radius: 5px; flex-shrink: 0; margin-top: 1px;
}
.badge-financeiro { background: #48adcc; color: #fff; }
.badge-evento     { background: #e40d0d; color: #fff; }
.badge-envio      { background: #009700; color: #fff; }
.badge-reuniao    { background: #d504ff; color: #fff; }
body.bg-dark .badge-evento { background: #ff5e00; }

.event-delete-btn {
    background: none; border: none; cursor: pointer;
    font-size: 13px; opacity: 0.4; padding: 0 4px; color: inherit; transition: opacity 0.15s;
}
.event-delete-btn:hover { opacity: 1; color: #dc3545; }

/* Botão editar evento */
.event-edit-btn {
    background: none; border: none; cursor: pointer;
    font-size: 13px; opacity: 0.4; padding: 0 4px; color: inherit; transition: opacity 0.15s;
}
.event-edit-btn:hover { opacity: 1; color: var(--palani-ocean); }

/* Modal de edição */
.edit-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: center; justify-content: center;
}
.edit-modal-overlay.open { display: flex; }
.edit-modal {
    background: #fff; border-radius: 14px; padding: 1.5rem;
    width: 100%; max-width: 480px; margin: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: fadeUp 0.2s ease;
}
body.bg-dark .edit-modal { background: #1e2530; color: #fff; }
.edit-modal h6 { font-weight: 600; margin-bottom: 1rem; font-size: 15px; }
.edit-modal .form-control,
.edit-modal .form-select { font-size: 13px; }
.edit-modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1rem; }

@media (max-width: 575px) {
    .cal-cell { min-height: 58px; padding: 4px; }
    .event-pill { display: none; }
    .cal-cell.today .cell-num { width: 18px; height: 18px; font-size: 10px; }
}

/* ══════════════════════════════════════════════════
   PERFIL — modal
   ══════════════════════════════════════════════════ */
.profile-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: center; justify-content: center;
}
.profile-modal-overlay.open { display: flex; }
.profile-modal {
    background: #fff; border-radius: 14px; padding: 0;
    width: 100%; max-width: 440px; margin: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden; animation: fadeUp 0.25s ease;
}
body.bg-dark .profile-modal { background: #1e2530; color: #fff; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.profile-modal-header {
    background: var(--palani-ocean);
    padding: 1.5rem;
    text-align: center;
    position: relative;
}
.profile-modal-close {
    position: absolute; top: 12px; right: 14px;
    background: rgba(255,255,255,0.2); border: none; color: #fff;
    border-radius: 50%; width: 28px; height: 28px;
    font-size: 14px; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.profile-modal-close:hover { background: rgba(255,255,255,0.35); }

.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 0.75rem; }
.profile-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: 3px solid rgba(255,255,255,0.6);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 600; color: #fff;
    overflow: hidden; cursor: pointer;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit {
    position: absolute; bottom: 2px; right: 2px;
    background: #fff; border-radius: 50%; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    color: var(--palani-ocean);
}
#avatar-input { display: none; }

.profile-modal-name { color: #fff; font-weight: 600; font-size: 16px; margin: 0; }
.profile-modal-email { color: rgba(255,255,255,0.65); font-size: 12px; margin: 2px 0 0; }
.profile-modal-role {
    display: inline-block; margin-top: 8px;
    background: rgba(255,255,255,0.2); color: #fff;
    border-radius: 20px; padding: 2px 12px; font-size: 11px; font-weight: 600;
}

.profile-modal-body { padding: 1.25rem 1.5rem; }
.profile-section-title {
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    opacity: 0.45; margin-bottom: 0.75rem; margin-top: 1rem;
}
.profile-section-title:first-child { margin-top: 0; }

.profile-msg {
    padding: 8px 12px; border-radius: 6px; font-size: 12px;
    margin-bottom: 0.75rem; display: none;
}
.profile-msg.success { background: #e6f6f0; color: #0a5236; border: 1px solid #b0dfc9; }
.profile-msg.error   { background: #fdecea; color: #7a1010; border: 1px solid #f5c6c2; }

/* ══════════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════════ */
.login-page {
    display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh;
}
@media (max-width: 768px) {
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
}

.login-visual {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
/* Imagem de fundo */
.login-visual-bg {
    position: absolute; inset: 0;
    background: url('../images/bannerLogin.jpeg') center center / cover no-repeat;
}
/* Overlay escuro para legibilidade do texto */
.login-visual-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(40,20,10,0.45) 0%, rgba(40,20,10,0.65) 100%);
}

.login-brand { position: relative; z-index: 1; text-align: center; }
.login-brand-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 4.5rem; font-weight: 300; letter-spacing: 0.25em;
    color: #fff; line-height: 1;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.login-brand-sub {
    font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
    color: rgba(255,255,255,0.75); margin-top: 0.75rem;
}
.login-tagline {
    position: absolute; bottom: 2.5rem; z-index: 1;
    font-style: italic; font-size: 0.95rem;
    color: rgba(255,255,255,0.6); letter-spacing: 0.05em;
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.login-form-side {
    display: flex; align-items: center; justify-content: center;
    padding: 2.5rem 2rem; background: #fff;
}
.login-box { width: 100%; max-width: 380px; animation: fadeUp 0.4s ease both; }

.login-mobile-brand { display: none; text-align: center; margin-bottom: 2rem; }
@media (max-width: 768px) { .login-mobile-brand { display: block; } }
.login-mobile-brand .login-brand-name { font-size: 3rem; color: var(--palani-ocean); }
.login-mobile-brand .login-brand-sub  { font-size: 10px; color: #9A9890; margin-top: 4px; }

/* Tabs */
.login-tabs { display: flex; border-bottom: 1px solid #EDE3CF; margin-bottom: 2rem; }
.login-tab-btn {
    flex: 1; background: none; border: none; padding: 10px 0;
    font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
    color: #9A9890; cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: color 0.2s, border-color 0.2s;
}
.login-tab-btn.active { color: var(--palani-ocean); border-bottom-color: var(--palani-ocean); font-weight: 600; }

/* Campos */
.login-group { margin-bottom: 1.1rem; }
.login-group label {
    display: block; font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: #9A9890; margin-bottom: 6px;
}
.login-group input {
    width: 100%; padding: 10px 14px; border: 1px solid #EDE3CF; border-radius: 6px;
    font-size: 14px; color: #1C1C1A; background: #fff; outline: none; transition: border-color 0.2s;
}
.login-group input:focus { border-color: var(--palani-ocean-light); }
.login-group input::placeholder { color: #9A9890; }

/* Barra força password */
.strength-bar {
    height: 3px; border-radius: 2px; margin-top: 6px;
    background: #EDE3CF; overflow: hidden; display: none;
}
.strength-bar-fill { height: 100%; border-radius: 2px; width: 0%; transition: width 0.3s, background 0.3s; }
.strength-label { font-size: 10px; color: #9A9890; margin-top: 3px; display: none; }

/* Botão submit */
.login-btn {
    width: 100%; padding: 12px; background: var(--palani-ocean); color: #fff;
    border: none; border-radius: 6px; font-size: 14px; font-weight: 600;
    letter-spacing: 0.05em; cursor: pointer; margin-top: 0.5rem;
    transition: background 0.2s, transform 0.1s;
}
.login-btn:hover    { background: var(--palani-ocean-light); }
.login-btn:active   { transform: scale(0.99); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.forgot-link {
    display: block; text-align: right; font-size: 12px; color: #9A9890;
    text-decoration: none; margin-top: -0.6rem; margin-bottom: 1rem; transition: color 0.2s;
}
.forgot-link:hover { color: var(--palani-ocean); }

/* Mensagens */
.login-msg {
    padding: 10px 14px; border-radius: 6px; font-size: 13px;
    line-height: 1.5; margin-bottom: 1rem; display: none;
}
.login-msg.error   { background: #fdecea; color: #C0392B; border: 1px solid #f5c6c2; }
.login-msg.success { background: #e6f6f0; color: #0a5236; border: 1px solid #b0dfc9; }
.login-msg.info    { background: #fdf3ee; color: var(--palani-ocean); border: 1px solid #e8c4ad; }

/* Spinner */
.spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.7s linear infinite;
    vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.back-link {
    background: none; border: none; color: #9A9890; font-size: 12px;
    cursor: pointer; padding: 0; margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 4px; transition: color 0.2s;
}
.back-link:hover { color: var(--palani-ocean); }
.login-footer { margin-top: 2rem; text-align: center; font-size: 11px; color: #9A9890; }

/* ══════════════════════════════════════════════════
   ADMIN
   ══════════════════════════════════════════════════ */
.admin-brand-serif { font-family: Georgia, serif; font-weight: 300; letter-spacing: 0.15em; }
.bs-pending  { background: #fef3d1; color: #6b4007; }
.bs-approved { background: #e6f6f0; color: #0a5236; }
.bs-rejected { background: #fdecea; color: #7a1010; }
.br-admin    { background: #fdf3ee; color: #7a3010; }
.br-readonly { background: #ede3cf; color: #5a3e10; }

.user-card {
    border: 1px solid rgba(0,0,0,0.08); border-radius: 10px;
    padding: 1rem 1.25rem; margin-bottom: 0.6rem; background: #fff;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    transition: box-shadow 0.15s;
}
.user-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--palani-ocean); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; flex-shrink: 0; overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info  { flex: 1; min-width: 160px; }
.user-name  { font-weight: 600; font-size: 14px; }
.user-email { font-size: 12px; opacity: 0.5; margin-top: 1px; }
.user-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-approve {
    background: #1D9E75; color: #fff; border: none; border-radius: 6px;
    padding: 5px 16px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.15s;
}
.btn-approve:hover { background: #0f6e56; }
.btn-reject {
    background: #fff; color: #C0392B; border: 1px solid #C0392B;
    border-radius: 6px; padding: 5px 16px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
}
.btn-reject:hover { background: #fdecea; }
.role-sel {
    font-size: 12px; border: 1px solid #dee2e6;
    border-radius: 6px; padding: 5px 8px; cursor: pointer;
}
.sec-title {
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    opacity: 0.45; margin: 1.5rem 0 0.6rem;
}

/* ══════════════════════════════════════════════════
   NAVBAR — partilhada
   ══════════════════════════════════════════════════ */
.navbar-shared .nav-link.active-page { color: var(--palani-ocean) !important; font-weight: 600; }

/* ══════════════════════════════════════════════════
   CONFIGURAÇÕES
   ══════════════════════════════════════════════════ */
.config-card {
    background: #fff; border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem;
}
body.bg-dark .config-card { background: #1e2530; border-color: rgba(255,255,255,0.1); }
.config-card-title {
    font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
    text-transform: uppercase; opacity: 0.5; margin-bottom: 1rem;
}
.config-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 8px; margin-bottom: 6px;
    background: var(--bs-body-bg); border: 1px solid rgba(0,0,0,0.06);
    font-size: 14px; gap: 10px;
}
body.bg-dark .config-item { border-color: rgba(255,255,255,0.08); }
.config-item-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.color-swatch {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.12); flex-shrink: 0;
}
.config-delete-btn {
    background: none; border: none; cursor: pointer;
    color: #aaa; font-size: 14px; padding: 2px 6px;
    border-radius: 4px; transition: color 0.15s, background 0.15s;
    line-height: 1;
}
.config-delete-btn:hover { color: #dc3545; background: #fdecea; }
.config-add-row {
    display: flex; gap: 8px; align-items: center; margin-top: 0.75rem; flex-wrap: wrap;
}
.config-input {
    flex: 1; min-width: 120px; padding: 7px 12px;
    border: 1px solid #dee2e6; border-radius: 8px;
    font-size: 13px; outline: none; transition: border-color 0.2s;
}
.config-input:focus { border-color: var(--palani-ocean); }
.config-color-input { width: 42px; height: 36px; border-radius: 8px; border: 1px solid #dee2e6; padding: 2px; cursor: pointer; }
.config-add-btn {
    background: var(--palani-ocean); color: #fff; border: none;
    border-radius: 8px; padding: 7px 18px; font-size: 13px;
    font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.config-add-btn:hover { background: var(--palani-ocean-light); }

/* ══════════════════════════════════════════════════
   PEDIDOS — LAYOUT VERTICAL + RESPONSIVO
   ══════════════════════════════════════════════════ */

/* Header da página de pedidos */
.pedidos-page-header {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    background: #fff;
}
body.bg-dark .pedidos-page-header { background: #1a1f2a; border-color: rgba(255,255,255,0.08); }

.pedidos-title { font-size: 1.1rem; font-weight: 700; margin: 0; white-space: nowrap; }

.pedidos-controls {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1;
}
.pedidos-search {
    flex: 1; min-width: 140px; max-width: 260px;
    padding: 6px 12px; border: 1px solid #dee2e6;
    border-radius: 8px; font-size: 13px; outline: none; transition: border-color 0.2s;
    background: var(--bs-body-bg); color: var(--bs-body-color);
}
.pedidos-search:focus { border-color: var(--palani-ocean); }
.pedidos-filter {
    padding: 6px 10px; border: 1px solid #dee2e6; border-radius: 8px;
    font-size: 13px; cursor: pointer;
    background: var(--bs-body-bg); color: var(--bs-body-color);
}
.btn-novo-pedido {
    background: var(--palani-ocean); color: #fff; border: none;
    border-radius: 8px; padding: 7px 16px; font-size: 13px;
    font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background 0.15s; margin-left: auto;
}
.btn-novo-pedido:hover { background: var(--palani-ocean-light); }

/* Contadores de sessão abaixo do header */
.pedidos-counters {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 0.6rem 1.25rem; background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    
}
body.bg-dark .pedidos-counters { background: #1a1f2a; border-color: rgba(255,255,255,0.08); }
.counter-pill {
    display: flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px; font-size: 11px;
    font-weight: 600; cursor: pointer; transition: opacity 0.15s;
    border: 1.5px solid transparent;
}
.counter-pill:hover { opacity: 0.75; }
.counter-pill.active { border-color: currentColor; }
.cpill-pendente   { background: #e8edd8; color: #4a5a20; }
.cpill-cortado    { background: #d8e8ed; color: #1a4a5a; }
.cpill-preparacao { background: #ede8d8; color: #5a4a20; }
.cpill-paraenviar { background: #d8dded; color: #1a2a5a; }
.cpill-enviado    { background: #d8edd8; color: #1a5a2a; }
.cpill-atrasado   { background: #edd8d8; color: #5a1a1a; }
.cpill-concluido  { background: #e8e8e8; color: #444; }

/* Quadro Kanban VERTICAL */
.kanban-board {
    display: flex; flex-direction: column;
    gap: 0; padding: 0;
}

/* Secção kanban */
.kanban-section {
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.bg-dark .kanban-section { border-color: rgba(255,255,255,0.07); }

.kanban-section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 1.25rem; cursor: pointer;
    transition: background 0.12s, filter 0.12s; user-select: none;
    gap: 10px; color: #fff;
}
.kanban-section-header:hover { filter: brightness(1.08); }
body.bg-dark .kanban-section-header:hover { filter: brightness(1.12); }

.kanban-section-left { display: flex; align-items: center; gap: 10px; }
.kanban-section-name {
    font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.kanban-section-count {
    font-size: 11px; font-weight: 700; padding: 1px 8px;
    border-radius: 20px; background: rgba(0,0,0,0.07);
}
body.bg-dark .kanban-section-count { background: rgba(255,255,255,0.1); }
.kanban-section-toggle {
    font-size: 12px; opacity: 0.4; transition: transform 0.2s; margin-left: auto;
}
.kanban-section.collapsed .kanban-section-toggle { transform: rotate(-90deg); }

/* Grid de cards */
.kanban-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px; padding: 6px 1.25rem 14px;
    transition: all 0.2s;
}
.kanban-section.collapsed .kanban-cards-grid { display: none; }

/* Botão expandir */
.btn-expand-section {
    display: none; width: 100%; padding: 6px;
    background: none; border: none; font-size: 12px;
    color: var(--palani-ocean); cursor: pointer; text-align: center;
    border-top: 1px dashed rgba(0,0,0,0.1); margin-top: 2px;
    transition: background 0.12s;
}
.btn-expand-section:hover { background: rgba(151,78,43,0.05); }
.btn-expand-section.visible { display: block; }

/* Drop zone */
.kanban-cards-grid.drag-over {
    background: rgba(151,78,43,0.05); border-radius: 8px;
    outline: 2px dashed rgba(151,78,43,0.3);
}

/* Cores das secções — header colorido */
.section-pendente   .kanban-section-header { background: #7a8c5a; }
.section-cortado    .kanban-section-header { background: #5a7a8c; }
.section-preparacao .kanban-section-header { background: #8c7a5a; }
.section-paraenviar .kanban-section-header { background: #5a6e8c; }
.section-enviado    .kanban-section-header { background: #5a8c6e; }
.section-atrasado   .kanban-section-header { background: #8c5a5a; }

/* ── Card de pedido ─────────────────────────────── */
.pedido-card {
    /* background vem do JS (cor de prioridade) */
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px; padding: 11px 12px;
    cursor: grab; user-select: none;
    transition: box-shadow 0.15s, transform 0.12s, background-color 0.2s;
    position: relative;
}
.pedido-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); filter: brightness(0.97); }
.pedido-card:active { cursor: grabbing; }
.pedido-card.dragging { opacity: 0.45; transform: rotate(1.5deg); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
body.bg-dark .pedido-card { border-color: rgba(255,255,255,0.08); }
/* No dark mode, escurecer ligeiramente as cores pastel para melhor leitura */
body.bg-dark .pedido-card { filter: brightness(0.55) saturate(1.2); }
body.bg-dark .pedido-card:hover { filter: brightness(0.65) saturate(1.2); }

.card-header-row {
    display: flex; align-items: flex-start;
    justify-content: space-between; margin-bottom: 8px; gap: 6px;
}
.card-client { font-weight: 700; font-size: 13px; line-height: 1.3; flex: 1; }
.card-id     { font-size: 10px; opacity: 0.45; margin-top: 1px; }
.card-menu-btn {
    background: none; border: none; cursor: pointer;
    color: #aaa; font-size: 20px; line-height: 1; padding: 0 2px;
    border-radius: 4px; transition: background 0.12s; flex-shrink: 0;
}
.card-menu-btn:hover { background: rgba(0,0,0,0.06); color: #555; }

.card-priority {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0; margin-top: 4px; border: 1.5px solid rgba(0,0,0,0.12);
}

/* Itens */
.card-item-row {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; padding: 3px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05); flex-wrap: nowrap; overflow: hidden;
}
.card-item-row:last-child { border-bottom: none; }
body.bg-dark .card-item-row { border-bottom-color: rgba(255,255,255,0.06); }
.card-item-check {
    width: 14px; height: 14px; border-radius: 3px;
    border: 1.5px solid #ccc; flex-shrink: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.12s, border-color 0.12s;
}
.card-item-check.checked {
    background: var(--palani-ocean); border-color: var(--palani-ocean);
    color: #fff; font-size: 9px;
}
.card-item-peca  { font-weight: 600; max-width: 75px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-item-size  { opacity: 0.5; white-space: nowrap; }
.card-item-color { display: flex; align-items: center; gap: 3px; min-width: 0; }
.card-item-color-dot  { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); flex-shrink: 0; }
.card-item-color-name { opacity: 0.65; max-width: 55px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Obs */
.card-obs {
    font-size: 11px; color: #999; font-style: italic;
    border: 1px dashed rgba(0,0,0,0.1); border-radius: 6px;
    padding: 4px 7px; margin-top: 8px; min-height: 28px;
    cursor: text; outline: none; line-height: 1.4;
}
body.bg-dark .card-obs { border-color: rgba(255,255,255,0.1); }
.card-obs:empty::before { content: "Obs..."; color: #bbb; }
.card-obs:focus { border-color: var(--palani-ocean-light); border-style: solid; }

/* Rodapé */
.card-footer-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 9px; flex-wrap: wrap; gap: 4px;
}
.card-responsavel { display: flex; align-items: center; gap: 4px; font-size: 11px; opacity: 0.55; }
.card-resp-avatar {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--palani-ocean); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 7px; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.card-resp-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.card-prazo { font-size: 10px; opacity: 0.5; display: flex; align-items: center; gap: 2px; }
.card-prazo.vencido { color: #C0392B; opacity: 1; font-weight: 700; }

/* Prioridade no rodapé */
.card-priority-row { display: flex; gap: 3px; }
.priority-dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,0.12); cursor: pointer; transition: transform 0.12s;
}
.priority-dot:hover { transform: scale(1.2); }
.p-branca   { background: #f5f5f0; }
.p-amarelo  { background: #fdf3b0; }
.p-vermelho { background: #fdb5b0; }
.p-verde    { background: #b8f0c8; }

/* Dropdown 3 pontinhos */
.card-dropdown {
    position: absolute; top: 36px; right: 8px;
    background: #fff; border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    z-index: 500; min-width: 165px; overflow: hidden;
    animation: fadeUp 0.15s ease;
}
body.bg-dark .card-dropdown { background: #2a3244; border-color: rgba(255,255,255,0.12); }
.card-dropdown-item {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 14px; font-size: 12px; cursor: pointer;
    transition: background 0.1s; color: inherit; white-space: nowrap;
}
.card-dropdown-item:hover { background: rgba(0,0,0,0.04); }
body.bg-dark .card-dropdown-item:hover { background: rgba(255,255,255,0.06); }
.card-dropdown-item.danger { color: #dc3545; }
.card-dropdown-item.danger:hover { background: #fdecea; }
.card-dropdown-divider { height: 1px; background: rgba(0,0,0,0.07); margin: 3px 0; }

/* Modal de pedido */
.pedido-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: flex-start; justify-content: center;
    padding: 1.5rem 1rem; overflow-y: auto;
}
.pedido-modal-overlay.open { display: flex; }
.pedido-modal {
    background: #fff; border-radius: 14px; padding: 1.5rem;
    width: 100%; max-width: 520px; margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: fadeUp 0.2s ease;
}
body.bg-dark .pedido-modal { background: #1e2530; }
.pedido-modal h5 { font-weight: 700; margin-bottom: 1.25rem; font-size: 15px; }

/* Linhas de item no modal */
.item-pedido-row {
    display: flex; gap: 5px; align-items: center;
    margin-bottom: 6px; flex-wrap: wrap;
}
.item-pedido-row select,
.item-pedido-row input { font-size: 12px; }
.btn-remove-item {
    background: none; border: none; cursor: pointer;
    color: #bbb; font-size: 16px; padding: 0 3px; transition: color 0.12s; line-height: 1;
}
.btn-remove-item:hover { color: #dc3545; }
.btn-add-item {
    background: none; border: 1px dashed rgba(0,0,0,0.2);
    border-radius: 8px; padding: 5px 12px; font-size: 12px;
    cursor: pointer; color: var(--palani-ocean); transition: background 0.12s; margin-top: 4px;
}
.btn-add-item:hover { background: rgba(151,78,43,0.06); }

/* Prioridade no modal */
.priority-picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.priority-option {
    width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid transparent; cursor: pointer; transition: transform 0.12s, border-color 0.12s;
}
.priority-option:hover   { transform: scale(1.15); }
.priority-option.selected { border-color: var(--palani-ocean); transform: scale(1.15); }

/* ── Responsivo mobile ──────────────────────────── */
@media (max-width: 576px) {
    .pedidos-page-header { padding: 0.75rem 1rem 0.6rem; gap: 8px; }
    .pedidos-title { font-size: 1rem; }
    .pedidos-controls { gap: 6px; }
    .pedidos-search { max-width: 100%; }
    .btn-novo-pedido { padding: 6px 12px; font-size: 12px; }
    .pedidos-counters { padding: 0.5rem 1rem; gap: 5px; }
    .counter-pill { font-size: 10px; padding: 2px 7px; }
    .kanban-cards-grid { grid-template-columns: 1fr; padding: 6px 0.75rem 12px; gap: 8px; }
    .kanban-section-header { padding: 9px 1rem; }
    .pedido-modal-overlay { padding: 0.75rem; }
    .pedido-modal { padding: 1.25rem 1rem; border-radius: 12px; }
    .item-pedido-row { gap: 4px; }
    .item-pedido-row select { min-width: 0; }
}
@media (min-width: 577px) and (max-width: 900px) {
    .kanban-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 901px) and (max-width: 1200px) {
    .kanban-cards-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1201px) {
    .kanban-cards-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}

/* ══════════════════════════════════════════════════
   SCRIPTS
   ══════════════════════════════════════════════════ */

/* Hero header da página */
.scripts-hero {
    padding: 2.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
body.bg-dark .scripts-hero { border-color: rgba(255,255,255,0.07); }

.scripts-hero-top {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.scripts-hero-brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic; font-size: 2.6rem; font-weight: 400;
    color: #1C1C1A; line-height: 1;
}
body.bg-dark .scripts-hero-brand { color: #f0ece4; }
.scripts-hero-sub {
    font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; opacity: 0.38; margin-top: 6px;
}
.btn-novo-script {
    display: flex; align-items: center; gap: 8px;
    background: var(--palani-ocean); color: #fff; border: none;
    border-radius: 6px; padding: 10px 20px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; cursor: pointer; white-space: nowrap;
    transition: background 0.15s; flex-shrink: 0;
}
.btn-novo-script:hover { background: var(--palani-ocean-light); }

/* Barra de busca */
.scripts-search-bar {
    display: flex; align-items: center; gap: 10px;
    background: var(--bs-body-bg);
    border: 1px solid rgba(0,0,0,0.1); border-radius: 10px;
    padding: 10px 16px;
}
body.bg-dark .scripts-search-bar { border-color: rgba(255,255,255,0.1); }
.scripts-search-icon { opacity: 0.35; font-size: 15px; flex-shrink: 0; }
.scripts-search-input {
    flex: 1; border: none; outline: none; font-size: 14px;
    background: transparent; color: var(--bs-body-color);
}
.scripts-search-input::placeholder { color: #bbb; }

/* Filtro por categoria */
.scripts-filter-row {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.bg-dark .scripts-filter-row { border-color: rgba(255,255,255,0.06); }
.cat-pill {
    padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    border: 1.5px solid transparent; cursor: pointer; transition: all 0.15s;
    background: rgba(0,0,0,0.05); color: var(--bs-body-color);
    letter-spacing: 0.03em;
}
body.bg-dark .cat-pill { background: rgba(255,255,255,0.08); }
.cat-pill:hover { background: rgba(151,78,43,0.1); border-color: var(--palani-ocean); color: var(--palani-ocean); }
.cat-pill.active { background: var(--palani-ocean); color: #fff; border-color: var(--palani-ocean); }

/* Grid de cards */
.scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    padding: 1.25rem 1.5rem 3rem;
}
@media (max-width: 576px) {
    .scripts-grid { grid-template-columns: 1fr; padding: 1rem; gap: 1rem; }
    .scripts-hero { padding: 1.5rem 1rem 1.25rem; }
    .scripts-hero-brand { font-size: 2rem; }
    .scripts-filter-row { padding: 0.6rem 1rem; }
    .btn-novo-script { padding: 8px 14px; font-size: 11px; }
}

/* Card de script */
.script-card {
    background: var(--bs-body-bg);
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: 12px; padding: 1.5rem;
    display: flex; flex-direction: column; gap: 0;
    transition: box-shadow 0.15s;
    position: relative;
}
.script-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
body.bg-dark .script-card { border-color: rgba(255,255,255,0.09); }

.script-card-category {
    font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--palani-ocean);
    margin-bottom: 6px;
}
.script-card-title {
    font-family: Georgia, serif; font-style: italic;
    font-size: 1.4rem; font-weight: 400; line-height: 1.2;
    margin-bottom: 1rem; color: var(--bs-body-color);
}
.script-card-actions {
    position: absolute; top: 1rem; right: 1rem;
    display: flex; gap: 6px; align-items: center;
}
.script-action-btn {
    background: none; border: none; cursor: pointer;
    opacity: 0.3; font-size: 14px; padding: 4px;
    border-radius: 6px; transition: opacity 0.15s, background 0.15s;
    line-height: 1; color: var(--bs-body-color);
}
.script-action-btn:hover { opacity: 1; background: rgba(0,0,0,0.06); }
.script-action-btn.danger:hover { opacity: 1; color: #dc3545; background: #fdecea; }

/* Linha separadora antes do texto */

.script-card-body {
    display: flex; gap: 0; flex: 1;
}
.script-card-text {
    font-size: 13px; line-height: 1.65;
    color: var(--bs-body-color); opacity: 0.75;
    font-style: italic; white-space: pre-wrap;
    word-break: break-word; flex: 1;
    padding-left: 12px;
    border-left: 2px solid rgba(0,0,0,0.08);
}
body.bg-dark .script-card-text { border-color: rgba(255,255,255,0.1); }

/* Rodapé com botão copiar */
.script-card-footer {
    display: flex; justify-content: flex-end;
    margin-top: 1rem; padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}
body.bg-dark .script-card-footer { border-color: rgba(255,255,255,0.07); }
.btn-copy-script {
    display: flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,0.04); border: none; border-radius: 8px;
    padding: 6px 14px; font-size: 12px; cursor: pointer;
    color: var(--bs-body-color); transition: background 0.15s, color 0.15s;
    font-weight: 500;
}
body.bg-dark .btn-copy-script { background: rgba(255,255,255,0.07); }
.btn-copy-script:hover  { background: rgba(151,78,43,0.1); color: var(--palani-ocean); }
.btn-copy-script.copied { background: #e6f6f0; color: #0a5236; }
.btn-copy-script svg    { width: 14px; height: 14px; flex-shrink: 0; }

/* Estado vazio */
.scripts-empty {
    grid-column: 1 / -1; text-align: center;
    padding: 4rem 1rem; opacity: 0.4;
}
.scripts-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.scripts-empty-text { font-size: 14px; }

/* Modal de script */
.script-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: flex-start; justify-content: center;
    padding: 2rem 1rem; overflow-y: auto;
}
.script-modal-overlay.open { display: flex; }
.script-modal {
    background: #fff; border-radius: 14px; padding: 1.75rem;
    width: 100%; max-width: 560px; margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: fadeUp 0.2s ease;
}
body.bg-dark .script-modal { background: #1e2530; }
.script-modal h5 { font-weight: 700; margin-bottom: 1.25rem; font-size: 16px; }
.script-modal label {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: #9A9890; margin-bottom: 5px;
}
.script-modal textarea {
    resize: vertical; min-height: 160px; font-size: 13px; line-height: 1.6;
}
@media (max-width: 576px) {
    .script-modal-overlay { padding: 0.75rem; }
    .script-modal { padding: 1.25rem 1rem; border-radius: 12px; }
}

/* ══════════════════════════════════════════════════
   MEDIDAS
   ══════════════════════════════════════════════════ */

/* Hero idêntico ao de scripts */
.medidas-hero {
    padding: 2.5rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
body.bg-dark .medidas-hero { border-color: rgba(255,255,255,0.07); }

.medidas-hero-top {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.medidas-hero-brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic; font-size: 2.6rem; font-weight: 400;
    color: #1C1C1A; line-height: 1;
}
body.bg-dark .medidas-hero-brand { color: #f0ece4; }
.medidas-hero-sub {
    font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; opacity: 0.38; margin-top: 6px;
}
.btn-nova-medida {
    display: flex; align-items: center; gap: 8px;
    background: var(--palani-ocean); color: #fff; border: none;
    border-radius: 6px; padding: 10px 20px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; cursor: pointer; white-space: nowrap;
    transition: background 0.15s; flex-shrink: 0;
}
.btn-nova-medida:hover { background: var(--palani-ocean-light); }

/* Barra de busca — igual à de scripts */
.medidas-search-bar {
    display: flex; align-items: center; gap: 10px;
    background: var(--bs-body-bg);
    border: 1px solid rgba(0,0,0,0.1); border-radius: 10px;
    padding: 10px 16px;
}
body.bg-dark .medidas-search-bar { border-color: rgba(255,255,255,0.1); }
.medidas-search-input {
    flex: 1; border: none; outline: none; font-size: 14px;
    background: transparent; color: var(--bs-body-color);
}
.medidas-search-input::placeholder { color: #bbb; }

/* Container de cards */
.medidas-container {
    padding: 1.5rem;
    display: flex; flex-direction: column; gap: 1.25rem;
}

/* Card de medida */
.medida-card {
    background: var(--bs-body-bg);
    border: 1px solid rgba(0,0,0,0.09);
    border-radius: 12px; overflow: hidden;
    transition: box-shadow 0.15s;
}
.medida-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
body.bg-dark .medida-card { border-color: rgba(255,255,255,0.09); }

.medida-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.bg-dark .medida-card-header { border-color: rgba(255,255,255,0.07); }

.medida-card-title {
    font-family: Georgia, serif; font-style: italic;
    font-size: 1.5rem; font-weight: 400;
    color: var(--bs-body-color); text-transform: uppercase;
}
.medida-card-actions { display: flex; gap: 8px; }
.medida-action-btn {
    background: none; border: none; cursor: pointer;
    opacity: 0.3; font-size: 15px; padding: 5px 7px;
    border-radius: 6px; transition: opacity 0.15s, background 0.15s;
    color: var(--bs-body-color); line-height: 1;
}
.medida-action-btn:hover         { opacity: 1; background: rgba(0,0,0,0.05); }
.medida-action-btn.danger:hover  { opacity: 1; color: #dc3545; background: #fdecea; }
body.bg-dark .medida-action-btn:hover { background: rgba(255,255,255,0.08); }

/* Tabela de medidas */
.medida-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.medida-table th {
    text-align: left; padding: 10px 1.5rem;
    font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--bs-body-color);
    opacity: 0.5; background: rgba(0,0,0,0.025);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.bg-dark .medida-table th {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.07);
}
.medida-table th:not(:first-child) { text-align: center; width: 80px; }

.medida-table td {
    padding: 12px 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    color: var(--bs-body-color);
}
body.bg-dark .medida-table td { border-color: rgba(255,255,255,0.05); }
.medida-table tr:last-child td { border-bottom: none; }

.medida-table td:first-child {
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; opacity: 0.7;
}
.medida-table td:not(:first-child) {
    text-align: center; font-style: italic;
    font-family: Georgia, serif; font-size: 14px;
    color: var(--palani-ocean);
}
.medida-table td.vazio { color: #ccc; font-style: normal; font-family: inherit; }

/* Estado vazio */
.medidas-empty {
    text-align: center; padding: 4rem 1rem;
    opacity: 0.4; font-size: 14px;
}
.medidas-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* Modal de medida */
.medida-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: flex-start; justify-content: center;
    padding: 1.5rem 1rem; overflow-y: auto;
}
.medida-modal-overlay.open { display: flex; }
.medida-modal {
    background: #fff; border-radius: 14px; padding: 1.75rem;
    width: 100%; max-width: 640px; margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: fadeUp 0.2s ease;
}
body.bg-dark .medida-modal { background: #1e2530; }
.medida-modal h5 { font-weight: 700; margin-bottom: 1.25rem; font-size: 16px; }
.medida-modal label {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: #9A9890; margin-bottom: 5px;
}

/* Tabela de atributos no modal */
.atrib-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.atrib-table th {
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; text-align: center;
    padding: 6px 4px; opacity: 0.5; border-bottom: 1px solid rgba(0,0,0,0.08);
}
body.bg-dark .atrib-table th { border-color: rgba(255,255,255,0.1); }
.atrib-table th:first-child { text-align: left; }
.atrib-table td { padding: 5px 4px; vertical-align: middle; }
.atrib-table td:first-child { padding-right: 10px; }

.atrib-nome-input {
    width: 100%; border: 1px solid rgba(0,0,0,0.12); border-radius: 6px;
    padding: 5px 8px; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--bs-body-bg); color: var(--bs-body-color);
    outline: none; transition: border-color 0.15s;
}
.atrib-nome-input:focus { border-color: var(--palani-ocean); }

.atrib-val-input {
    width: 100%; border: 1px solid rgba(0,0,0,0.1); border-radius: 6px;
    padding: 5px 6px; font-size: 13px; text-align: center; font-style: italic;
    background: var(--bs-body-bg); color: var(--bs-body-color);
    outline: none; transition: border-color 0.15s;
}
.atrib-val-input:focus { border-color: var(--palani-ocean); }
.atrib-val-input::placeholder { color: #ccc; font-style: normal; }

.btn-remove-atrib {
    background: none; border: none; cursor: pointer;
    color: #ccc; font-size: 15px; padding: 0 4px;
    line-height: 1; transition: color 0.15s;
}
.btn-remove-atrib:hover { color: #dc3545; }

.btn-add-atrib {
    background: none; border: 1px dashed rgba(0,0,0,0.18);
    border-radius: 8px; padding: 6px 14px; font-size: 12px;
    cursor: pointer; color: var(--palani-ocean);
    transition: background 0.15s; margin-top: 8px;
    display: inline-flex; align-items: center; gap: 5px;
}
.btn-add-atrib:hover { background: rgba(151,78,43,0.06); }

/* Responsivo */
@media (max-width: 576px) {
    .medidas-hero { padding: 1.5rem 1rem 1.25rem; }
    .medidas-hero-brand { font-size: 2rem; }
    .medidas-container { padding: 1rem; }
    .medida-card-header { padding: 1rem; }
    .medida-table th,
    .medida-table td { padding: 10px 1rem; }
    .medida-table th:not(:first-child),
    .medida-table td:not(:first-child) { width: 52px; }
    .medida-modal-overlay { padding: 0.75rem; }
    .medida-modal { padding: 1.25rem 1rem; }
    .atrib-table th:not(:first-child),
    .atrib-table td:not(:first-child) { min-width: 44px; }
    .btn-nova-medida { padding: 8px 14px; font-size: 11px; }
}

/* ══════════════════════════════════════════════════
   CAMPANHAS
   ══════════════════════════════════════════════════ */

/* Hero */
.camp-hero {
    padding: 2rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    display: flex; align-items: flex-start;
    justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
body.bg-dark .camp-hero { border-color: rgba(255,255,255,0.07); }
.camp-hero-left {}
.camp-hero-brand {
    font-family: Georgia, serif; font-style: italic;
    font-size: 2.4rem; font-weight: 400; color: #1C1C1A; line-height: 1;
}
body.bg-dark .camp-hero-brand { color: #f0ece4; }
.camp-hero-sub {
    font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; opacity: 0.38; margin-top: 5px;
}
.camp-hero-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Toggle vista */
.camp-toggle {
    display: flex; border: 1px solid rgba(0,0,0,0.12); border-radius: 8px; overflow: hidden;
}
body.bg-dark .camp-toggle { border-color: rgba(255,255,255,0.15); }
.camp-toggle-btn {
    background: none; border: none; padding: 7px 14px; cursor: pointer;
    font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
    color: var(--bs-body-color); opacity: 0.45; transition: all 0.15s;
    display: flex; align-items: center; gap: 6px;
}
.camp-toggle-btn.active {
    background: var(--palani-ocean); color: #fff; opacity: 1;
}
.camp-toggle-btn:not(.active):hover { opacity: 0.75; background: rgba(0,0,0,0.04); }
body.bg-dark .camp-toggle-btn:not(.active):hover { background: rgba(255,255,255,0.06); }

.btn-nova-campanha {
    display: flex; align-items: center; gap: 7px;
    background: var(--palani-ocean); color: #fff; border: none;
    border-radius: 8px; padding: 9px 18px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; cursor: pointer; white-space: nowrap;
    transition: background 0.15s;
}
.btn-nova-campanha:hover { background: var(--palani-ocean-light); }

/* ── VISTA CALENDÁRIO MENSAL ─────────────────────── */
#camp-view-cal { padding: 1.25rem 1.5rem 2rem; }

.camp-cal-nav {
    display: flex; align-items: center; gap: 14px; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.camp-cal-nav button {
    width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(0,0,0,0.1);
    background: none; cursor: pointer; font-size: 14px; display: flex;
    align-items: center; justify-content: center; transition: background 0.12s;
    color: var(--bs-body-color);
}
.camp-cal-nav button:hover { background: rgba(0,0,0,0.05); }
body.bg-dark .camp-cal-nav button { border-color: rgba(255,255,255,0.12); }

.camp-cal-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.camp-cal-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; opacity: 0.7; }
.camp-cal-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.camp-day-labels {
    display: grid; grid-template-columns: repeat(7, minmax(0,1fr));
    gap: 4px; margin-bottom: 4px;
}
.camp-day-label {
    text-align: center; font-size: 10px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 0; opacity: 0.45;
}
.camp-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 4px; }

.camp-cell {
    min-height: 86px; border-radius: 8px; padding: 6px;
    border: 1px solid rgba(0,0,0,0.07); background: var(--bs-body-bg);
    cursor: default; transition: border-color 0.12s, background 0.12s;
    position: relative; overflow: hidden;
}
.camp-cell.has-event { cursor: pointer; }
.camp-cell.has-event:hover { border-color: var(--palani-ocean-light); background: rgba(151,78,43,0.03); }
.camp-cell.other-month { opacity: 0.28; }
.camp-cell.today { border-color: var(--palani-ocean); border-width: 2px; }

.camp-cell-num {
    font-size: 12px; font-weight: 600; margin-bottom: 4px; line-height: 1;
}
.camp-cell.today .camp-cell-num {
    background: var(--palani-ocean); color: #fff;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 10px;
}
body.bg-dark .camp-cell { border-color: rgba(255,255,255,0.08); }
body.bg-dark .camp-cell.has-event:hover { background: rgba(255,255,255,0.03); }

/* Pills no calendário */
.camp-pill {
    font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 4px;
    margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.camp-pill.campanha  { background: var(--palani-ocean);  color: #fff; }
.camp-pill.feriado   { background: #8c5a5a; color: #fff; }
.camp-pill.data-com  { background: #7a8c5a; color: #fff; }

/* ── VISTA TIMELINE ANUAL ────────────────────────── */
#camp-view-timeline {
    overflow-x: auto; padding: 1.25rem 1.5rem 2rem;
}
.timeline-wrapper { min-width: 900px; }

.timeline-months-header {
    display: grid; grid-template-columns: repeat(12, 1fr);
    gap: 3px; margin-bottom: 6px;
}
.timeline-month-label {
    text-align: center; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    padding: 6px 4px; opacity: 0.5;
}

.timeline-year-bar {
    display: grid; grid-template-columns: repeat(365, 1fr);
    gap: 1px; height: 28px; border-radius: 6px; overflow: hidden;
    background: rgba(0,0,0,0.04); margin-bottom: 12px;
}
body.bg-dark .timeline-year-bar { background: rgba(255,255,255,0.05); }
.timeline-day-slot {
    height: 100%; background: rgba(0,0,0,0.03); cursor: default;
    transition: background 0.1s;
}
body.bg-dark .timeline-day-slot { background: rgba(255,255,255,0.04); }
.timeline-day-slot.feriado  { background: rgba(140,90,90,0.35); }
.timeline-day-slot.data-com { background: rgba(122,140,90,0.35); }
.timeline-day-slot.campanha { background: var(--palani-ocean); opacity: 0.85; cursor: pointer; }
.timeline-day-slot.campanha:hover { opacity: 1; }

/* Linhas de campanha na timeline */
.timeline-camp-block {
    background: var(--palani-ocean); border-radius: 4px;
    display: flex; align-items: center; padding: 0 8px;
    font-size: 10px; font-weight: 700; color: #fff;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    cursor: pointer; transition: opacity 0.12s; opacity: 0.9;
}
.timeline-camp-block:hover { opacity: 1; }

/* Legenda timeline */
.timeline-legend {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-bottom: 1rem; font-size: 11px; opacity: 0.7;
}
.timeline-legend-item { display: flex; align-items: center; gap: 5px; }
.timeline-legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ── MODAL DE CAMPANHA ───────────────────────────── */
.camp-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: flex-start; justify-content: center;
    padding: 1.5rem 1rem; overflow-y: auto;
}
.camp-modal-overlay.open { display: flex; }
.camp-modal {
    background: #fff; border-radius: 14px; padding: 1.75rem;
    width: 100%; max-width: 600px; margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: fadeUp 0.2s ease;
}
body.bg-dark .camp-modal { background: #1e2530; }
.camp-modal h5 { font-weight: 700; margin-bottom: 1.25rem; font-size: 16px; }
.camp-modal label {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: #9A9890; margin-bottom: 5px;
}
.camp-modal textarea { resize: vertical; min-height: 90px; font-size: 13px; line-height: 1.6; }

/* ── PAINEL DETALHE ──────────────────────────────── */
/* Overlay escuro de fundo */
.camp-detail-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    justify-content: flex-end;
    align-items: stretch;
    overflow-y: auto;
}
.camp-detail-overlay.open { display: flex; }

.camp-detail-panel {
    background: #fff;
    width: 100%; max-width: 420px;
    min-height: 100vh;
    padding: 1.75rem;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    flex-shrink: 0;
    overflow-y: auto;
}
body.bg-dark .camp-detail-panel { background: #1a2030; }

.camp-detail-close {
    background: none; border: none; cursor: pointer; font-size: 18px;
    opacity: 0.4; padding: 0; line-height: 1; margin-bottom: 1.25rem;
    display: block; transition: opacity 0.15s; color: var(--bs-body-color);
}
.camp-detail-close:hover { opacity: 1; }
.camp-detail-name { font-family: Georgia, serif; font-style: italic; font-size: 1.6rem; margin-bottom: 0.25rem; }
.camp-detail-period { font-size: 12px; opacity: 0.5; margin-bottom: 1.25rem; }
.camp-detail-section { margin-bottom: 1rem; }
.camp-detail-section-title {
    font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; opacity: 0.4; margin-bottom: 6px;
}
.camp-detail-text { font-size: 13px; line-height: 1.65; }
.camp-detail-budget {
    font-size: 1.4rem; font-weight: 600; color: var(--palani-ocean); font-family: Georgia, serif;
}
.camp-detail-actions { display: flex; gap: 8px; margin-top: 1.5rem; }

.camp-pecas-list { display: flex; flex-wrap: wrap; gap: 6px; }
.camp-peca-tag {
    background: rgba(151,78,43,0.1); color: var(--palani-ocean);
    border-radius: 6px; padding: 3px 10px; font-size: 12px; font-weight: 600;
}
body.bg-dark .camp-peca-tag { background: rgba(151,78,43,0.2); }

/* Responsivo */
@media (max-width: 576px) {
    .camp-hero { padding: 1.25rem 1rem; }
    .camp-hero-brand { font-size: 1.8rem; }
    #camp-view-cal { padding: 1rem; }
    .camp-cell { min-height: 58px; padding: 4px; }
    .camp-pill { display: none; }
    .camp-detail-panel { max-width: 100%; }
    .camp-modal { padding: 1.25rem 1rem; }
}

/* ══════════════════════════════════════════════════
   NOTAS / TAREFAS (index)
   ══════════════════════════════════════════════════ */
.notas-section {
    margin-bottom: 1.5rem;
}
.notas-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.75rem; flex-wrap: wrap; gap: 8px;
}
.notas-title {
    font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; opacity: 0.7;
}
.btn-nova-tarefa {
    background: var(--palani-ocean); color: #fff; border: none;
    border-radius: 7px; padding: 6px 14px; font-size: 12px; font-weight: 600;
    cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.btn-nova-tarefa:hover { background: var(--palani-ocean-light); }

/* Grid de tarefas */
.notas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
@media (max-width: 575px) { .notas-grid { grid-template-columns: 1fr; } }

/* Card de tarefa */
.tarefa-card {
    background: #fff; border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 8px;
    transition: box-shadow 0.15s;
}
.tarefa-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,0.08); }
body.bg-dark .tarefa-card { background: #1e2530; border-color: rgba(255,255,255,0.09); }
.tarefa-card.concluida { opacity: 0.6; }

.tarefa-card-top {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 8px;
}
.tarefa-check-wrap { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }

.tarefa-check {
    width: 16px; height: 16px; border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2); flex-shrink: 0;
    cursor: pointer; margin-top: 1px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.12s, border-color 0.12s; font-size: 10px; color: #fff;
}
.tarefa-check.done { background: var(--palani-ocean); border-color: var(--palani-ocean); }
body.bg-dark .tarefa-check { border-color: rgba(255,255,255,0.25); }

.tarefa-titulo {
    font-size: 13px; font-weight: 600; line-height: 1.4;
    word-break: break-word;
}
.tarefa-titulo.riscado {
    text-decoration: line-through; opacity: 0.5; font-weight: 400;
}

.tarefa-actions { display: flex; gap: 4px; flex-shrink: 0; }
.tarefa-action-btn {
    background: none; border: none; cursor: pointer; font-size: 13px;
    opacity: 0.3; padding: 2px 5px; border-radius: 5px;
    transition: opacity 0.12s, background 0.12s; line-height: 1;
    color: var(--bs-body-color);
}
.tarefa-action-btn:hover          { opacity: 1; background: rgba(0,0,0,0.05); }
.tarefa-action-btn.danger:hover   { opacity: 1; color: #dc3545; background: #fdecea; }
body.bg-dark .tarefa-action-btn:hover { background: rgba(255,255,255,0.08); }

.tarefa-meta {
    display: flex; align-items: center; justify-content: space-between;
    gap: 6px; flex-wrap: wrap;
}
.tarefa-responsavel {
    font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
    background: rgba(151,78,43,0.1); color: var(--palani-ocean);
    border-radius: 20px; padding: 2px 9px;
}
body.bg-dark .tarefa-responsavel { background: rgba(151,78,43,0.2); }
.tarefa-data {
    font-size: 10px; opacity: 0.45;
    display: flex; align-items: center; gap: 3px;
}

/* Modal de tarefa */
.tarefa-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: flex-start; justify-content: center;
    padding: 2rem 1rem; overflow-y: auto;
}
.tarefa-modal-overlay.open { display: flex; }
.tarefa-modal {
    background: #fff; border-radius: 14px; padding: 1.5rem;
    width: 100%; max-width: 440px; margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: fadeUp 0.2s ease;
}
body.bg-dark .tarefa-modal { background: #1e2530; }
.tarefa-modal h5 { font-weight: 700; margin-bottom: 1.1rem; font-size: 15px; }
.tarefa-modal label {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: #9A9890; margin-bottom: 4px;
}

/* Filtros extra pedidos */
.pedidos-filter-extra {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: #fff;
    
}
body.bg-dark .pedidos-filter-extra { background: #1a1f2a; border-color: rgba(255,255,255,0.06); }
.pedidos-filter-extra label {
    font-size: 11px; font-weight: 600; opacity: 0.5;
    text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.pedidos-filter-extra input,
.pedidos-filter-extra select {
    font-size: 12px; padding: 4px 8px;
    border: 1px solid rgba(0,0,0,0.12); border-radius: 7px;
    background: var(--bs-body-bg); color: var(--bs-body-color);
    outline: none;
}
.pedidos-filter-extra input:focus,
.pedidos-filter-extra select:focus { border-color: var(--palani-ocean); }
.btn-limpar-filtros {
    background: none; border: 1px solid rgba(0,0,0,0.12); border-radius: 7px;
    padding: 4px 10px; font-size: 11px; cursor: pointer; color: var(--bs-body-color);
    transition: background 0.15s; white-space: nowrap; opacity: 0.6;
}
.btn-limpar-filtros:hover { background: rgba(0,0,0,0.05); opacity: 1; }
@media (max-width: 576px) {
    .pedidos-filter-extra { top: calc(52px + 50px + 40px); padding: 0.4rem 0.75rem; gap: 6px; }
}

/* ══ EXTRATO DO MÊS ════════════════════════════════ */
#extrato-card { transition: none; }
#extrato-header:hover { opacity: 0.85; }
.extrato-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 13px;
}
body.bg-dark .extrato-item { border-color: rgba(255,255,255,0.06); }
.extrato-item:last-child { border-bottom: none; }
.extrato-data  { font-size: 11px; opacity: 0.45; min-width: 60px; }
.extrato-tipo  {
    font-size: 10px; font-weight: 700; padding: 2px 7px;
    border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.extrato-titulo { font-weight: 600; flex: 1; }
.extrato-notas  { font-size: 11px; opacity: 0.5; }
.extrato-valor-pos { font-weight: 700; color: #1D9E75; white-space: nowrap; }
.extrato-valor-neg { font-weight: 700; color: #E8674A; white-space: nowrap; }

/* ══════════════════════════════════════════════════
   ESTOQUE
   ══════════════════════════════════════════════════ */

/* Hero */
.estoque-hero {
    padding: 2rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
body.bg-dark .estoque-hero { border-color: rgba(255,255,255,0.07); }
.estoque-hero-brand {
    font-family: Georgia, serif; font-style: italic;
    font-size: 2.4rem; font-weight: 400; color: #1C1C1A; line-height: 1;
}
body.bg-dark .estoque-hero-brand { color: #f0ece4; }
.estoque-hero-sub {
    font-size: 10px; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; opacity: 0.38; margin-top: 5px;
}

/* Barra controles */
.estoque-controls {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap; padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
body.bg-dark .estoque-controls { border-color: rgba(255,255,255,0.06); }
.estoque-search {
    flex: 1; min-width: 160px; max-width: 260px;
    padding: 6px 12px; border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px; font-size: 13px; outline: none;
    background: var(--bs-body-bg); color: var(--bs-body-color);
    transition: border-color 0.15s;
}
.estoque-search:focus { border-color: var(--palani-ocean); }
.estoque-filter {
    padding: 6px 10px; border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px; font-size: 13px;
    background: var(--bs-body-bg); color: var(--bs-body-color);
    outline: none; cursor: pointer;
}
.btn-add-estoque {
    background: var(--palani-ocean); color: #fff; border: none;
    border-radius: 8px; padding: 7px 16px; font-size: 13px;
    font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background 0.15s; margin-left: auto;
}
.btn-add-estoque:hover { background: var(--palani-ocean-light); }

/* Toggle Peças / Produtos */
.estoque-tabs {
    display: flex; gap: 0;
    padding: 0.75rem 1.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}
body.bg-dark .estoque-tabs { border-color: rgba(255,255,255,0.08); }
.estoque-tab {
    padding: 8px 20px; font-size: 13px; font-weight: 600;
    border: none; background: none; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    color: var(--bs-body-color); opacity: 0.45;
    transition: opacity 0.15s, border-color 0.15s;
}
.estoque-tab.active {
    opacity: 1; border-bottom-color: var(--palani-ocean);
    color: var(--palani-ocean);
}
.estoque-tab:hover:not(.active) { opacity: 0.75; }

/* Tabela de peças */
.estoque-container { padding: 1.25rem 1.5rem 3rem; }
.estoque-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.estoque-table th {
    text-align: left; padding: 9px 12px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--bs-body-color);
    opacity: 0.45; background: rgba(0,0,0,0.025);
    border-bottom: 1px solid rgba(0,0,0,0.06); white-space: nowrap;
}
body.bg-dark .estoque-table th {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.07);
}
.estoque-table th:not(:first-child):not(:last-child) { text-align: center; }
.estoque-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    color: var(--bs-body-color); vertical-align: middle;
}
body.bg-dark .estoque-table td { border-color: rgba(255,255,255,0.05); }
.estoque-table tr:last-child td { border-bottom: none; }
.estoque-table tr:hover td { background: rgba(0,0,0,0.015); }
body.bg-dark .estoque-table tr:hover td { background: rgba(255,255,255,0.025); }

/* Coluna peça/produto */
.estoque-table td:first-child {
    font-weight: 700; font-size: 12px; letter-spacing: 0.04em;
}
/* Colunas de quantidade — editáveis */
.qty-input {
    width: 54px; text-align: center; padding: 4px 6px;
    border: 1px solid rgba(0,0,0,0.1); border-radius: 6px;
    font-size: 13px; font-style: italic; font-family: Georgia, serif;
    background: transparent; color: var(--palani-ocean);
    outline: none; transition: border-color 0.12s;
}
.qty-input:focus { border-color: var(--palani-ocean); background: var(--bs-body-bg); }
body.bg-dark .qty-input { border-color: rgba(255,255,255,0.12); }

/* Coluna acções */
.estoque-del-btn {
    background: none; border: none; cursor: pointer;
    opacity: 0.25; font-size: 14px; padding: 3px 6px;
    border-radius: 6px; transition: opacity 0.12s, background 0.12s;
    color: var(--bs-body-color);
}
.estoque-del-btn:hover { opacity: 1; color: #dc3545; background: #fdecea; }

/* Badge encomendado */
.badge-encomendado {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; cursor: pointer; user-select: none;
}
.badge-encomendado input { cursor: pointer; width: 15px; height: 15px; }

/* Cor swatch na tabela */
.estoque-cor-dot {
    width: 12px; height: 12px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15); display: inline-block;
    margin-right: 5px; flex-shrink: 0; vertical-align: middle;
}

/* Estado vazio */
.estoque-empty {
    text-align: center; padding: 3rem 1rem;
    opacity: 0.4; font-size: 14px;
}
.estoque-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

/* Modal de estoque */
.estoque-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 9999;
    align-items: flex-start; justify-content: center;
    padding: 1.5rem 1rem; overflow-y: auto;
}
.estoque-modal-overlay.open { display: flex; }
.estoque-modal {
    background: #fff; border-radius: 14px; padding: 1.75rem;
    width: 100%; max-width: 540px; margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: fadeUp 0.2s ease;
}
body.bg-dark .estoque-modal { background: #1e2530; }
.estoque-modal h5 { font-weight: 700; margin-bottom: 1.25rem; font-size: 16px; }
.estoque-modal label {
    display: block; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: #9A9890; margin-bottom: 5px;
}

/* Responsivo */
@media (max-width: 576px) {
    .estoque-hero { padding: 1.25rem 1rem; }
    .estoque-hero-brand { font-size: 1.9rem; }
    .estoque-controls { padding: 0.6rem 1rem; }
    .estoque-search { max-width: 100%; }
    .estoque-container { padding: 1rem; }
    .estoque-table th, .estoque-table td { padding: 8px 8px; }
    .qty-input { width: 44px; }
    .estoque-modal-overlay { padding: 0.75rem; }
    .estoque-modal { padding: 1.25rem 1rem; }
}
