:root {
    --ink: #17232b;
    --muted: #65737b;
    --surface: #fff;
    --soft: #f3f6f5;
    --line: #dce4e0;
    --primary: #193f34;
    --primary2: #2e6756;
    --danger: #a72828;
    --shadow: 0 18p x 48px rgba(12, 30, 24, .12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: var(--ink);
    background: #eef2f0;
}

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

img {
    max-width: 100%;
}

.landing-body,
.login-body {
    background: radial-gradient(
        circle at top,
        #365f52 0,
        #183b31 35%,
        #0e211c 100%
    );
    min-height: 100vh;
}

.landing-shell,
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.hero-card,
.login-card {
    width: min(980px, 100%);
    background: rgba(255, 255, 255, .97);
    border-radius: 28px;
    padding: 42px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

.login-card {
    width: min(700px, 100%);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .10em;
    font-size: .99rem;
    font-weight: 1000;
    color: var(--primary2);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 1.05;
    margin: .35em 0 .25em;
}

.login-card h1,
.page-heading h1,
.profile-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

p {
    color: var(--muted);
    line-height: 1.6;
}

.platoon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-top: 32px;
}

.platoon-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    transition: .2s;
    box-shadow: 0 8px 24px rgba(20, 40, 33, .05);
}

.platoon-card:hover {
    transform: translateY(-4px);
    border-color: #9fb9af;
    box-shadow: var(--shadow);
}

.logo-frame {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--soft);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.platoon-card strong {
    display: block;
    font-size: 1.25rem;
}

.platoon-card span {
    display: block;
    color: var(--muted);
    margin-top: 7px;
}

.login-logo {
    display: block;
    width: 230px;
    height: 230px;
    object-fit: contain;
    margin: 0 auto 18px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary);
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: .9rem;
    font-weight: 700;
    color: #33434a;
}

.form-stack {
    display: grid;
    gap: 18px;
    margin-top: 25px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfdad5;
    background: #fff;
    border-radius: 11px;
    padding: 12px 13px;
    font: inherit;
    color: var(--ink);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #5d8c7c;
    box-shadow: 0 0 0 3px rgba(46, 103, 86, .12);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.large {
    min-height: 180px;
}

.password-row {
    display: flex;
    gap: 8px;
}

.icon-btn {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--soft);
    padding: 0 14px;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: 750;
    cursor: pointer;
    transition: .15s;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--primary);
    color: #fff;
}

.btn.secondary {
    background: #dfeae6;
    color: #15392f;
}

.btn.ghost {
    background: #fff;
    border: 1px solid var(--line);
}

.btn.danger {
    background: var(--danger);
    color: #fff;
}

.btn.small {
    padding: 8px 11px;
    font-size: .84rem;
}

.btn.full {
    width: 100%;
}

.alert {
    padding: 12px 15px;
    border-radius: 11px;
    margin: 14px 0;
}

.alert.success {
    background: #dff2e7;
    color: #1f5c3d;
}

.alert.danger {
    background: #fce1e1;
    color: #812020;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 13px max(20px, calc((100vw - 1240px) / 2));
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.brand strong,
.brand span {
    display: block;
}

.brand span {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 3px;
}

.userbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

.container {
    width: min(1240px, calc(100% - 36px));
    margin: 0 auto;
    padding: 34px 0 60px;
}

.container.narrow {
    width: min(980px, calc(100% - 36px));
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
}

.page-heading h1 {
    margin: .25em 0 .1em;
}

.page-heading p {
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: .84rem;
}

.stat strong {
    display: block;
    font-size: 2rem;
    margin-top: 5px;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr 170px auto auto;
    gap: 10px;
    background: #fff;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    margin-bottom: 20px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.profile-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 17px;
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 15px;
    box-shadow: 0 8px 25px rgba(20, 40, 33, .04);
}

.profile-photo-wrap {
    grid-row: span 2;
}

.profile-photo {
    width: 82px;
    height: 98px;
    object-fit: cover;
    border-radius: 13px;
    background: #e7ece9;
}

.initials {
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 850;
}

.profile-card-body h3 {
    margin: 8px 0 5px;
}

.profile-card-body p {
    font-size: .83rem;
    margin: 0;
}

.badge {
    display: inline-block;
    background: #e1ece7;
    color: #1a4b3c;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: .72rem;
    font-weight: 850;
}

.mini-meta {
    display: grid;
    gap: 3px;
    margin-top: 10px;
    font-size: .78rem;
    color: var(--muted);
}

.card-actions {
    grid-column: 2;
    display: flex;
    gap: 7px;
}

.empty {
    background: #fff;
    border: 1px dashed #bdcbc5;
    border-radius: 18px;
    padding: 50px;
    text-align: center;
}

.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 25px;
}

.form-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.form-section:first-of-type {
    padding-top: 0;
}

.form-section h2,
.detail-card h2 {
    font-size: 1.05rem;
    margin: 0 0 16px;
}

.form-grid {
    display: grid;
    gap: 15px;
}

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

.form-grid.three {
    grid-template-columns: repeat(3, 1fr);
}

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

.photo-upload img {
    width: 90px;
    height: 105px;
    object-fit: cover;
    border-radius: 12px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 18px;
}

.hero-photo {
    width: 115px;
    height: 140px;
    object-fit: cover;
    border-radius: 15px;
    background: #e8eeeb;
}

.grow {
    flex: 1;
}

.profile-hero h1 {
    margin: 8px 0 5px;
}

.profile-hero p {
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 8px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 20px;
}

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

.detail-row {
    display: grid;
    grid-template-columns: 38% 62%;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0ee;
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-row span {
    color: var(--muted);
    font-size: .83rem;
}

.detail-row strong {
    font-size: .88rem;
    font-weight: 650;
    word-break: break-word;
}

.notes-box {
    line-height: 1.7;
    white-space: normal;
}

.danger-zone {
    margin-top: 20px;
    background: #fff5f5;
    border: 1px solid #f0cccc;
    border-radius: 16px;
    padding: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.danger-zone strong,
.danger-zone span {
    display: block;
}

.danger-zone span {
    color: var(--muted);
    font-size: .8rem;
    margin-top: 3px;
}


/* =========================
   TABLET
========================= */

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

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


/* =========================
   MOBILE
========================= */

@media (max-width: 680px) {
    .hero-card,
    .login-card {
        padding: 24px;
    }

    .platoon-grid,
    .profile-grid,
    .form-grid.two,
    .form-grid.three,
    .details-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .platoon-card {
        align-items: center;
    }

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

    .page-heading,
    .profile-hero,
    .danger-zone {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1;
    }

    .userbox span {
        display: none;
    }

    .card-actions {
        grid-column: 1 / -1;
    }

    .profile-photo-wrap {
        grid-row: auto;
    }

    .profile-card {
        grid-template-columns: 72px 1fr;
    }

    .profile-photo {
        width: 72px;
        height: 88px;
    }

    .topbar {
        padding: 10px 14px;
    }
}