/*
Theme Name: A-Koondise portaal
Theme URI: https://example.com/
Author: Marko + ChatGPT
Description: Eesti A-koondise sisemine portaal (mängud + dashboardid).
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: paide-scouting-portal
*/

:root {
    --sp-bg: #04133a;
    --sp-bg-elevated: #08245f;
    --sp-border: #0f3a8a;
    --sp-text: #f5f7ff;
    --sp-text-muted: #9aa3c2;
    --sp-accent: #00c853;
    --sp-accent-soft: rgba(0, 200, 83, 0.15);
    --sp-paide-blue: #001c4c;
    --sp-paide-red: #e53935;
    --sp-card-radius: 16px;
    --sp-shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
    --sp-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Layout helpers */
    --ak-header-h: 84px;
}

body {
    margin: 0;
    font-family: var(--sp-font-sans);
    background:
        radial-gradient(circle at top, rgba(0, 0, 0, 0.8), rgba(0,0,0,1)),
        url('assets/img/ak-bg.png') center/cover fixed no-repeat;
    color: var(--sp-text);
}

/* Landing menu (front-page) */
.ak-landing {
    position: relative;
    padding-top: 0.5rem;
}
.ak-landing::before {
    content: "";
    position: absolute;
    inset: -3rem -1rem -2rem;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.25), rgba(0,0,0,0.65)),
        repeating-linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.06) 0px,
            rgba(255, 255, 255, 0.06) 2px,
            rgba(255, 255, 255, 0.00) 22px,
            rgba(255, 255, 255, 0.00) 52px
        );
    border-radius: 26px;
    filter: saturate(110%);
    pointer-events: none;
}
.ak-landing-intro {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin-bottom: 1.6rem;
}
.ak-landing-lead {
    margin: 0;
    font-size: clamp(1.05rem, 1.25vw, 1.25rem);
    line-height: 1.55;
    color: rgba(245, 247, 255, 0.88);
    text-shadow: 0 10px 22px rgba(0,0,0,0.55);
}

.ak-menu {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}
@media (max-width: 860px) {
    .ak-menu {
        grid-template-columns: 1fr;
    }
}

.ak-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 1.75rem 1.75rem 1.6rem;
    background: rgba(10, 16, 28, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 55px rgba(0,0,0,0.55);
    backdrop-filter: blur(18px);
}
.ak-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 15%, rgba(0, 200, 83, 0.18), transparent 58%),
        radial-gradient(circle at 90% 30%, rgba(255, 255, 255, 0.06), transparent 55%);
    pointer-events: none;
}
.ak-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 0.55rem 0;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}
.ak-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 1.25rem 0;
    color: rgba(245, 247, 255, 0.72);
    line-height: 1.55;
}
.ak-card--wide {
    grid-column: 1 / span 2;
}
@media (max-width: 860px) {
    .ak-card--wide {
        grid-column: auto;
    }
}

.ak-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 200, 83, 0.6);
    background: rgba(0, 200, 83, 0.08);
    color: rgba(0, 255, 132, 0.95);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 18px 35px rgba(0,0,0,0.35);
}
.ak-btn:hover {
    text-decoration: none;
    border-color: rgba(0, 255, 132, 0.8);
    background: rgba(0, 200, 83, 0.16);
}

/* Global links */
a {
    color: var(--sp-accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: linear-gradient(90deg, rgba(0, 12, 40, 0.95), rgba(10, 41, 92, 0.96));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.7);
}

/* Nav */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}
.main-nav li a {
    color: var(--sp-text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.main-nav li a:hover {
    color: var(--sp-text);
}

/* Front layout */
.scouting-front {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem 4rem;
}
.scouting-front-hero {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
    gap: 2rem;
    align-items: center;
}
@media (max-width: 880px) {
    .scouting-front-hero {
        grid-template-columns: 1fr;
    }
}
.scouting-front-hero h1 {
    font-size: clamp(2rem, 3vw, 2.7rem);
    margin-bottom: 0.8rem;
}
.scouting-front-hero p {
    color: var(--sp-text-muted);
    max-width: 36rem;
}

/* Paide badge */
.paide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.9rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sp-text-muted);
}
.paide-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sp-paide-red), var(--sp-paide-blue));
}

/* Cards */
.scouting-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.3rem;
    margin-top: 1.8rem;
}
.scouting-card {
    background: radial-gradient(circle at top left, rgba(0, 200, 83, 0.12), rgba(5, 13, 32, 0.98));
    border-radius: var(--sp-card-radius);
    border: 1px solid rgba(0, 0, 0, 0.7);
    box-shadow: var(--sp-shadow-soft);
    padding: 1.4rem 1.3rem;
    position: relative;
    overflow: hidden;
}
.scouting-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(229, 57, 53, 0.18), transparent 55%);
    opacity: 0.5;
    pointer-events: none;
}
.scouting-card h2 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}
.scouting-card p {
    color: var(--sp-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
}
.scouting-card a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 200, 83, 0.5);
    background: linear-gradient(90deg, var(--sp-accent-soft), rgba(0, 0, 0, 0.3));
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Pitch preview */
.pitch-preview {
    background: radial-gradient(circle at center, #22753b 0, #105423 40%, #04260f 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.8);
    box-shadow: var(--sp-shadow-soft);
    padding: 1.2rem 1rem 1.4rem;
    position: relative;
    overflow: hidden;
}
.pitch-preview::before,
.pitch-preview::after {
    content: "";
    position: absolute;
    inset: 8%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.pitch-preview::after {
    inset: 34% 38%;
    border-radius: 999px;
}
.pitch-label {
    position: absolute;
    bottom: 0.9rem;
    left: 1.2rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Dashboard wrapper */
.scout-dashboard-wrap {
    background: #020712;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.85);
    box-shadow: var(--sp-shadow-soft);
}

.scout-dashboard-wrap--full {
    /* Break out of centered layouts and fill full viewport width */
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    left: 50%;
    right: 50%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.scout-dashboard-wrap--full iframe {
    height: calc(100vh - var(--ak-header-h));
}

.ak-dashboard-page {
    padding: 0;
    margin: 0;
    max-width: none;
}

/* Login */
.scouting-login-wrap {
    max-width: 420px;
    margin: 3.5rem auto 4rem;
    background: radial-gradient(circle at top, rgba(0, 200, 83, 0.18), rgba(1, 5, 18, 0.98));
    border-radius: 22px;
    padding: 2.2rem 2rem 2.4rem;
    box-shadow: var(--sp-shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.85);
}
.scouting-login-wrap h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}
.scouting-login-wrap p {
    margin-top: 0;
    margin-bottom: 1.4rem;
    font-size: 0.9rem;
    color: var(--sp-text-muted);
}
.scouting-login-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sp-text-muted);
}
.scouting-login-logo-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: conic-gradient(from 160deg, var(--sp-paide-red), var(--sp-paide-blue), #00c853, var(--sp-paide-red));
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
}

/* Login form tweaks */
.scouting-login-wrap form p {
    margin-bottom: 0.75rem;
}
.scouting-login-wrap label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sp-text-muted);
}
.scouting-login-wrap input[type="text"],
.scouting-login-wrap input[type="password"] {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.55);
    color: var(--sp-text);
}
.scouting-login-wrap input[type="submit"] {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: linear-gradient(120deg, var(--sp-accent), #67ff9f);
    color: #020712;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
}
.scouting-login-wrap input[type="submit"]:hover {
    opacity: 0.94;
}

.scouting-login-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--sp-text-muted);
}

/* Paide header */
.site-header {
    background: linear-gradient(90deg, rgba(0, 12, 40, 0.96), rgba(0, 41, 92, 0.98));
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.8);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.site-logo {
    width: 42px;
    height: auto;
    display: block;
}
.site-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.site-title-main {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-title-sub {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sp-text-muted);
}
.main-nav {
    font-size: 0.85rem;
}
@media (max-width: 720px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.scouting-login-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.4rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--sp-text-muted);
}
.scouting-login-logo img {
    width: 40px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 12px rgba(0,0,0,0.65));
}
.scouting-login-logo-text-main {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e5e7eb;
}
.scouting-login-logo-text-sub {
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sp-text-muted);
}


/* A-Koondise taust */
body{background-image:url('assets/img/ak-bg.png');background-size:cover;background-attachment:fixed;background-position:center;}
body:before{content:'';position:fixed;inset:0;background:linear-gradient(135deg, rgba(4,19,58,0.90), rgba(8,36,95,0.82));pointer-events:none;z-index:-1;}

/* Tulemus badge */
.badge-result{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;border-radius:999px;font-weight:800;letter-spacing:0.02em;color:#fff;font-size:14px;}
.badge-w{background:#1f9d55;}
.badge-d{background:#f39c12;}
.badge-l{background:#e74c3c;}

.match-meta{display:flex;gap:.75rem;flex-wrap:wrap;color:var(--sp-text-muted);font-size:.95rem;}
.match-actions a{margin-right:.6rem;}
