:root {
    --gc-green: #253b12;
    --gc-green-2: #355218;
    --gc-green-3: #476b22;
    --gc-gold: #d5ab28;
    --gc-gold-light: #f0d66d;
    --cream: #faf8f0;
    --white: #ffffff;
    --text: #182015;
    --muted: #6e7569;
    --border: #e6e2d5;
    --danger: #b42318;
    --shadow: 0 12px 32px rgba(37, 59, 18, 0.09);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(213,171,40,.10), transparent 28%),
        linear-gradient(135deg, #f7f6ef 0%, #eef2e8 100%);
    color: var(--text);
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    width: 285px;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 22px 18px;
    overflow-y: auto;
    color: white;
    background:
        linear-gradient(180deg, rgba(255,255,255,.03), transparent 20%),
        linear-gradient(180deg, #18270c 0%, #263d13 52%, #1c2e0e 100%);
    border-right: 1px solid rgba(213,171,40,.30);
    box-shadow: 8px 0 30px rgba(18,35,9,.12);
}

.brand-box {
    text-align: center;
    padding: 10px 8px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 18px;
}

.brand-logo {
    width: 155px;
    max-height: 78px;
    object-fit: contain;
    margin-bottom: 8px;
}

.brand-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
}

.brand-subtitle {
    color: var(--gc-gold-light);
    font-size: 12px;
    margin-top: 4px;
}

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

.menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 14px;
    transition: .18s ease;
}

.menu a:hover,
.menu a.active {
    color: #fff;
    background: rgba(255,255,255,.10);
    box-shadow: inset 3px 0 0 var(--gc-gold);
    transform: translateX(2px);
}

.menu-icon {
    width: 22px;
    text-align: center;
    color: var(--gc-gold-light);
}

/* CONTENIDO */

.main {
    margin-left: 285px;
    width: calc(100% - 285px);
    padding: 30px 34px 50px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 24px;
}

.identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

.gc-emblem {
    width: 76px;
    height: 76px;
    object-fit: contain;
    padding: 7px;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(213,171,40,.42);
    box-shadow: var(--shadow);
}

.title-block h1 {
    margin: 0;
    font-size: 29px;
    color: var(--gc-green);
    letter-spacing: -.5px;
}

.title-block .academy-name {
    margin-top: 5px;
    font-size: 15px;
    color: var(--muted);
}

.title-block .academy-name strong {
    color: var(--gc-green-2);
}

.private-badge {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--gc-green);
    background: rgba(213,171,40,.17);
    border: 1px solid rgba(213,171,40,.42);
    font-size: 13px;
    font-weight: 600;
}

/* TARJETAS PRINCIPALES */

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.card {
    position: relative;
    overflow: hidden;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card::after {
    content: "";
    position: absolute;
    width: 85px;
    height: 85px;
    right: -25px;
    top: -25px;
    border-radius: 50%;
    background: rgba(213,171,40,.12);
}

.card .label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.card .value {
    margin-top: 8px;
    font-size: 31px;
    line-height: 1;
    font-weight: 800;
    color: var(--gc-green);
}

.card .detail {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-accent {
    border-top: 4px solid var(--gc-gold);
}

/* SECCIONES */

.section-grid {
    display: grid;
    grid-template-columns: 1.35fr .85fr;
    gap: 22px;
    margin-top: 22px;
}

.section {
    background: rgba(255,255,255,.96);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.section h2 {
    margin: 0;
    font-size: 19px;
    color: var(--gc-green);
}

.section-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

/* ACCESOS RÁPIDOS */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 13px;
}

.quick-action {
    min-height: 105px;
    padding: 16px;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text);
    background:
        linear-gradient(145deg, #fff 0%, #fbfaf4 100%);
    border: 1px solid var(--border);
    transition: .18s ease;
}

.quick-action:hover {
    transform: translateY(-3px);
    border-color: rgba(213,171,40,.60);
    box-shadow: 0 10px 25px rgba(37,59,18,.10);
}

.quick-action .qa-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    margin-bottom: 12px;
    background: rgba(53,82,24,.10);
    color: var(--gc-green-2);
    font-size: 19px;
}

.quick-action strong {
    display: block;
    font-size: 14px;
}

.quick-action span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

/* AGENDA */

.agenda-list,
.alert-list {
    display: grid;
    gap: 11px;
}

.agenda-item,
.alert-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: 13px;
    background: #fafaf6;
    border: 1px solid #ebe8dc;
}

.agenda-date {
    min-width: 52px;
    text-align: center;
    padding: 8px 5px;
    border-radius: 10px;
    background: var(--gc-green);
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.agenda-text strong,
.alert-text strong {
    display: block;
    color: var(--gc-green);
    font-size: 14px;
}

.agenda-text span,
.alert-text span {
    display: block;
    color: var(--muted);
    margin-top: 3px;
    font-size: 12px;
}

/* ALERTAS */

.alert-dot {
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--gc-gold);
    flex: 0 0 auto;
}

.alert-dot.danger {
    background: var(--danger);
}

/* BOTONES */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.btn-primary {
    color: white;
    background: var(--gc-green-2);
    border: 1px solid var(--gc-green-2);
}

.btn-primary:hover {
    background: var(--gc-green-3);
}

.btn-gold {
    color: #2b250f;
    background: var(--gc-gold-light);
    border: 1px solid var(--gc-gold);
}

/* PIE */

.footer-note {
    margin-top: 28px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 850px) {
    .sidebar {
        position: static;
        width: 100%;
    }

    .layout {
        display: block;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

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

    .cards,
    .quick-actions {
        grid-template-columns: 1fr;
    }

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

/* =========================================================
   AGC · ADAPTACION RESPONSIVE MULTIDISPOSITIVO
   PC · TABLET · MOVIL
   ========================================================= */

@media (max-width: 1100px) {
    .main {
        padding: 26px 24px 42px;
    }

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

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

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .layout {
        display: block;
        min-height: 100vh;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 1000;
        width: 100%;
        height: auto;
        padding: 10px 12px 12px;
        overflow: hidden;
        border-right: 0;
        border-bottom: 1px solid rgba(213,171,40,.35);
        box-shadow: 0 8px 24px rgba(18,35,9,.14);
    }

    .brand-box {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        text-align: left;
        padding: 4px 4px 9px;
        margin-bottom: 8px;
    }

    .brand-logo {
        width: 92px;
        height: 46px;
        margin: 0;
        flex: 0 0 auto;
    }

    .brand-title {
        font-size: 14px;
        line-height: 1.15;
    }

    .brand-subtitle {
        font-size: 11px;
        margin-top: 2px;
    }

    .menu {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 1px 5px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .menu a {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 12px;
        font-size: 13px;
        scroll-snap-align: start;
    }

    .menu a:hover,
    .menu a.active {
        transform: none;
        box-shadow: inset 0 -3px 0 var(--gc-gold);
    }

    .menu-icon {
        width: auto;
        min-width: 18px;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 20px 18px 38px;
    }

    .topbar {
        gap: 14px;
        margin-bottom: 20px;
    }

    .identity {
        min-width: 0;
    }

    .gc-emblem {
        width: 64px;
        height: 64px;
        flex: 0 0 auto;
    }

    .title-block {
        min-width: 0;
    }

    .title-block h1 {
        font-size: 25px;
        line-height: 1.15;
    }

    .title-block .academy-name {
        font-size: 13px;
        line-height: 1.35;
    }

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

    .card {
        padding: 17px;
    }

    .card .value {
        font-size: 28px;
    }

    .section,
    .section-grid {
        min-width: 0;
    }

    .section {
        padding: 18px;
    }

    .section-header {
        align-items: flex-start;
    }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    table {
        min-width: 720px;
    }

    th,
    td {
        white-space: nowrap;
    }
}

@media (max-width: 600px) {
    .sidebar {
        padding: 8px 9px 10px;
    }

    .brand-box {
        justify-content: flex-start;
        gap: 9px;
        padding-bottom: 7px;
    }

    .brand-logo {
        width: 74px;
        height: 38px;
    }

    .brand-title {
        font-size: 13px;
    }

    .brand-subtitle {
        font-size: 10px;
    }

    .menu a {
        padding: 9px 10px;
        font-size: 12px;
        border-radius: 9px;
    }

    .main {
        padding: 16px 12px 30px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .identity {
        align-items: center;
        gap: 11px;
    }

    .gc-emblem {
        width: 54px;
        height: 54px;
        padding: 5px;
        border-radius: 13px;
    }

    .title-block h1 {
        font-size: 22px;
        letter-spacing: -.25px;
    }

    .title-block .academy-name {
        font-size: 12px;
    }

    .private-badge {
        align-self: flex-start;
        padding: 7px 11px;
        font-size: 12px;
    }

    .cards,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .cards {
        gap: 11px;
        margin-bottom: 18px;
    }

    .card {
        padding: 16px;
        border-radius: 15px;
    }

    .card .value {
        font-size: 27px;
    }

    .section-grid {
        gap: 15px;
        margin-top: 15px;
    }

    .section {
        padding: 15px;
        border-radius: 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 14px;
    }

    .section h2 {
        font-size: 17px;
    }

    .quick-action {
        min-height: auto;
        padding: 14px;
    }

    .agenda-item,
    .alert-item {
        padding: 11px;
    }

    .btn {
        min-height: 42px;
        padding: 10px 13px;
    }

    .footer-note {
        margin-top: 20px;
        padding: 0 8px;
        line-height: 1.4;
    }

    table {
        min-width: 680px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .main {
        padding-left: 9px;
        padding-right: 9px;
    }

    .title-block h1 {
        font-size: 20px;
    }

    .gc-emblem {
        width: 48px;
        height: 48px;
    }
}
