/*
 * Design System RCN
 * Componentes visuales reutilizables para la plataforma RCN.
 * No depende de frameworks adicionales; extiende Bootstrap 5.3.
 */
:root {
    --rcn-primary: #611232;
    --rcn-primary-dark: #4a0d25;
    --rcn-gold: #a57f2c;
    --rcn-green: #235b4e;
    --rcn-bg-soft: #f7f4f1;
    --rcn-border: #e7dde2;
    --rcn-text: #243746;
    --rcn-muted: #667085;
    --rcn-shadow: 0 14px 34px rgba(36, 55, 70, .10);
    --rcn-shadow-soft: 0 8px 24px rgba(36, 55, 70, .08);
}

.rcn-page {
    background: linear-gradient(180deg, #fbfaf8 0%, #ffffff 42%);
}

.rcn-shell {
    max-width: 1320px;
}

.rcn-hero {
    background: radial-gradient(circle at top right, rgba(165,127,44,.28), transparent 36%), linear-gradient(135deg, var(--rcn-primary) 0%, var(--rcn-primary-dark) 100%);
    border-radius: 24px;
    color: #fff;
    padding: 30px;
    box-shadow: 0 20px 48px rgba(97, 18, 50, .22);
    overflow: hidden;
    position: relative;
}

.rcn-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 38px solid rgba(255,255,255,.08);
}

.rcn-hero > * {
    position: relative;
    z-index: 1;
}

.rcn-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.rcn-panel,
.rcn-card,
.rcn-metric {
    border: 1px solid rgba(231,221,226,.92);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--rcn-shadow-soft);
}

.rcn-card,
.rcn-metric {
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.rcn-card:hover,
.rcn-metric:hover {
    transform: translateY(-3px);
    box-shadow: var(--rcn-shadow);
    border-color: rgba(97,18,50,.22);
}

.rcn-metric .card-body {
    padding: 24px;
}

.rcn-metric-label {
    color: var(--rcn-muted);
    font-size: .88rem;
    font-weight: 700;
    margin-bottom: .6rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.rcn-metric-value {
    color: var(--rcn-primary);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1;
}

.rcn-metric-note {
    color: var(--rcn-muted);
    margin-top: .75rem;
    margin-bottom: 0;
}

.rcn-section-title {
    color: var(--rcn-text);
    font-weight: 800;
    letter-spacing: -.02em;
}

.rcn-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
    padding: .42rem .72rem;
    font-size: .78rem;
    letter-spacing: .01em;
}

.rcn-status-borrador { background: #eef2f6; color: #344054; }
.rcn-status-enviada { background: #e8f1ff; color: #175cd3; }
.rcn-status-en_revision { background: #e7f7fb; color: #0e7090; }
.rcn-status-observaciones { background: #fff3cd; color: #946200; }
.rcn-status-aprobada { background: #dcfce7; color: #166534; }
.rcn-status-rechazada { background: #fee2e2; color: #991b1b; }

.rcn-progress {
    height: 10px;
    border-radius: 999px;
    background-color: #f0ecef;
}

.rcn-progress .progress-bar {
    background: linear-gradient(90deg, var(--rcn-primary), var(--rcn-gold));
    border-radius: 999px;
}

.rcn-quick-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 16px 18px;
    border: 1px solid var(--rcn-border);
    border-radius: 16px;
    background: #fff;
    color: var(--rcn-text);
    font-weight: 800;
    text-decoration: none;
    transition: all .2s ease;
}

.rcn-quick-action:hover,
.rcn-quick-action:focus {
    color: #fff;
    background: var(--rcn-primary);
    border-color: var(--rcn-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

.rcn-quick-action small {
    display: block;
    color: var(--rcn-muted);
    font-weight: 600;
}

.rcn-quick-action:hover small,
.rcn-quick-action:focus small {
    color: rgba(255,255,255,.82);
}

.rcn-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--rcn-border);
    background: #fff;
    color: var(--rcn-text);
    font-weight: 800;
    text-decoration: none;
}

.rcn-filter-chip:hover,
.rcn-filter-chip:focus,
.rcn-filter-chip.active {
    background: var(--rcn-primary);
    border-color: var(--rcn-primary);
    color: #fff;
    text-decoration: none;
}

.rcn-timeline {
    position: relative;
}

.rcn-timeline-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 18px;
    border-left: 2px solid #efe7eb;
}

.rcn-timeline-item:last-child {
    padding-bottom: 0;
}

.rcn-timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--rcn-primary);
    box-shadow: 0 0 0 4px #f6edf1;
}

.rcn-empty-state {
    border: 1px dashed var(--rcn-border);
    border-radius: 18px;
    background: #fffaf7;
    color: var(--rcn-muted);
    padding: 26px;
    text-align: center;
}

.rcn-table thead th {
    color: #475467;
    font-size: .78rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.rcn-table tbody td {
    vertical-align: middle;
}

.rcn-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f4e7ed;
    color: var(--rcn-primary);
    font-weight: 900;
}

.rcn-role-pill {
    display: inline-flex;
    align-items: center;
    padding: .32rem .65rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
}

.rcn-nav-user {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #fff;
    font-weight: 700;
    padding: .55rem .75rem;
}

@media (max-width: 767.98px) {
    .rcn-hero { padding: 24px; border-radius: 18px; }
    .rcn-metric .card-body { padding: 20px; }
}


/* Sprint 3: Centro de Administración */
.rcn-role-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
    padding: .36rem .68rem;
    font-size: .76rem;
    margin: .12rem;
}
.rcn-role-admin { background: #fce7f3; color: #9d174d; }
.rcn-role-juez { background: #e0f2fe; color: #075985; }
.rcn-role-postulante { background: #ecfdf3; color: #166534; }
.rcn-role-neutral { background: #eef2f6; color: #344054; }
.rcn-actions-menu .dropdown-menu {
    min-width: 220px;
    border-radius: 16px;
    border-color: var(--rcn-border);
    box-shadow: var(--rcn-shadow-soft);
}
.rcn-actions-menu .dropdown-item {
    border-radius: 10px;
    font-weight: 700;
    padding: .55rem .75rem;
}
.rcn-filter-chip span {
    display: inline-flex;
    min-width: 24px;
    min-height: 24px;
    padding: .1rem .45rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(36,55,70,.08);
    font-size: .75rem;
}
.rcn-filter-chip.active span,
.rcn-filter-chip:hover span,
.rcn-filter-chip:focus span {
    background: rgba(255,255,255,.2);
}
