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

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-muted: #6b7280;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease-out;
    position: relative;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #eff6ff;
}

.back-to-home:hover {
    background: #dbeafe;
    transform: translateX(-4px);
}

.back-to-home i {
    font-size: 14px;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: #f0fdf4;
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 100px);
    background: var(--light-color);
}

.sidebar {
    width: 260px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.sidebar-header p {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 8px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin: 4px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--light-color);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-menu a.logout {
    color: var(--danger-color);
}

.sidebar-menu a.logout:hover {
    background: #fef2f2;
    border-left-color: var(--danger-color);
}

/* Menu Counter Badge */
.menu-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e53935;
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 9px;
    margin-left: 8px;
}

.sidebar-menu a:hover .menu-counter,
.sidebar-menu a.active .menu-counter {
    background: #c62828;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: var(--dark-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Dashboard Sections */
.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dashboard-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

.badge-urgente {
    background: #fee2e2;
    color: #991b1b;
}

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

.badge-aprovada {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelada {
    background: #fee2e2;
    color: #991b1b;
}

/* Text utilities */
.text-muted {
    color: var(--text-muted);
    font-size: 14px;
}

.text-center {
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    margin: 8px 0;
    font-size: 14px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .stats-grid,
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

/* ========== SISTEMA DE NOTIFICAÇÕES MODERNO ========== */

/* Container de Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

/* Toast Individual */
.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.toast.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Ícone do Toast */
.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Conteúdo do Toast */
.toast-content {
    flex: 1;
}

.toast-message {
    color: var(--dark-color);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Botão de Fechar */
.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--dark-color);
    transform: scale(1.1);
}

/* Barra de Progresso */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    animation: progress 5s linear forwards;
}

/* Tipos de Toast */
.toast.success {
    border-left-color: #10b981;
}

.toast.success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast.success .toast-progress {
    background: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast.error .toast-progress {
    background: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast.warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast.warning .toast-progress {
    background: #f59e0b;
}

.toast.info {
    border-left-color: #3b82f6;
}

.toast.info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.toast.info .toast-progress {
    background: #3b82f6;
}

/* Animações do Toast */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* ========== MODAL DE CONFIRMAÇÃO MODERNO ========== */

.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.confirm-modal-overlay.active {
    display: flex;
}

.confirm-modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
    text-align: center;
}

.confirm-modal-icon {
    font-size: 56px;
    color: #f59e0b;
    margin-bottom: 20px;
}

.confirm-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.confirm-modal-message {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

.confirm-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-modal-btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.confirm-modal-cancel {
    background: #f3f4f6;
    color: var(--dark-color);
}

.confirm-modal-cancel:hover {
    background: #e5e7eb;
}

.confirm-modal-confirm {
    background: var(--primary-color);
    color: white;
}

.confirm-modal-confirm:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.confirm-modal-confirm.danger {
    background: #ef4444;
}

.confirm-modal-confirm.danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsivo para Notificações */
@media (max-width: 768px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .confirm-modal {
        padding: 24px;
        width: 95%;
    }

    .confirm-modal-actions {
        flex-direction: column;
    }

    .confirm-modal-btn {
        width: 100%;
    }
}

/* ==================================================================
   MODULO DE REFORMAS
   Badges de status, stepper da nova solicitacao, timeline e
   checklist de documentos. Reaproveita os tokens de :root.
   ================================================================== */

.reforma-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.reforma-badge i { font-size: 11px; }

.reforma-badge-cinza    { background: #f3f4f6; color: #4b5563; }
.reforma-badge-azul     { background: #dbeafe; color: #1d4ed8; }
.reforma-badge-verde    { background: #d1fae5; color: #047857; }
.reforma-badge-amarelo  { background: #fef3c7; color: #b45309; }
.reforma-badge-laranja  { background: #ffedd5; color: #c2410c; }
.reforma-badge-vermelho { background: #fee2e2; color: #b91c1c; }
.reforma-badge-ciano    { background: #cffafe; color: #0e7490; }

/* ---------- Stepper ---------- */

.reforma-stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.reforma-step {
    flex: 1 1 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    text-decoration: none;
    border-top: 3px solid var(--border-color);
}

.reforma-step-numero {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--light-color);
    color: var(--text-muted);
    font-weight: 700;
}

.reforma-step.ativo { color: var(--primary-color); border-top-color: var(--primary-color); }
.reforma-step.ativo .reforma-step-numero { background: var(--primary-color); color: #fff; }

.reforma-step.concluido { color: var(--secondary-color); border-top-color: var(--secondary-color); }
.reforma-step.concluido .reforma-step-numero { background: var(--secondary-color); color: #fff; }

.reforma-progresso {
    height: 6px;
    border-radius: 999px;
    background: var(--light-color);
    overflow: hidden;
    margin-bottom: 20px;
}

.reforma-progresso-barra {
    height: 100%;
    background: var(--primary-color);
    transition: width .3s ease;
}

/* ---------- Cartao de passo ---------- */

.reforma-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    margin-bottom: 20px;
}

.reforma-card h2 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--dark-color);
}

.reforma-card-descricao {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
}

.reforma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.reforma-grid .span-2 { grid-column: 1 / -1; }

.reforma-acoes {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ---------- Timeline ---------- */

.reforma-timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 28px;
    border-left: 2px solid var(--border-color);
}

.reforma-timeline li {
    position: relative;
    padding-bottom: 22px;
}

.reforma-timeline li::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 0 3px #fff;
}

.reforma-timeline li:last-child { padding-bottom: 0; }

.reforma-timeline-data {
    font-size: 12px;
    color: var(--text-muted);
}

.reforma-timeline-evento {
    font-weight: 600;
    color: var(--dark-color);
}

.reforma-timeline-descricao {
    font-size: 13px;
    color: var(--text-color);
}

/* ---------- Situacao documental ---------- */

.reforma-docs { list-style: none; margin: 0; padding: 0; }

.reforma-docs li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.reforma-docs li:last-child { border-bottom: none; }

.reforma-doc-ok      { color: var(--secondary-color); }
.reforma-doc-falta   { color: var(--danger-color); }
.reforma-doc-opcional { color: var(--text-muted); font-size: 12px; }

/* ---------- Conversa ---------- */

.reforma-mensagens { display: flex; flex-direction: column; gap: 12px; }

.reforma-mensagem {
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--light-color);
    max-width: 80%;
}

.reforma-mensagem.propria {
    align-self: flex-end;
    background: #dbeafe;
}

.reforma-mensagem-autor {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.reforma-mensagem-data { font-size: 11px; color: var(--text-muted); }

/* ---------- Pendencia ---------- */

.reforma-pendencia {
    border-left: 4px solid var(--warning-color);
    background: #fffbeb;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.reforma-pendencia.resolvida {
    border-left-color: var(--secondary-color);
    background: #f0fdf4;
}

/* ---------- Tabela responsiva ---------- */

.reforma-tabela-wrap { overflow-x: auto; }

@media (max-width: 768px) {
    .reforma-step span:not(.reforma-step-numero) { display: none; }
    .reforma-step { flex-basis: 44px; }
    .reforma-acoes { flex-direction: column; }
    .reforma-acoes .btn { width: 100%; }
    .reforma-mensagem { max-width: 100%; }
}

/* ---------- Checkbox e radio do modulo de Reformas ----------
   `.form-group input { width: 100% }` do CSS base tambem atinge checkbox e
   radio: o controle estica pela linha toda e o Chrome centraliza o quadradinho,
   jogando o texto para longe. O escopo abaixo e proprio do modulo, para nao
   alterar as telas antigas que ja contornam isso com estilo inline.          */

.reforma-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin: 0 0 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.reforma-check:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.reforma-check input[type="checkbox"],
.reforma-check input[type="radio"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 2px 0 0;
    padding: 0;
    border-width: 1px;
    border-radius: 4px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.reforma-check > span {
    flex: 1 1 auto;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    color: var(--text-color);
}

.reforma-check .obrigatorio {
    color: var(--danger-color);
    font-weight: 600;
}

/* Item aceito ganha destaque, para o morador ver o que ainda falta. */
.reforma-check:has(input:checked) {
    border-color: var(--secondary-color);
    background: #f0fdf4;
}

/* Radios da matriz tipo x documento, dentro da tabela. */
.reforma-tabela-wrap input[type="radio"] {
    width: 18px;
    height: 18px;
    padding: 0;
    border-width: 1px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.reforma-check-lista {
    display: flex;
    flex-direction: column;
}

/* ---------- Tabelas do modulo de Reformas ----------
   A classe .table nao tem nenhuma regra no CSS base — as celulas saem coladas.
   O escopo aqui e o wrapper do modulo, para nao mexer nas 24 tabelas antigas
   que hoje dependem desse mesmo .table sem estilo.                          */

.reforma-tabela-wrap .table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.reforma-tabela-wrap .table thead th {
    padding: 12px 14px;
    background: #f9fafb;
    border-bottom: 2px solid var(--border-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    white-space: nowrap;
}

.reforma-tabela-wrap .table thead th a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.reforma-tabela-wrap .table thead th a:hover { color: var(--primary-color); }

/* Seta some quando a coluna nao e a ordenada, mas reaparece no hover para
   indicar que a coluna e clicavel. */
.reforma-tabela-wrap .table thead th a .ordenacao { opacity: .25; }
.reforma-tabela-wrap .table thead th a:hover .ordenacao,
.reforma-tabela-wrap .table thead th a .ordenacao.ativa { opacity: 1; color: var(--primary-color); }

.reforma-tabela-wrap .table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-color);
}

.reforma-tabela-wrap .table tbody tr:last-child td { border-bottom: none; }
.reforma-tabela-wrap .table tbody tr:hover { background: #f8fafc; }

.reforma-tabela-wrap .table .col-acoes { text-align: right; white-space: nowrap; }
.reforma-tabela-wrap .table .col-centro { text-align: center; }

.reforma-protocolo {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--dark-color);
    text-decoration: none;
    white-space: nowrap;
}

.reforma-protocolo:hover { color: var(--primary-color); text-decoration: underline; }

.reforma-celula-secundaria {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.reforma-prazo-atrasado { color: var(--danger-color); font-weight: 600; }

.reforma-vazio {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
}

.reforma-vazio i { font-size: 32px; display: block; margin-bottom: 10px; opacity: .5; }

/* ---------- Paginacao ---------- */

.reforma-paginacao ul,
.reforma-paginacao .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.reforma-paginacao li { list-style: none; }

.reforma-paginacao a,
.reforma-paginacao span {
    display: inline-block;
    min-width: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    color: var(--text-color);
    background: #fff;
}

.reforma-paginacao a:hover { border-color: var(--primary-color); color: var(--primary-color); }
.reforma-paginacao .active span,
.reforma-paginacao li.active a {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.reforma-paginacao .disabled span { opacity: .4; }

.reforma-tabela-rodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* ---------- Tabela vira cartao no celular ----------
   Cada linha passa a ser um bloco com rotulo antes do valor, em vez de rolar
   uma tabela larga demais na horizontal.                                    */

@media (max-width: 820px) {
    .reforma-tabela-wrap.cartoes-no-mobile .table thead { display: none; }

    .reforma-tabela-wrap.cartoes-no-mobile .table,
    .reforma-tabela-wrap.cartoes-no-mobile .table tbody,
    .reforma-tabela-wrap.cartoes-no-mobile .table tr,
    .reforma-tabela-wrap.cartoes-no-mobile .table td {
        display: block;
        width: 100%;
    }

    .reforma-tabela-wrap.cartoes-no-mobile .table tbody tr {
        border: 1px solid var(--border-color);
        border-radius: 10px;
        margin-bottom: 12px;
        padding: 6px 4px;
    }

    .reforma-tabela-wrap.cartoes-no-mobile .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 8px 12px;
        border-bottom: 1px dashed var(--border-color);
        text-align: right;
    }

    .reforma-tabela-wrap.cartoes-no-mobile .table tbody td::before {
        content: attr(data-rotulo);
        flex: 0 0 40%;
        text-align: left;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .5px;
        text-transform: uppercase;
        color: var(--text-muted);
    }

    .reforma-tabela-wrap.cartoes-no-mobile .table tbody td:last-child { border-bottom: none; }
    .reforma-tabela-wrap.cartoes-no-mobile .table .col-acoes { text-align: right; }
}

/* ---------- Modais do modulo de Reformas ----------
   `.modal`, `.modal-content` e `.close` nao existem no CSS base: alternar
   display:block apenas empurra o conteudo para o fim da pagina, sem overlay.
   O escopo aqui e proprio do modulo, para nao alterar os modais antigos.    */

.reforma-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 24px 16px;
    overflow-y: auto;
    background: rgba(15, 23, 42, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.reforma-modal.aberto {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.reforma-modal-caixa {
    width: 100%;
    max-width: 560px;
    margin: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
    animation: reforma-modal-entra .18s ease-out;
}

@keyframes reforma-modal-entra {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.reforma-modal-cabecalho {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
}

.reforma-modal-cabecalho h2 {
    margin: 0;
    font-size: 18px;
    color: var(--dark-color);
}

.reforma-modal-cabecalho p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.reforma-modal-fechar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.reforma-modal-fechar:hover { background: var(--light-color); color: var(--dark-color); }

.reforma-modal-corpo { padding: 20px 24px; }

.reforma-modal-rodape {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Trava a rolagem do fundo enquanto o modal esta aberto. */
body.reforma-modal-ativo { overflow: hidden; }

@media (max-width: 600px) {
    .reforma-modal { padding: 12px; }
    .reforma-modal-rodape { flex-direction: column-reverse; }
    .reforma-modal-rodape .btn { width: 100%; }
}
