/*
Theme Name: Opos Minimal
Theme URI: https://localhost
Author: Oposiciones Core
Description: Tema minimo para la interfaz de estudio de Oposiciones Core.
Version: 0.1.0
Requires at least: 6.0
*/

:root {
    --opos-blue: #00558c;
    --opos-border: #d8d8d8;
    --opos-text: #111;
    --opos-muted: #555;
    --opos-bg: #f6f7f8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--opos-bg);
    color: var(--opos-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

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

a:hover {
    text-decoration: underline;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--opos-border);
    background: #fff;
    padding: 8px 18px;
}

.site-title {
    color: var(--opos-text);
    font-size: 24px;
    font-weight: 700;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    justify-content: flex-end;
}

.site-main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto 16px !important;
    padding: 8px 12px 0;
}

.page-title {
    color: var(--opos-blue);
    font-size: 26px;
    margin: 0 0 12px;
}

main,
.site-main,
.page-content {
    margin-top: 0 !important;
}

.page-content {
    padding-top: 0 !important;
}

.page-content > :first-child {
    margin-top: 0;
}

.site-footer {
    display: none;
}

body.page-template-default .page-title {
    display: none;
}

.opos-home {
    color: #14211c;
    margin: 16px auto 28px;
    max-width: 1160px;
    padding: 0 10px;
}

.opos-home__hero {
    background:
        radial-gradient(circle at 82% 12%, rgba(128, 255, 194, 0.24), transparent 28%),
        linear-gradient(135deg, #11231d 0%, #11364a 54%, #101917 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #f6fbf7;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    margin-bottom: 14px;
    overflow: hidden;
    padding: 24px;
    position: relative;
}

.opos-home__hero h1 {
    color: #f6fbf7;
    font-size: 38px;
    line-height: 1.05;
    margin: 0 0 8px;
    max-width: 720px;
}

.opos-home__hero p {
    color: #d8e8df;
    font-size: 17px;
    margin: 0;
    max-width: 680px;
}

.opos-home__kicker {
    color: #89ffc8;
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.4px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.opos-home__status {
    align-self: stretch;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f7faf8;
    display: grid;
    gap: 12px;
    min-width: 190px;
    padding: 16px;
}

.opos-home__status span {
    color: #8ce0b2;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.opos-home__status strong {
    font-size: 25px;
}

.opos-opposition-picker {
    display: grid;
    gap: 8px;
}

.opos-opposition-picker label {
    color: #cfe4d7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.opos-opposition-picker div {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.opos-opposition-picker select,
.opos-opposition-picker button {
    border-radius: 7px;
    font: inherit;
    min-height: 40px;
}

.opos-opposition-picker select {
    background: #f7fbf8;
    border: 1px solid rgba(255, 255, 255, 0.36);
    color: #14211c;
    padding: 8px 10px;
}

.opos-opposition-picker button {
    background: #89ffc8;
    border: 0;
    color: #102018;
    cursor: pointer;
    font-weight: 800;
    padding: 8px 12px;
}

.opos-home__layout {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 330px;
}

.opos-dashboard {
    background: #fff;
    border: 1px solid var(--opos-border);
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 16px;
}

.opos-dashboard__head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.opos-dashboard__head span {
    color: #006747;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.opos-dashboard__head h2 {
    color: #17201c;
    font-size: 22px;
    margin: 2px 0 0;
}

.opos-dashboard__head small {
    color: #59645f;
}

.opos-dashboard__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opos-dashboard__period {
    background: #f7faf8;
    border: 1px solid #e2e8e5;
    border-radius: 7px;
    padding: 14px;
}

.opos-dashboard__period h3 {
    font-size: 16px;
    margin: 0 0 12px;
}

.opos-dashboard__metrics {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.opos-dashboard__metrics div {
    display: grid;
    gap: 2px;
}

.opos-dashboard__metrics strong {
    color: #17201c;
    font-size: 26px;
}

.opos-dashboard__metrics span,
.opos-dashboard__period footer {
    color: #59645f;
    font-size: 13px;
}

.opos-dashboard__bars {
    background: #dfe8e3;
    border-radius: 999px;
    display: flex;
    height: 10px;
    margin: 14px 0 10px;
    overflow: hidden;
}

.opos-dashboard__bars span {
    display: block;
    min-width: 0;
}

.opos-dashboard__bars .is-correct {
    background: #006747;
}

.opos-dashboard__bars .is-wrong {
    background: #b24536;
}

.opos-dashboard__period footer {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.opos-home__primary,
.opos-home__panel {
    background: #fff;
    border: 1px solid var(--opos-border);
    border-radius: 8px;
}

.opos-home__primary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
}

.opos-home__action {
    border: 1px solid #dce2e4;
    border-radius: 7px;
    color: #17201c;
    display: grid;
    gap: 8px;
    min-height: 142px;
    padding: 16px;
    text-decoration: none;
}

.opos-home__action:hover {
    border-color: var(--opos-blue);
    box-shadow: 0 10px 28px rgba(0, 85, 140, 0.08);
    text-decoration: none;
}

.opos-home__action strong {
    color: var(--opos-blue);
    font-size: 22px;
}

.opos-home__action span {
    color: #4e5a55;
}

.opos-home__action em {
    align-self: end;
    color: #006747;
    font-style: normal;
    font-weight: 700;
}

.opos-home__action--main {
    background: linear-gradient(135deg, #00558c, #006747);
    color: #fff;
    grid-row: span 2;
    min-height: 296px;
}

.opos-home__action--main strong,
.opos-home__action--main span,
.opos-home__action--main em {
    color: #fff;
}

.opos-home__panel {
    padding: 16px;
}

.opos-home__panel h2 {
    color: #17201c;
    font-size: 20px;
    margin: 0 0 12px;
}

.opos-home__list {
    display: grid;
    gap: 10px;
}

.opos-home__mini {
    border-bottom: 1px solid #edf0f1;
    color: #17201c;
    display: grid;
    gap: 3px;
    padding: 0 0 10px;
    text-decoration: none;
}

.opos-home__mini:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.opos-home__mini:hover {
    text-decoration: none;
}

.opos-home__mini strong {
    color: var(--opos-blue);
}

.opos-home__mini span {
    color: #59645f;
}

.opos-home__break {
    background:
        linear-gradient(135deg, rgba(128, 255, 194, 0.12), transparent),
        #17201c;
    border-radius: 8px;
    color: #f7faf8;
    display: grid;
    gap: 8px;
    margin-top: 14px;
    padding: 16px;
    text-decoration: none;
}

.opos-home__break:hover {
    background: #223029;
    text-decoration: none;
}

.opos-home__break strong {
    color: #8ce0b2;
    font-size: 18px;
}

.opos-home__break span {
    color: #e5ece8;
}

@media (max-width: 720px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 16px;
    }

    .site-nav {
        flex-wrap: wrap;
        gap: 12px;
    }

    .site-main {
        margin-top: 8px;
        padding: 0 10px;
    }
}

@media (max-width: 900px) {
    .opos-home__hero,
    .opos-home__layout {
        grid-template-columns: 1fr;
    }

    .opos-home__primary {
        grid-template-columns: 1fr;
    }

    .opos-dashboard__grid {
        grid-template-columns: 1fr;
    }

    .opos-home__status {
        min-width: 0;
    }

    .opos-opposition-picker div {
        grid-template-columns: 1fr;
    }
}

body {
    background:
        radial-gradient(circle at 8% 0%, rgba(0, 109, 119, 0.16), transparent 28%),
        radial-gradient(circle at 92% 4%, rgba(255, 209, 102, 0.22), transparent 24%),
        #edf3f6;
    color: #121826;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
    min-height: 62px;
}

.site-title {
    color: #0f172a;
    font-size: 24px;
    letter-spacing: 0;
}

.site-nav a {
    color: #00558c;
    font-weight: 650;
}

.site-main {
    max-width: 1500px;
    padding: 18px;
}

body.home .site-header {
    display: none;
}

body.home .site-main {
    margin-bottom: 0 !important;
    padding: 24px;
}

body.home .opos-home {
    min-height: calc(100vh - 48px);
}

.opos-home {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 0;
    margin: 0 auto 28px;
    max-width: 1420px;
    min-height: calc(100vh - 98px);
    overflow: hidden;
    padding: 0;
}

.opos-home__sidebar {
    background: #ffffff;
    border-right: 1px solid #e6edf2;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px 22px;
}

.opos-home__brand {
    display: grid;
    gap: 2px;
    margin-bottom: 18px;
}

.opos-home__brand strong {
    color: #00558c;
    font-size: 25px;
}

.opos-home__brand span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.opos-home__menu {
    display: grid;
    gap: 8px;
}

.opos-home__menu a {
    align-items: center;
    border-radius: 16px;
    color: #425466;
    display: flex;
    gap: 12px;
    font-weight: 750;
    min-height: 48px;
    padding: 0 14px;
    text-decoration: none;
}

.opos-home__menu a::before {
    background: #eef6ff;
    border-radius: 12px;
    color: #00558c;
    content: attr(data-icon);
    display: grid;
    font-size: 16px;
    height: 30px;
    place-items: center;
    width: 30px;
}

.opos-home__menu a.is-active,
.opos-home__menu a:hover {
    background: linear-gradient(135deg, #00558c, #006d77);
    color: #fff;
    text-decoration: none;
}

.opos-home__menu a.is-active::before,
.opos-home__menu a:hover::before {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.opos-home__side-note {
    background: #0f172a;
    border-radius: 18px;
    color: #dbeafe;
    display: grid;
    gap: 8px;
    margin-top: auto;
    padding: 16px;
}

.opos-home__side-note strong {
    color: #7dd3fc;
}

.opos-home__content {
    background: #eef4f8;
    display: grid;
    gap: 18px;
    padding: 28px 34px 34px;
}

.opos-home__topbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.opos-home__topbar h1 {
    color: #111827;
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.04;
    margin: 0;
}

.opos-home__topbar p {
    color: #64748b;
    margin: 8px 0 0;
}

.opos-home__status {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    color: #111827;
    min-width: 300px;
}

.opos-home__status > span {
    color: #006d77;
}

.opos-opposition-picker label {
    color: #64748b;
}

.opos-opposition-picker select,
.opos-opposition-picker button {
    border-radius: 14px;
}

.opos-opposition-picker select {
    background: #f8fafc;
    border: 1px solid #d9e3ea;
}

.opos-opposition-picker button {
    background: #ffd166;
}

.opos-dashboard {
    background: transparent;
    border: 0;
    margin: 0;
    padding: 0;
}

.opos-dashboard__head {
    margin-bottom: 14px;
}

.opos-dashboard__head span {
    color: #006d77;
}

.opos-dashboard__head h2 {
    color: #151a32;
    font-size: 24px;
}

.opos-dashboard__cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.opos-dashboard__cards article,
.opos-dashboard__chart,
.opos-home__primary,
.opos-home__panel {
    background: #fff;
    border: 1px solid #e7edf3;
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.opos-dashboard__cards article {
    display: grid;
    gap: 8px;
    min-height: 134px;
    padding: 20px;
}

.opos-dashboard__cards article::before {
    background: #eef6ff;
    border-radius: 12px;
    color: #00558c;
    content: "◇";
    display: grid;
    font-weight: 900;
    height: 32px;
    place-items: center;
    width: 32px;
}

.opos-dashboard__cards span {
    color: #475569;
    font-weight: 700;
}

.opos-dashboard__cards strong {
    color: #151a32;
    font-size: 31px;
    line-height: 1;
}

.opos-dashboard__cards em {
    align-self: end;
    color: #0f9f6e;
    font-style: normal;
    font-weight: 800;
}

.opos-dashboard__charts {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.25fr);
}

.opos-dashboard__chart {
    padding: 22px;
}

.opos-dashboard__chart-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.opos-dashboard__chart h3 {
    color: #151a32;
    font-size: 22px;
    margin: 0;
}

.opos-dashboard__chart-head span {
    background: #f3f6f9;
    border-radius: 12px;
    color: #64748b;
    font-size: 14px;
    font-weight: 750;
    padding: 8px 12px;
}

.opos-dashboard__bars-chart {
    align-items: end;
    background: linear-gradient(#eef2f6 1px, transparent 1px) 0 0 / 100% 25%;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, 1fr);
    height: 230px;
    padding-top: 18px;
}

.opos-dashboard__bars-chart div {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-rows: 1fr auto;
    height: 100%;
}

.opos-dashboard__bars-chart span {
    align-self: end;
    background: linear-gradient(180deg, #47c2b0, #00558c);
    border-radius: 16px 16px 10px 10px;
    box-shadow: 0 14px 28px rgba(0, 85, 140, 0.18);
    display: block;
    height: var(--h);
    width: 100%;
}

.opos-dashboard__bars-chart small {
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.opos-dashboard__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opos-dashboard__period {
    background: #f8fbfd;
    border: 1px solid #e6edf2;
    border-radius: 18px;
}

.opos-dashboard__period h4 {
    color: #151a32;
    font-size: 16px;
    margin: 0 0 12px;
}

.opos-dashboard__bars {
    background: #e5ecf2;
    height: 14px;
}

.opos-dashboard__bars .is-correct {
    background: #10b981;
}

.opos-dashboard__bars .is-wrong {
    background: #ef476f;
}

.opos-home__layout {
    grid-template-columns: minmax(0, 1fr) 330px;
}

.opos-home__primary {
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 18px;
}

.opos-home__action {
    border: 1px solid #e5edf4;
    border-radius: 18px;
    min-height: 176px;
}

.opos-home__action--main {
    background:
        radial-gradient(circle at 90% 20%, rgba(255, 209, 102, 0.38), transparent 28%),
        linear-gradient(135deg, #00558c, #0f172a);
    grid-row: auto;
    min-height: 176px;
}

.opos-home__panel {
    padding: 20px;
}

@media (max-width: 1100px) {
    .opos-home {
        grid-template-columns: 1fr;
    }

    .opos-home__sidebar {
        border-bottom: 1px solid #e6edf2;
        border-right: 0;
    }

    .opos-home__menu {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .opos-dashboard__cards,
    .opos-dashboard__charts,
    .opos-home__layout,
    .opos-home__primary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .site-main {
        padding: 10px;
    }

    .opos-home {
        border-radius: 20px;
    }

    .opos-home__content {
        padding: 20px 14px;
    }

    .opos-home__topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .opos-home__status {
        min-width: 0;
    }

    .opos-home__menu {
        grid-template-columns: 1fr;
    }
}
