/* ============================================================
   CSEnergy — Canal Ético — Hoja de Estilos Principal
   Compatibilidad: Chrome 80+, Firefox 75+, Safari 13+, Edge 80+
   ============================================================ */

/* ---- Variables de diseño ----------------------------------- */
:root {
    --primary:        #1e40af;
    --primary-dark:   #1e3a8a;
    --primary-light:  #dbeafe;
    --secondary:      #0f766e;
    --accent:         #f59e0b;
    --danger:         #dc2626;
    --danger-light:   #fee2e2;
    --success:        #16a34a;
    --success-light:  #dcfce7;
    --warning-light:  #fef3c7;
    --info-light:     #e0f2fe;

    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white:    #ffffff;

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

    --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
    --shadow:    0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

/* ---- Reset básico ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--primary); }

/* ---- Contenedores ------------------------------------------ */
.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 880px;  margin: 0 auto; padding: 0 1.5rem; }

/* ---- Cabecera ---------------------------------------------- */
.site-header {
    background: var(--primary);
    color: white;
    padding: .875rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: .625rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.0625rem;
}
.logo img { height: 34px; border-radius: var(--radius-sm); }
.header-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .875rem;
    padding: .375rem .875rem;
    border-radius: var(--radius);
    transition: background .15s;
}
.header-nav a:hover { background: rgba(255,255,255,.18); color: white; }

/* ---- Pie de página ----------------------------------------- */
.site-footer {
    background: var(--gray-800);
    color: var(--gray-400);
    padding: 1.5rem 0;
    font-size: .8125rem;
    text-align: center;
    margin-top: auto;
}

/* ---- Botones ----------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    padding: .5rem 1.375rem;
    font-size: .9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s;
    line-height: 1.4;
    white-space: nowrap;
    font-family: inherit;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary       { background: var(--primary);   color: white; border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-secondary     { background: var(--secondary); color: white; border-color: var(--secondary); }
.btn-secondary:hover:not(:disabled) { filter: brightness(.92); }

.btn-outline       { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary-light); }

.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,.8); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); }

.btn-outline-light { background: transparent; color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.4); font-size: .8125rem; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }

.btn-danger        { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover  { filter: brightness(.92); }

.btn-lg   { padding: .75rem 2rem; font-size: 1rem; }
.btn-sm   { padding: .3rem .75rem; font-size: .8125rem; }
.btn-block { width: 100%; }
.mt-auto  { margin-top: auto; }

/* ---- Alertas ----------------------------------------------- */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    border: 1px solid transparent;
}
.alert-error   { background: var(--danger-light);  color: #991b1b; border-color: #fca5a5; }
.alert-success { background: var(--success-light); color: #14532d; border-color: #86efac; }
.alert-warning { background: var(--warning-light); color: #78350f; border-color: #fcd34d; }
.alert-info    { background: var(--info-light);    color: #075985; border-color: #7dd3fc; }

/* ---- Hero -------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
    color: white;
    padding: 5rem 0 4.5rem;
    text-align: center;
}
.hero-content { max-width: 620px; margin: 0 auto; }
.hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.125rem; }
.hero p  { font-size: 1.0625rem; opacity: .9; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Features ---------------------------------------------- */
.features-section { padding: 4.5rem 0; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: white;
    padding: 2rem 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--gray-200);
}
.feature-icon { font-size: 2.5rem; margin-bottom: .875rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; color: var(--gray-800); }
.feature-card p  { font-size: .875rem; color: var(--gray-500); }

/* ---- CTA --------------------------------------------------- */
.cta-section { padding: 0 0 4rem; }
.cta-box {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
}
.cta-box h2 { font-size: 1.625rem; margin-bottom: .625rem; }
.cta-box p  { opacity: .85; margin-bottom: 1.75rem; }
.cta-box .btn-primary { background: white; color: var(--primary); border-color: white; }
.cta-box .btn-primary:hover { background: var(--gray-100); }

/* ---- Secciones de página ----------------------------------- */
.page-section  { padding: 3rem 0; }
.section-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; color: var(--gray-900); }
.section-sub   { color: var(--gray-500); margin-bottom: 2rem; }
.back-link     { margin-bottom: 1.5rem; }
.back-link a   { color: var(--gray-500); text-decoration: none; font-size: .875rem; }
.back-link a:hover { color: var(--primary); }
.required-mark { color: var(--danger); }

/* ---- Tarjetas de opción (selección de tipo) ---------------- */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}
.option-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    text-align: center;
    text-decoration: none;
    color: var(--gray-800);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .875rem;
    box-shadow: var(--shadow);
    transition: border-color .2s, transform .2s, box-shadow .2s;
    min-height: 280px;
}
.option-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.option-icon  { font-size: 3rem; }
.option-card h3 { font-size: 1.25rem; font-weight: 700; }
.option-card p  { font-size: .875rem; color: var(--gray-500); flex: 1; }
.info-box {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: .875rem;
    border: 1px solid #bfdbfe;
}

/* ---- Formulario de denuncia -------------------------------- */
.complaint-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}
.form-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid var(--primary-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    margin-bottom: .875rem;
}
.form-group:last-child { margin-bottom: 0; }
.form-group label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--gray-700);
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: .625rem .875rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .9375rem;
    font-family: inherit;
    color: var(--gray-800);
    background: white;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select   { appearance: auto; }

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    cursor: pointer;
    font-size: .9rem;
    color: var(--gray-700);
}
.checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px; min-width: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Radio cards */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: .75rem;
}
.radio-card {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: .875rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .625rem;
    font-size: .875rem;
    color: var(--gray-700);
    transition: border-color .15s, background .15s;
}
.radio-card:hover { border-color: var(--primary); background: var(--primary-light); }
.radio-card input[type="radio"] { accent-color: var(--primary); }
.radio-card.selected,
.radio-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
    color: var(--primary-dark);
}

/* Zona de subida de archivos */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color .15s, background .15s;
}
.upload-zone.drag-active { border-color: var(--primary); background: var(--primary-light); }
.upload-prompt {
    text-align: center;
    cursor: pointer;
    color: var(--gray-500);
    padding: .5rem;
}
.upload-icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.upload-prompt p    { font-size: .9rem; margin-bottom: .25rem; }
.upload-prompt strong { color: var(--primary); }
.upload-prompt small { font-size: .75rem; display: block; }
.file-list { list-style: none; margin-top: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: .5rem .875rem;
    border-radius: var(--radius);
    font-size: .8125rem;
    color: var(--gray-700);
}
.file-list li .remove-btn {
    cursor: pointer;
    color: var(--danger);
    font-weight: 700;
    padding: 0 .25rem;
    line-height: 1;
    background: none;
    border: none;
    font-size: 1rem;
}
.form-actions { padding: .75rem 0 .25rem; text-align: center; }

/* ---- Pantalla de éxito ------------------------------------- */
.success-screen {
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}
.success-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-screen h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; color: var(--gray-900); }
.success-screen > p { color: var(--gray-600); margin-bottom: 1.5rem; }
.credentials-box {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem auto;
    max-width: 460px;
}
.credential-item { text-align: center; }
.cred-label {
    display: block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
    margin-bottom: .375rem;
}
.cred-value {
    font-size: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: .15em;
    color: var(--gray-900);
}
.success-actions { display: flex; gap: .875rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---- Seguimiento ------------------------------------------- */
.case-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: .75rem;
}
.case-label { font-size: .8125rem; color: var(--gray-500); margin-right: .5rem; }
.case-code-display {
    font-family: monospace;
    font-size: 1.125rem;
    letter-spacing: .1em;
    color: var(--gray-900);
    margin-right: .75rem;
}
.detail-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.card-subtitle {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: .625rem;
    border-bottom: 1px solid var(--gray-200);
}
dl { display: grid; grid-template-columns: auto 1fr; gap: .375rem 1.25rem; font-size: .875rem; }
dt { font-weight: 600; color: var(--gray-500); white-space: nowrap; }
dd { color: var(--gray-800); }

/* Timeline de actualizaciones */
.update-timeline { display: flex; flex-direction: column; gap: 1rem; }
.update-item {
    padding-left: 1.25rem;
    border-left: 2px solid var(--gray-200);
    position: relative;
}
.update-item::before {
    content: '';
    width: 10px; height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    left: -6px; top: 5px;
    border: 2px solid white;
}
.update-meta { font-size: .75rem; margin-bottom: .2rem; }
.update-author { font-weight: 700; color: var(--primary); }
.update-date   { color: var(--gray-400); margin-left: .5rem; }
.update-msg    { font-size: .875rem; color: var(--gray-700); }

.files-attached { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.files-attached li {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    padding: .5rem .875rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

/* ---- Badges de estado y tipo ------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.badge-pendiente  { background: var(--warning-light); color: #78350f; }
.badge-en_proceso { background: var(--primary-light);  color: var(--primary-dark); }
.badge-resuelto   { background: var(--success-light);  color: #14532d; }
.badge-archivado  { background: #f1f5f9; color: #475569; }
.badge-general    { background: #f3e8ff; color: #6b21a8; }
.badge-laboral    { background: #ffedd5; color: #9a3412; }

/* ============================================================
   PANEL DE ADMINISTRACIÓN
   ============================================================ */

.admin-login-page  { background: #0f172a; }
.admin-login-wrap  {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}
.admin-login-box {
    background: white;
    padding: 2.75rem 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.admin-login-logo { text-align: center; margin-bottom: 1rem; }
.admin-login-logo img { height: 48px; margin: 0 auto; }
.admin-login-box h1 { font-size: 1.375rem; font-weight: 800; color: var(--primary); text-align: center; }
.admin-login-box h2 { font-size: .9rem; color: var(--gray-500); text-align: center; margin-bottom: 1.75rem; font-weight: 400; }

/* Layout */
.admin-body   { background: #f1f5f9; min-height: 100vh; }
.admin-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--gray-900);
    color: white;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-weight: 800;
    font-size: .9375rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    color: white;
    line-height: 1.3;
}
.sidebar-nav { flex: 1; padding: .75rem 0; }
.sidebar-nav .nav-item {
    display: block;
    padding: .625rem 1.5rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .875rem;
    transition: background .15s, color .15s;
    cursor: pointer;
}
.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
    color: white;
    background: rgba(255,255,255,.1);
}
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .8rem;
    color: rgba(255,255,255,.55);
}

/* Contenido admin */
.admin-content { flex: 1; padding: 2rem; overflow-y: auto; min-width: 0; }
.admin-view { display: flex; flex-direction: column; gap: 1.25rem; }
.view-title  { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); margin: 0; }
.view-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .875rem;
}
.section-heading { font-size: 1rem; font-weight: 700; color: var(--gray-700); }
.toolbar-filters { display: flex; gap: .75rem; flex-wrap: wrap; }
.filter-select {
    padding: .375rem .75rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .875rem;
    background: white;
    font-family: inherit;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}
.stat-card.skeleton { color: var(--gray-400); font-size: .875rem; }
.stat-value { font-size: 2.25rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: .8125rem; color: var(--gray-500); margin-top: .25rem; }

/* Tabla */
.data-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: .875rem;
}
.data-table th {
    background: var(--gray-50);
    padding: .75rem 1rem;
    font-size: .75rem;
    font-weight: 700;
    text-align: left;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.data-table td {
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--gray-50); cursor: pointer; }
.data-table code { font-family: monospace; letter-spacing: .06em; font-size: .875rem; }

/* Paginación */
.pagination-wrap { display: flex; justify-content: flex-end; padding: .75rem 0; gap: .5rem; }
.page-btn {
    padding: .375rem .875rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .8125rem;
    cursor: pointer;
    background: white;
    font-family: inherit;
}
.page-btn:hover         { border-color: var(--primary); color: var(--primary); }
.page-btn.active        { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled      { opacity: .4; cursor: default; }

/* Detalle de denuncia (admin) */
.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .875rem;
}
.meta-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: .875rem 1rem;
    box-shadow: var(--shadow-sm);
}
.meta-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); margin-bottom: .25rem; }
.meta-value { font-size: .9375rem; font-weight: 600; color: var(--gray-800); }
.status-select {
    padding: .375rem .75rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .875rem;
    background: white;
    font-family: inherit;
    width: 100%;
    margin-top: .25rem;
}
.section-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}
.section-card h4 {
    font-size: .9375rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--gray-200);
}
.note-form { display: flex; flex-direction: column; gap: .75rem; }
.note-form textarea {
    padding: .625rem .875rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: inherit;
    width: 100%;
    resize: vertical;
    min-height: 80px;
}
.note-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,.12);
}
.note-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
}
.description-block {
    white-space: pre-wrap;
    font-size: .9rem;
    color: var(--gray-700);
    line-height: 1.7;
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

/* ============================================================
   TOPBAR — link de regreso a sitio principal
   ============================================================ */

.topbar {
    background: var(--gray-900);
    padding: .35rem 0;
    font-size: .75rem;
}
.topbar-link {
    color: rgba(255,255,255,.55);
    text-decoration: none;
    letter-spacing: .02em;
    transition: color .15s;
}
.topbar-link:hover { color: rgba(255,255,255,.9); }

/* ============================================================
   HEADER — navegación mejorada
   ============================================================ */

/* Botón hamburguesa (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.header-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.header-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .875rem;
    padding: .375rem .875rem;
    border-radius: var(--radius);
    transition: background .15s, color .15s;
}
.header-nav a:hover,
.header-nav a.nav-active { color: white; background: rgba(255,255,255,.18); }

.btn-nav {
    background: white !important;
    color: var(--primary) !important;
    font-weight: 700;
    font-size: .875rem !important;
    padding: .375rem 1rem !important;
    border-radius: var(--radius) !important;
    border: none;
}
.btn-nav:hover { background: var(--gray-100) !important; }

/* ============================================================
   HERO FULL — página principal
   ============================================================ */

.hero-full {
    position: relative;
    min-height: 92vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Imagen de fondo + overlay oscuro.
       Si no existe /assets/img/hero.jpg, el gradiente actúa como fondo. */
    background-color: #0f1e3d;
    background-image:
        linear-gradient(135deg, rgba(10,19,50,.88) 0%, rgba(30,64,175,.78) 60%, rgba(15,118,110,.70) 100%),
        url('/assets/img/hero.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    color: white;
    overflow: hidden;
}

/* Patrón geométrico sutil encima (SVG inline en CSS) */
.hero-full::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content-wrap {
    position: relative;
    z-index: 1;
    padding: 6rem 0 4rem;
    text-align: center;
}

.hero-badge-row { margin-bottom: 1.5rem; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    color: rgba(255,255,255,.9);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .35rem 1rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.hero-headline {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -.02em;
}
.hero-accent {
    background: linear-gradient(90deg, #60a5fa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.1875rem);
    opacity: .88;
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.65;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.btn-white {
    background: white;
    color: var(--primary-dark);
    border-color: white;
    font-weight: 700;
}
.btn-white:hover { background: var(--gray-100); border-color: var(--gray-100); }

.btn-ghost-white {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,.55);
}
.btn-ghost-white:hover { background: rgba(255,255,255,.12); border-color: white; }

.btn-xl { padding: .875rem 2.25rem; font-size: 1.0625rem; }
.btn-icon { font-size: 1.1em; }

.hero-trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8125rem;
    color: rgba(255,255,255,.75);
    letter-spacing: .02em;
}
.trust-sep { opacity: .4; }

/* Indicador de scroll */
.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255,255,255,.5);
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    z-index: 1;
    animation: float-hint 2.5s ease-in-out infinite;
}
.scroll-arrow {
    width: 18px;
    height: 18px;
    border-right: 2px solid rgba(255,255,255,.4);
    border-bottom: 2px solid rgba(255,255,255,.4);
    transform: rotate(45deg);
    margin: .4rem auto 0;
}
@keyframes float-hint {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   TRUST STRIP
   ============================================================ */

.trust-strip {
    background: var(--primary-dark);
    color: white;
    padding: 1.75rem 0;
}
.trust-strip-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.trust-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 1rem 1.5rem;
}
.trust-num {
    font-size: 1.25rem;
    font-weight: 800;
    color: #60a5fa;
    margin-bottom: .25rem;
}
.trust-desc {
    font-size: .8125rem;
    color: rgba(255,255,255,.7);
    line-height: 1.45;
}
.trust-divider {
    width: 1px;
    height: 60px;
    background: rgba(255,255,255,.15);
    flex-shrink: 0;
}

/* ============================================================
   SECTION HEADER COMPARTIDO
   ============================================================ */

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: .625rem;
}
.section-header p {
    font-size: 1.0625rem;
    color: var(--gray-500);
    max-width: 540px;
    margin: 0 auto;
}
.section-header-light h2 { color: white; }
.section-header-light p  { color: rgba(255,255,255,.75); }

/* ============================================================
   CÓMO FUNCIONA
   ============================================================ */

.how-section {
    padding: 5rem 0;
    background: var(--gray-50);
}
.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.step-card {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
}
.step-number {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: .75rem;
}
.step-icon {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    display: block;
}
.step-card h3 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: .625rem;
}
.step-card p {
    font-size: .875rem;
    color: var(--gray-500);
    line-height: 1.65;
}
.step-connector {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    margin-top: 4.5rem;
    flex-shrink: 0;
    align-self: flex-start;
}
.steps-cta { text-align: center; margin-top: 2.5rem; }

/* ============================================================
   TIPOS DE DENUNCIA
   ============================================================ */

.types-section {
    padding: 5rem 0;
    background: white;
}
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    max-width: 860px;
    margin: 0 auto;
}
.type-card {
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 2px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: border-color .2s, box-shadow .2s;
}
.type-card:hover { box-shadow: var(--shadow-lg); }
.type-general { border-top: 4px solid var(--primary); }
.type-laboral  { border-top: 4px solid var(--secondary); }

.type-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.type-icon { font-size: 2rem; }
.type-header h3 { font-size: 1.125rem; font-weight: 800; flex: 1; }
.type-law {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: .2rem .6rem;
    border-radius: 999px;
}
.type-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}
.type-list li {
    font-size: .875rem;
    color: var(--gray-600);
    padding-left: 1.25rem;
    position: relative;
}
.type-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

/* ============================================================
   GARANTÍAS
   ============================================================ */

.guarantees-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a8a 100%);
    color: white;
}
.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.guarantee-item {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    backdrop-filter: blur(4px);
    transition: background .2s;
}
.guarantee-item:hover { background: rgba(255,255,255,.13); }
.guarantee-icon { font-size: 2.25rem; margin-bottom: .875rem; display: block; }
.guarantee-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.guarantee-item p  { font-size: .875rem; color: rgba(255,255,255,.75); line-height: 1.6; }

/* ============================================================
   SECCIÓN DE POLÍTICAS — home
   ============================================================ */

.policies-section {
    padding: 5rem 0;
    background: var(--gray-50);
}
.policies-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.policy-card {
    flex: 1 1 300px;
    max-width: calc(50% - .5rem);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--gray-800);
    transition: border-color .15s, box-shadow .15s, transform .15s;
    box-shadow: var(--shadow-sm);
}
.policy-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.policy-icon { font-size: 1.75rem; flex-shrink: 0; }
.policy-info { flex: 1; min-width: 0; }
.policy-info h4 {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .2rem;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.policy-info p  { font-size: .8rem; color: var(--gray-500); line-height: 1.35; }
.policy-pdf-badge {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--danger);
    border: 1.5px solid var(--danger);
    padding: .15rem .45rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.policies-footer-note { text-align: center; }

/* ============================================================
   CTA FINAL
   ============================================================ */

.final-cta {
    padding: 4rem 0;
    background: var(--gray-900);
}
.final-cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 1.25rem;
    padding: 3.5rem 2rem;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-lg);
}
.final-cta-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.final-cta-box h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: .75rem; }
.final-cta-box p  { font-size: 1.0625rem; opacity: .88; max-width: 520px; margin: 0 auto 2rem; }
.final-cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   PÁGINA POLÍTICAS — politicas.php
   ============================================================ */

.page-hero-sm {
    background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
}
.page-hero-sm h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: .625rem; }
.page-hero-sm p  { opacity: .88; font-size: 1rem; max-width: 520px; margin: 0 auto; }

.doc-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }

.doc-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
.doc-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }

.doc-num {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--gray-200);
    line-height: 1;
    min-width: 2.5rem;
    text-align: right;
    padding-top: .1rem;
}
.doc-icon { font-size: 2rem; flex-shrink: 0; padding-top: .05rem; }
.doc-body { flex: 1; min-width: 0; }
.doc-top {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.doc-body h2 { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.doc-tag {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: .2rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
    margin-top: .1rem;
}
.doc-body p { font-size: .875rem; color: var(--gray-500); line-height: 1.6; }

.doc-actions {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: flex-end;
    flex-shrink: 0;
}

.legal-note {
    background: var(--warning-light);
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: .875rem;
    color: #78350f;
    margin-bottom: 2rem;
}

.policies-cta-box {
    background: var(--primary);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.policies-cta-box h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: .25rem; }
.policies-cta-box p  { font-size: .875rem; opacity: .85; }
.policies-cta-box .btn-primary {
    background: white;
    color: var(--primary);
    border-color: white;
    white-space: nowrap;
}

/* ============================================================
   FOOTER MEJORADO
   ============================================================ */

.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.footer-brand .footer-logo img { height: 28px; }
.footer-brand p { font-size: .8125rem; line-height: 1.65; max-width: 300px; }
.footer-links h4 {
    color: white;
    font-size: .8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .875rem;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: .8125rem;
    transition: color .15s;
}
.footer-links a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 1.5rem;
    text-align: center;
    font-size: .75rem;
}
.footer-legal { margin-top: .375rem; color: var(--gray-500); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .trust-divider { display: none; }
    .trust-strip-grid { gap: 1rem; }
    .step-connector { display: none; }
    .steps-grid { gap: 1rem; }
    .step-card { max-width: 100%; }
}

@media (max-width: 768px) {
    /* header */
    .nav-toggle    { display: flex; }
    .header-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        align-items: stretch;
        padding: .75rem 1rem 1rem;
        box-shadow: var(--shadow-lg);
        z-index: 200;
    }
    .site-header { position: relative; }
    .header-nav.nav-open { display: flex; }
    .header-nav a { padding: .625rem .875rem; border-radius: var(--radius-sm); }
    .btn-nav { text-align: center; margin-top: .25rem; }

    /* hero */
    .hero-full    { min-height: 80vh; }
    .hero-ctas    { flex-direction: column; align-items: center; }
    .hero-trust-row { flex-direction: column; gap: .5rem; }
    .trust-sep    { display: none; }

    /* doc card */
    .doc-card       { flex-wrap: wrap; }
    .doc-actions    { flex-direction: row; align-items: center; flex-basis: 100%; }
    .doc-num        { display: none; }

    /* types */
    .types-grid { grid-template-columns: 1fr; }

    /* footer */
    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    /* forms */
    .form-row       { grid-template-columns: 1fr; }
    .detail-two-col { grid-template-columns: 1fr; }

    /* policies cta */
    .policies-cta-box { flex-direction: column; text-align: center; }

    /* admin */
    .admin-layout   { flex-direction: column; }
    .admin-sidebar  { width: 100%; height: auto; position: static; }
    .sidebar-nav    { display: flex; flex-wrap: wrap; padding: .5rem; }
    .sidebar-nav .nav-item { padding: .375rem .75rem; font-size: .8rem; }
    .admin-content  { padding: 1rem; }
    .view-toolbar   { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-headline  { font-size: 1.75rem; }
    .radio-grid     { grid-template-columns: 1fr; }
    .option-grid    { grid-template-columns: 1fr; }
    .stats-grid     { grid-template-columns: repeat(2, 1fr); }
    .policy-card    { max-width: 100%; }
    .guarantees-grid { grid-template-columns: 1fr; }
    .credentials-box { gap: 1.25rem; }
}

/* ---- Campos con error (RUT inválido) ----------------------- */
.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
}
.field-error-msg {
    font-size: .8rem;
    color: var(--danger);
    margin-top: .2rem;
    display: block;
}

/* ============================================================
   ADMIN — GESTIÓN DE ESTADOS Y ARCHIVO
   ============================================================ */

/* Separador en el sidebar */
.nav-separator {
    height: 1px;
    background: rgba(255,255,255,.1);
    margin: .5rem .75rem;
}

/* Cabecera del detalle con botones de acción */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.detail-header-left {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.status-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* Botones de acción de estado */
.btn-action-process {
    background: var(--primary);
    color: white;
    border: none;
}
.btn-action-process:hover { background: var(--primary-dark); }

.btn-action-resolve {
    background: var(--success);
    color: white;
    border: none;
}
.btn-action-resolve:hover { filter: brightness(.9); }

.btn-action-archive {
    background: #475569;
    color: white;
    border: none;
}
.btn-action-archive:hover { background: #334155; }

.btn-action-back {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}
.btn-action-back:hover { background: var(--gray-100); }

/* Panel de archivo automático en el dashboard */
.archive-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: .875rem 1.125rem;
    margin-bottom: 1.5rem;
    font-size: .875rem;
}
.archive-panel-info { color: #92400e; }
.btn-archive {
    background: #78350f;
    color: white;
    border: none;
    white-space: nowrap;
}

/* ---- Status tab bar (list view filter) --------------------- */
.status-tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
}
.status-tab {
    padding: .35rem .85rem;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    background: white;
    color: var(--gray-600);
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    white-space: nowrap;
}
.status-tab:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}
.status-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ---- Resolution panel (shown when marking as resolved) ----- */
.resolution-panel {
    background: var(--success-light);
    border: 1px solid #86efac;
    border-radius: var(--radius);
    padding: 1rem 1.125rem;
    margin-top: .75rem;
}
.resolution-panel label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: .5rem;
}
.resolution-panel textarea {
    width: 100%;
    min-height: 90px;
    padding: .5rem .75rem;
    border: 1px solid #86efac;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    resize: vertical;
    background: white;
}
.resolution-panel textarea:focus {
    outline: none;
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.resolution-panel-footer {
    display: flex;
    gap: .5rem;
    margin-top: .625rem;
    justify-content: flex-end;
}

/* ---- Communication panels (public + internal notes) -------- */
.comm-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: .75rem;
}
@media (max-width: 760px) {
    .comm-panels { grid-template-columns: 1fr; }
}
.comm-panel {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid;
}
.comm-panel-public {
    border-color: #93c5fd;
    background: #eff6ff;
}
.comm-panel-internal {
    border-color: #c4b5fd;
    background: #f5f3ff;
}
.comm-panel-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem .875rem;
    font-size: .8125rem;
    font-weight: 600;
}
.comm-panel-public .comm-panel-header {
    background: #dbeafe;
    color: #1e40af;
    border-bottom: 1px solid #93c5fd;
}
.comm-panel-internal .comm-panel-header {
    background: #ede9fe;
    color: #5b21b6;
    border-bottom: 1px solid #c4b5fd;
}
.comm-icon { font-size: 1rem; }
.comm-panel textarea {
    width: 100%;
    padding: .625rem .875rem;
    border: none;
    background: transparent;
    font-size: .875rem;
    resize: vertical;
    min-height: 78px;
    font-family: inherit;
}
.comm-panel textarea:focus { outline: none; }
.comm-panel-footer {
    padding: .5rem .875rem;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid;
}
.comm-panel-public .comm-panel-footer  { border-color: #93c5fd; }
.comm-panel-internal .comm-panel-footer { border-color: #c4b5fd; }
.comm-panel-header p { margin: 0; font-size: .75rem; font-weight: 400; opacity: .8; }

/* ---- Timeline update badges ------------------------------- */
.badge-public {
    display: inline-block;
    padding: .1em .55em;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
    vertical-align: middle;
}
.badge-internal {
    display: inline-block;
    padding: .1em .55em;
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 600;
    background: #ede9fe;
    color: #5b21b6;
    vertical-align: middle;
}

/* Internal notes get a subtle tint in the timeline */
.update-internal {
    background: #faf5ff;
    border-left: 3px solid #c4b5fd;
    padding-left: .875rem;
}
.btn-archive:hover { background: #92400e; }
