:root{
    --azul:#002b66;
    --azul-2:#0f4c81;
    --naranja:#f7941d;
    --gris:#f4f6f8;
    --texto:#263238;
    --borde:#d9dee5;
}

body{
    margin:0;
    font-family:Arial, sans-serif;
    color:var(--texto);
    background:var(--gris);
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    background:
        linear-gradient(rgba(255,255,255,.50), rgba(255,255,255,.50)),
        url("../img/fondo_tecnofix.jpg") center center / cover no-repeat;
    z-index:-1;
}

.card{
    background:white;
    border-radius:14px;
    padding:22px;
    margin-bottom:18px;
    box-shadow:0 6px 18px rgba(0,0,0,.08);
    border:1px solid rgba(0,43,102,.08);
}

h1,h2,h3{
    color:var(--azul);
}

.btn{
    display:inline-block;
    background:var(--azul);
    color:white;
    padding:9px 14px;
    border-radius:8px;
    text-decoration:none;
    border:0;
    cursor:pointer;
    margin:3px;
}

.btn:hover{
    background:var(--azul-2);
}

.btn-orange{
    background:var(--naranja);
}

.tabla{
    width:100%;
    border-collapse:collapse;
    background:white;
}

.tabla th{
    background:var(--azul);
    color:white;
    padding:10px;
    text-align:left;
}

.tabla td{
    padding:10px;
    border-bottom:1px solid var(--borde);
}

.tabla tr:hover{
    background:#f8fafc;
}

.stat{
    background:white;
    border-radius:14px;
    padding:20px;
    box-shadow:0 6px 18px rgba(0,0,0,.08);
    border-left:5px solid var(--naranja);
}

.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
}

.app-shell{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:260px;
    background:linear-gradient(180deg,#002b66,#001b40);
    color:white;
    padding:22px 16px;
    position:fixed;
    top:0;
    left:0;
    height:100vh;
    max-height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
    box-sizing:border-box;
}

.sidebar-logo{
    text-align:center;
    margin-bottom:14px;
}

.sidebar-logo img{
    max-width:155px;
}

.sidebar a{
    display:block;
    color:white;
    text-decoration:none;
    padding:9px 12px;
    border-radius:10px;
    margin-bottom:4px;
    font-size:15px;
    font-weight:500;
}

.sidebar a:hover{
    background:rgba(255,255,255,.12);
}

.sidebar-section{
    margin:24px 16px 12px;
    font-size:17px;
    font-weight:800;
    color:#ffffff;
    text-transform:uppercase;
    border-top:1px solid rgba(255,255,255,.20);
    padding-top:16px;
    letter-spacing:1px;
}

.main-area{
    margin-left:260px;
    width:calc(100% - 260px);
}

.topbar{
    height:64px;
    background:white;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 28px;
    box-shadow:0 4px 14px rgba(0,0,0,.06);
    position:sticky;
    top:0;
    z-index:10;
}

.content{
    padding:28px;
}

.user-badge{
    color:#002b66;
    font-weight:bold;
}

.activity-timeline {
    margin-top: 20px;
    position: relative;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 0 0 20px 0;
    position: relative;
}

.activity-item:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 42px;
    left: 20px;
    bottom: 0;
    width: 2px;
    background: #d9e1ea;
}

.activity-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #edf2f7;
    position: relative;
    z-index: 1;
}

.activity-content {
    flex: 1;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.activity-date {
    font-size: 12px;
    color: #687386;
    white-space: nowrap;
}

.activity-description {
    margin: 8px 0;
    color: #333;
}

.activity-user {
    color: #687386;
}

.activity-info {
    background: #dceeff;
}

.activity-warning {
    background: #fff0c2;
}

.activity-primary {
    background: #d9e4ff;
}

.activity-success {
    background: #d9f2df;
}

.activity-danger {
    background: #ffdede;
}

@media (max-width: 700px) {
    .activity-header {
        display: block;
    }

    .activity-date {
        display: block;
        margin-top: 4px;
    }

    .activity-item {
        gap: 10px;
    }

    .activity-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .activity-item:not(:last-child)::before {
        left: 17px;
        top: 36px;
    }
}

.detail-section {
    margin-top: 1.25rem;
}

.detail-section p {
    margin-top: 0.4rem;
    margin-bottom: 0;
}

.diagnostico-hallazgo {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dcdfe4;
    border-radius: 8px;
}

.diagnostico-hallazgo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.diagnostico-hallazgo-header h3 {
    margin: 0;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(220px, 1fr)
    );
    gap: 1rem;
}

.evidence-card {
    padding: 1rem;
    border: 1px solid #dcdfe4;
    border-radius: 8px;
}
.evidencias-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(260px, 1fr)
    );
    gap: 18px;
}

.evidencia-card {
    overflow: hidden;
}

.evidencia-card h3 {
    margin-top: 14px;
    margin-bottom: 6px;
}

.evidencia-card form {
    margin-top: 16px;
}