:root {
    --orange: #FE5F2F;
    --orange2: #FFA832;
    --cyan: #64CCC5;
    --dark: #1F2933;
    --light: #F4F7FA;
    --white: #FFFFFF;
    --green: #22c55e;
    --red: #ef4444;
    --gray: #64748b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--light);
    color: var(--dark);
}

a {
    color: var(--orange);
    text-decoration: none;
}

.container {
    max-width: 1180px;
    margin: auto;
    padding: 0 18px;
}

.py-4 {
    padding-top: 24px;
    padding-bottom: 24px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col {
    flex: 1;
    padding: 12px;
}

.col-2 {
    flex: 0 0 50%;
    padding: 12px;
}

.col-3 {
    flex: 0 0 33.333%;
    padding: 12px;
}

.col-4 {
    flex: 0 0 25%;
    padding: 12px;
}

.header-public {
    background: #fff;
    border-bottom: 1px solid #e8eef4;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--orange);
}

.logo.white {
    color: #fff;
}

.tag {
    font-size: 13px;
    color: #64748b;
}

.contact-head {
    display: flex;
    gap: 18px;
    align-items: center;
    color: #334155;
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    background: #e2e8f0;
    color: #111827;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange), var(--orange2));
    color: #fff;
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

.btn-success {
    background: var(--green);
    color: #fff;
}

.btn-sm {
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 13px;
}

.hero {
    min-height: 80vh;
    background:
        linear-gradient(120deg, rgba(31, 41, 51, 0.88), rgba(254, 95, 47, 0.62)),
        url("../img/hero_img.png");
    background-size: cover;
    background-position: center top;
    background-color: var(--dark);
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-placeholder {
    border: 2px dashed rgba(255, 255, 255, .5);
    border-radius: 22px;
    padding: 25px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.hero h1 {
    font-size: 52px;
    line-height: 1.05;
    margin: 0 0 16px;
}

.hero p {
    font-size: 22px;
}

.card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid #e9eef5;
}

.form-control,
.form-select {
    width: 100%;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    background: #fff;
}

.form-label {
    font-weight: 700;
    margin: 0 0 6px;
    display: block;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mt-3 {
    margin-top: 16px;
}

.text-muted {
    color: #64748b;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin: 10px 0;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.footer-public {
    background: var(--dark);
    color: #fff;
    padding: 38px 0;
    margin-top: 30px;
}

.whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: #25D366;
    color: white;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(0, 0, 0, .25);
    z-index: 20;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, var(--orange2), transparent 28%), linear-gradient(135deg, #fff, var(--light));
}

.login-card {
    width: min(440px, 92vw);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: #fff;
    padding: 14px 24px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 9;
}

.top-info {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
}

.top-info span,
.top-info a {
    background: #f1f5f9;
    padding: 8px 10px;
    border-radius: 999px;
    color: #334155;
}

.app-footer {
    text-align: center;
    padding: 22px;
    color: #64748b;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.module-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .06);
    transition: .2s;
    color: var(--dark);
}

.module-card:hover {
    transform: translateY(-3px);
    border-color: var(--orange);
}

.table-wrap {
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: middle;
}

.table th {
    background: #f8fafc;
    color: #334155;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-orange {
    background: #ffedd5;
    color: #9a3412;
}

.badge-cyan {
    background: #cffafe;
    color: #155e75;
}

.badge-gray {
    background: #e5e7eb;
    color: #374151;
}

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tab {
    padding: 10px 13px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.tab.active {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

.progress {
    height: 14px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 18px;
    width: min(1000px, 96vw);
    max-height: 90vh;
    overflow: auto;
    padding: 18px;
}

.iframe-doc {
    width: 100%;
    height: 70vh;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
}

.search {
    max-width: 360px;
    margin-bottom: 12px;
}

@media(max-width: 850px) {

    .header-wrap,
    .app-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero h1 {
        font-size: 36px;
    }

    .col-2,
    .col-3,
    .col-4 {
        flex: 0 0 100%;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .whatsapp {
        left: 12px;
        right: 12px;
        text-align: center;
        justify-content: center;
    }
}

@media(max-width: 950px) {
    #cloud-table {
        border-collapse: separate;
        border-spacing: 0 16px;
        background: transparent;
    }

    #cloud-table thead {
        display: none;
    }

    #cloud-table,
    #cloud-table tbody,
    #cloud-table tr,
    #cloud-table td {
        display: block;
        width: 100%;
    }

    #cloud-table tbody tr {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
        overflow: hidden;
        margin-bottom: 18px;
    }

    #cloud-table td {
        border-bottom: 1px solid #eef2f7;
        padding: 14px 16px;
    }

    #cloud-table td:last-child {
        border-bottom: 0;
    }

    #cloud-table td::before {
        display: block;
        font-size: 12px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #64748b;
        margin-bottom: 6px;
    }

    #cloud-table td:nth-child(1)::before {
        content: "N°";
    }

    #cloud-table td:nth-child(2)::before {
        content: "Categoría";
    }

    #cloud-table td:nth-child(3)::before {
        content: "Espacio documental";
    }

    #cloud-table td:nth-child(4)::before {
        content: "Estado";
    }

    #cloud-table td:nth-child(5)::before {
        content: "Observación administrador";
    }

    #cloud-table td:nth-child(6)::before {
        content: "Archivos";
    }

    #cloud-table td:nth-child(7)::before {
        content: "Acciones";
    }

    #cloud-table td:nth-child(3) strong {
        font-size: 18px;
        line-height: 1.3;
    }

    #cloud-table td:nth-child(6) .card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    #cloud-table td:nth-child(7) form {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 14px;
        padding: 12px;
        margin-bottom: 12px;
    }

    #cloud-table td:nth-child(7) .form-control,
    #cloud-table td:nth-child(7) .form-select {
        width: 100%;
        margin-bottom: 8px;
    }

    #cloud-table td:nth-child(7) .btn,
    #cloud-table td:nth-child(6) .btn {
        width: 100%;
        margin-bottom: 8px;
    }

    #cloud-table textarea {
        min-height: 90px;
    }
}