/*
 * DCRA-BOARD · MASTER UI 2026
 * Sistema visual común para todas las páginas públicas.
 */

:root {
    --nav: #310707;
    --nav2: #170303;
    --red: #a90e10;
    --red2: #c51a1d;
    --red-dark: #720506;
    --gold: #d9a90e;
    --gold-light: #f0c62e;
    --text: #071a39;
    --muted: #536176;
    --line: #d9e1eb;
    --soft: #f4f7fa;
    --card: #ffffff;
    --blue-card: #f7faff;
    --shadow: 0 8px 22px rgba(7, 26, 57, .06);
    --sidebar: 280px;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0 !important;
    color: var(--text) !important;
    background: var(--soft) !important;
    font-family:  Arial, Helvetica, sans-serif !important;
    font-size: 18px;
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app {
    display: flex !important;
    min-height: 100vh;
    background: var(--soft);
}

/* SIDEBAR */
.side {
    position: fixed !important;
    inset: 0 auto 0 0;
    z-index: 50;
    width: var(--sidebar) !important;
    height: 100vh;
    padding: 22px 13px 18px !important;
    overflow-x: hidden;
    overflow-y: auto;
    color: #fff;
    background:
        radial-gradient(circle at 20% 12%, rgba(185, 24, 25, .20), transparent 30%),
        linear-gradient(180deg, var(--nav), var(--nav2)) !important;
    border-right: 1px solid rgba(255, 255, 255, .08);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
}

[dir="rtl"] .side {
    inset: 0 0 0 auto;
    border-right: 0;
    border-left: 1px solid rgba(255, 255, 255, .08);
}

.logo {
    display: flex !important;
    align-items: center;
    gap: 12px !important;
    min-height: 66px;
    margin: 0 8px 24px !important;
}

.logo img,
.logo-img {
    flex: 0 0 auto;
    width: 52px !important;
    height: 60px !important;
    padding: 3px !important;
    object-fit: contain !important;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 11px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .20);
}

.logo .mark {
    flex: 0 0 auto;
    width: 52px !important;
    height: 60px !important;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--red2), var(--red-dark)) !important;
    border: 3px solid #fff;
    border-radius: 11px !important;
}

.brand {
    min-width: 0;
}

.brand b {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: 23px !important;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.35px;
}

.brand span {
    display: block;
    max-width: 165px;
    color: rgba(255, 255, 255, .88) !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
}

.menu {
    display: grid;
    gap: 3px;
}

.menu a {
    position: relative;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 0 !important;
    padding: 10px 12px !important;
    overflow: hidden;
    color: rgba(255, 255, 255, .94) !important;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px !important;
    font-size: 20px !important;
    font-weight: 350 !important;
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}

.menu a::before {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    color: #fff;
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
}

.menu a:nth-child(1)::before { content: "⌂"; font-size: 24px; }
.menu a:nth-child(2)::before { content: "♧"; }
.menu a:nth-child(3)::before { content: "♙"; }
.menu a:nth-child(4)::before { content: "▤"; }
.menu a:nth-child(5)::before { content: "⚭"; }
.menu a:nth-child(6)::before { content: "◫"; }
.menu a:nth-child(7)::before { content: "◎"; }
.menu a:nth-child(8)::before { content: "?"; border: 1.5px solid #fff; border-radius: 50%; font-size: 13px; }
.menu a:nth-child(9)::before { content: "↗"; font-size: 23px; }

.menu a > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu a > span:last-child {
    justify-self: end;
    font-size: 22px;
    font-weight: 400;
}

.menu a:hover,
.menu a.active {
    color: #fff !important;
    background: linear-gradient(100deg, #be1719, #9e0a0d) !important;
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
    transform: translateX(2px);
}

[dir="rtl"] .menu a:hover,
[dir="rtl"] .menu a.active {
    transform: translateX(-2px);
}

.note,
.sidebox {
    margin: 28px 8px 0 !important;
    padding: 17px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, .04) !important;
    border: 1px solid rgba(255, 255, 255, .25) !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.65 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.note > div:first-child,
.sidebox > b:first-child {
    margin: 0 0 12px !important;
    padding: 0 !important;
    color: var(--gold-light) !important;
    background: transparent !important;
    border: 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-align: left !important;
}

.note a,
.sidebox a,
.btn-register {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 20px !important;
    color: #1b1500 !important;
    background: linear-gradient(180deg, var(--gold-light), var(--gold)) !important;
    border: 1px solid #c69709 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
}

/* MAIN SHELL */
.main {
    width: calc(100% - var(--sidebar)) !important;
    min-width: 0;
    margin-left: var(--sidebar) !important;
    background: var(--soft);
}

[dir="rtl"] .main {
    margin-right: var(--sidebar) !important;
    margin-left: 0 !important;
}

.top {
    position: sticky !important;
    top: 0;
    z-index: 40 !important;
    display: flex !important;
    align-items: center;
    gap: 12px !important;
    width: 100%;
    min-height: 80px !important;
    height: auto !important;
    padding: 14px 32px !important;
    background: rgba(255, 255, 255, .98) !important;
    border-bottom: 1px solid var(--line) !important;
    box-shadow: 0 3px 12px rgba(7, 26, 57, .04);
    backdrop-filter: blur(8px);
}

.search {
    position: relative;
    flex: 1 1 520px !important;
    max-width: 690px !important;
}

.search::after {
    content: "⌕";
    position: absolute;
    top: 50%;
    right: 16px;
    color: var(--text);
    font-size: 27px;
    line-height: 1;
    transform: translateY(-54%);
    pointer-events: none;
}

[dir="rtl"] .search::after {
    right: auto;
    left: 16px;
}

.search input {
    width: 100% !important;
    height: 48px !important;
    padding: 0 50px 0 17px !important;
    color: var(--text) !important;
    background: #fff !important;
    border: 1px solid #cdd8e6 !important;
    border-radius: 9px !important;
    outline: none;
    font-size: 14px !important;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.search input:focus {
    border-color: #a9bcd1 !important;
    box-shadow: 0 0 0 3px rgba(20, 63, 105, .08);
}

.lang {
    display: flex !important;
    gap: 7px !important;
    margin-left: 8px;
    flex-wrap: nowrap !important;
}

.lang a {
    display: grid !important;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 9px !important;
    color: var(--text) !important;
    background: #fff !important;
    border: 1px solid #d5dfe9 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.lang a.on {
    color: #fff !important;
    background: linear-gradient(180deg, #ba1417, #960a0c) !important;
    border-color: #a60c0f !important;
}

.auth {
    display: flex !important;
    gap: 10px !important;
    margin-left: auto !important;
}

.btn,
.back,
button.btn {
    min-height: 44px;
    padding: 10px 20px !important;
    color: var(--text) !important;
    background: #fff !important;
    border: 1px solid #cbd7e4 !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 8px rgba(7, 26, 57, .03);
}

.btn.primary,
.btn.send,
.back {
    color: #fff !important;
    background: linear-gradient(100deg, #be1719, #98090c) !important;
    border-color: #a60c0f !important;
}

.btn.clear {
    color: var(--red) !important;
    background: #fff4f3 !important;
    border-color: #efc8c5 !important;
}

.user {
    color: var(--muted) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* HERO */
.hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 330px !important;
    padding: 48px clamp(32px, 4vw, 74px) !important;
    overflow: hidden;
    color: #fff !important;
    background:
        linear-gradient(90deg, rgba(3, 17, 32, .97) 0%, rgba(3, 17, 32, .88) 44%, rgba(3, 17, 32, .33) 77%, rgba(3, 17, 32, .08) 100%),
        url("dc-fondo.png") center 47% / cover no-repeat !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .22));
    pointer-events: none;
}

.hero h1 {
    max-width: 900px;
    margin: 0 0 12px !important;
    color: #fff !important;
    font-size: clamp(39px, 4.1vw, 64px) !important;
    font-weight: 850 !important;
    line-height: 1.02 !important;
    letter-spacing: -1.5px !important;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .30);
}

.hero h2 {
    max-width: 850px;
    margin: 0 0 16px !important;
    color: var(--gold-light) !important;
    font-size: clamp(19px, 2vw, 28px) !important;
    font-weight: 800 !important;
    line-height: 1.2;
}

.hero p {
    max-width: 900px !important;
    margin: 4px 0 !important;
    color: rgba(255, 255, 255, .96) !important;
    font-size: 16px !important;
    line-height: 1.52 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .24);
}

.hero p:first-of-type::after {
    content: "";
    display: block;
    width: 74px;
    height: 3px;
    margin-top: 18px;
    background: var(--gold);
    border-radius: 2px;
}

.hero-actions {
    display: flex !important;
    gap: 12px !important;
    margin-top: 24px !important;
    flex-wrap: wrap;
}

.hero-actions .btn {
    min-width: 150px;
}

/* CONTENT AND CARDS */
.content {
    width: 100%;
    padding: 28px clamp(24px, 3vw, 48px) 36px !important;
    background:
        radial-gradient(circle at 88% 3%, rgba(224, 232, 241, .55), transparent 28%),
        var(--soft);
}

.cards3 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    margin: -12px 0 20px !important;
    position: relative;
    z-index: 2;
}

.box,
.card,
.panel,
.group {
    color: var(--text) !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
}

.box {
    min-height: 122px;
    padding: 20px 22px !important;
}

.box h3,
.card h3,
.panel h2,
.panel h3 {
    margin: 0 0 9px !important;
    color: var(--text) !important;
    font-size: 19px !important;
    line-height: 1.2;
}

.box p,
.card p,
.panel p {
    margin: 0 !important;
    color: #1d3150 !important;
    font-size: 14px;
    line-height: 1.5 !important;
}

.section,
.public,
.private {
    margin: 18px 0 0 !important;
    padding: 22px !important;
    color: var(--text);
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-left: 5px solid var(--gold) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
}

.section h2,
.public h2,
.private h2 {
    margin: 0 0 8px !important;
    color: var(--text) !important;
    font-size: 25px !important;
    line-height: 1.2;
}

.section > p,
.public > p,
.private > p {
    margin: 0 0 18px !important;
    color: #253957 !important;
}

.panelgrid,
.grid,
.type-grid,
.case-list,
.reason-panels,
.groupgrid {
    display: grid !important;
    gap: 13px !important;
}

.panelgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.mini,
.type-card,
.case,
.reason-card {
    position: relative;
    min-height: 165px !important;
    padding: 16px !important;
    color: var(--text) !important;
    background: var(--blue-card) !important;
    border: 1px solid #ccd9e8 !important;
    border-radius: var(--radius) !important;
    box-shadow: none !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mini:hover,
.type-card:hover,
.case:hover,
.reason-card:hover {
    z-index: 2;
    border-color: #b9cadd !important;
    box-shadow: 0 12px 24px rgba(7, 26, 57, .09) !important;
    transform: translateY(-2px);
}

.mini b,
.type-card h3,
.case h3,
.reason-card b {
    color: var(--text) !important;
    font-weight: 800 !important;
}

.mini p,
.type-card p,
.case p,
.reason-card p {
    color: #274263 !important;
}

.mini a,
.open,
.tag,
.names .tag {
    color: var(--red) !important;
    background: #fff0ef !important;
    border: 0 !important;
    border-radius: 18px !important;
    font-weight: 800 !important;
}

.svgico {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    vertical-align: middle;
    color: #fff !important;
    background: linear-gradient(145deg, #9e0b0d, #680405) !important;
    border: 1px solid rgba(80, 0, 0, .25) !important;
    border-radius: 11px !important;
    box-shadow: 0 5px 13px rgba(83, 0, 0, .18) !important;
}

.svgico svg {
    display: block !important;
    width: 68% !important;
    height: 68% !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.layout {
    display: grid !important;
    grid-template-columns: 260px minmax(0, 1fr) !important;
    gap: 20px !important;
}

.toc {
    position: sticky !important;
    top: 102px !important;
    align-self: start;
    padding: 16px !important;
    background: #fff !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow);
}

.toc h3 {
    margin: 0 0 10px !important;
    color: var(--text);
}

.toc a {
    min-height: 43px;
    color: #203755 !important;
    border-radius: 8px !important;
}

.toc a:hover {
    color: var(--red) !important;
    background: #fff1f0 !important;
}

.formgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px !important;
}

.auth-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    color: var(--text) !important;
    font-size: 13px;
    font-weight: 800 !important;
}

.inputwrap,
.field > input,
.field > select,
.field > textarea {
    color: var(--text) !important;
    background: #f9fbfd !important;
    border: 1px solid #ccd8e6 !important;
    border-radius: 9px !important;
}

.inputwrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

.inputwrap input {
    width: 100%;
    min-height: 48px;
    padding: 12px 4px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.inputwrap .svgico {
    flex: 0 0 auto;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.inputwrap:focus-within {
    border-color: #aebfd2 !important;
    box-shadow: 0 0 0 3px rgba(13, 55, 95, .07);
}

.hint {
    color: var(--muted) !important;
    font-size: 13px;
    font-weight: 700;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.msg {
    margin: 0 0 18px;
    padding: 13px 15px;
    border: 1px solid;
    border-radius: 9px;
    font-weight: 750;
}

.msg.ok {
    color: #0b6420;
    background: #effbf1;
    border-color: #a8d9b2;
}

.msg.err {
    color: #8d100d;
    background: #fff1f0;
    border-color: #efb9b4;
}

.footer {
    margin: 0 !important;
    padding: 22px clamp(24px, 3vw, 48px) !important;
    color: rgba(255, 255, 255, .92) !important;
    background: linear-gradient(100deg, #760506, #a70d10) !important;
    border-top: 3px solid var(--gold) !important;
    font-size: 12px !important;
}

/* TABLET */
@media (max-width: 1250px) {
    :root {
        --sidebar: 250px;
    }

    .brand b {
        font-size: 20px !important;
    }

    .cards3 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .panelgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .lang {
        display: none !important;
    }
}

/* MOBILE */
@media (max-width: 850px) {
    :root {
        --sidebar: 100%;
    }

    .app {
        display: block !important;
    }

    .side {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        max-height: none;
        padding: 14px !important;
    }

    [dir="rtl"] .side {
        position: relative !important;
    }

    .logo {
        margin-bottom: 12px !important;
    }

    .menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .menu a {
        min-height: 43px;
    }

    .note,
    .sidebox {
        display: none;
    }

    .main,
    [dir="rtl"] .main {
        width: 100% !important;
        margin: 0 !important;
    }

    .top {
        position: relative !important;
        padding: 12px 16px !important;
        flex-wrap: wrap;
    }

    .search {
        flex: 1 1 100% !important;
        max-width: none !important;
    }

    .auth {
        margin-left: 0 !important;
    }

    .hero {
        min-height: 300px !important;
        padding: 38px 22px !important;
        background-position: 62% center !important;
    }

    .hero h1 {
        font-size: clamp(34px, 10vw, 46px) !important;
    }

    .content {
        padding: 22px 16px 30px !important;
    }

    .cards3,
    .panelgrid,
    .grid,
    .type-grid,
    .case-list,
    .reason-panels,
    .groupgrid,
    .formgrid,
    .layout {
        grid-template-columns: 1fr !important;
    }

    .cards3 {
        margin-top: 0 !important;
    }

    .toc {
        position: relative !important;
        top: auto !important;
    }
}

@media (max-width: 520px) {
    .menu {
        grid-template-columns: 1fr;
    }

    .logo img,
    .logo-img,
    .logo .mark {
        width: 48px !important;
        height: 54px !important;
    }

    .brand b {
        font-size: 20px !important;
    }

    .hero h1 {
        letter-spacing: -.7px !important;
    }

    .btn,
    .back,
    button.btn {
        padding: 9px 14px !important;
    }
}
