:root {
    --ink: #08233f;
    --muted: #55708d;
    --blue: #00aeef;
    --blue-dark: #183c84;
    --line: #d8e5f1;
    --soft: #f3f7fb;
    --white: #ffffff;
    --danger: #b42318;
    --success: #027a48;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: "Open Sans", Arial, sans-serif;
}

h1,
h2,
h3,
.brand,
.button,
.eyebrow {
    font-family: "Montserrat", Arial, sans-serif;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

a {
    color: inherit;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 64px);
    color: var(--white);
    background: #12324f;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px solid var(--blue);
    border-radius: 12px;
    color: var(--blue);
    font-weight: 800;
}

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

.brand small {
    color: var(--blue);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
}

.app-header nav {
    display: flex;
    gap: 22px;
    font-weight: 800;
}

.app-header nav a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(56px, 8vw, 110px) clamp(18px, 6vw, 78px);
    color: var(--white);
    background:
        linear-gradient(135deg, rgba(8, 35, 63, 0.96), rgba(24, 60, 132, 0.9)),
        url("https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero h1 {
    max-width: 980px;
    color: var(--white);
    font-size: clamp(2.35rem, 5.4vw, 5.5rem);
    line-height: 0.98;
}

.hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
    line-height: 1.7;
}

.eyebrow {
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-actions,
.admin-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
}

.button.primary {
    color: var(--white);
    background: var(--blue);
}

.button.ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.button.danger {
    color: var(--white);
    background: var(--danger);
}

.status-panel {
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.status-panel span,
.status-panel strong {
    display: block;
}

.status-panel strong {
    margin: 12px 0;
    font-size: 2.2rem;
}

.muted {
    color: var(--muted);
}

.status-panel .muted {
    color: rgba(255, 255, 255, 0.72);
}

.notice-stack {
    display: grid;
    gap: 10px;
    width: min(1160px, calc(100% - 36px));
    margin: 24px auto 0;
}

.notice {
    margin: 0;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--white);
}

.notice.success {
    border-left: 4px solid var(--success);
}

.notice.error {
    border-left: 4px solid var(--danger);
}

.workflow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: min(1160px, calc(100% - 36px));
    margin: clamp(36px, 6vw, 72px) auto;
}

.workflow article,
.item-card,
.admin-login,
.admin-table-wrap {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 18px 40px rgba(8, 35, 63, 0.08);
}

.workflow article {
    padding: 26px;
}

.workflow span {
    color: var(--blue);
    font-weight: 800;
}

.workflow h2 {
    margin: 16px 0 10px;
    font-size: 1.25rem;
}

.workflow p,
.section-heading p,
.item-card p,
.closed-summary p {
    color: var(--muted);
    line-height: 1.65;
}

.items-section,
.admin-section {
    width: min(1240px, calc(100% - 36px));
    margin: 0 auto;
    padding: clamp(24px, 5vw, 64px) 0;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4.2vw, 4rem);
    line-height: 1;
}

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

.item-card {
    overflow: hidden;
}

.item-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
}

.item-body {
    padding: clamp(20px, 3vw, 34px);
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--blue-dark);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pill {
    padding: 6px 10px;
    border-radius: 999px;
}

.pill.open {
    color: var(--success);
    background: #ecfdf3;
}

.pill.closed {
    color: var(--danger);
    background: #fef3f2;
}

.item-card h3 {
    font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.bid-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.bid-stats div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fbfe;
}

.bid-stats dt {
    color: var(--muted);
    font-size: 0.78rem;
}

.bid-stats dd {
    margin: 6px 0 0;
    font-weight: 800;
}

.bid-form,
.admin-login {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-login {
    max-width: 620px;
    padding: 24px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-size: 0.86rem;
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
}

.bid-form .button,
.admin-login .button {
    align-self: end;
}

.closed-summary {
    padding: 18px;
    border-radius: 10px;
    background: #f8fbfe;
}

.admin-tools {
    margin-bottom: 20px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--blue-dark);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.admin-table small {
    color: var(--muted);
}

.text-button {
    border: 0;
    color: var(--blue-dark);
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

@media (max-width: 860px) {
    .app-header,
    .hero,
    .workflow,
    .item-grid {
        grid-template-columns: 1fr;
    }

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

    .app-header nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        white-space: nowrap;
    }
}

@media (max-width: 620px) {
    .hero-actions,
    .hero-actions .button,
    .admin-tools,
    .admin-tools form,
    .admin-tools .button {
        width: 100%;
    }

    .bid-stats,
    .bid-form,
    .admin-login {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.4rem;
    }
}
