/* ------------------------------------------------------------
   Global Stylesheet
   ------------------------------------------------------------ */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* Color palette */
:root {
    /* Variable for team color */
    /* light ac3e37 main 770711 dark 470000 */
    --main-color-light: #effff6;
    --main-color-primary: #228cdb;
    --main-color-dark: #170a1c;
    --main-color-text: #ffffff;
    --main-color-bright: #170a1c;

    --surface-color: #ffffff;
    --surface-muted: #f5f8fc;
    --border-subtle: rgba(23, 10, 28, 0.12);
    --border-strong: rgba(23, 10, 28, 0.18);
    --shadow-soft: 0 20px 48px rgba(17, 7, 21, 0.18);
    --shadow-hover: 0 24px 48px rgba(34, 140, 219, 0.32);
    --font-family-base: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --radius-large: 18px;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--main-color-light);
    color: var(--main-color-bright);
    font-family: var(--font-family-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
    padding: clamp(2rem, 2vw + 1.5rem, 3rem) 1rem;
}

footer {
    flex-shrink: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--main-color-dark);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-top: 0;
}

p,
strong,
label,
td {
    color: var(--main-color-dark);
}

a {
    color: var(--main-color-primary);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover,
a:focus {
    color: var(--main-color-dark);
    outline: none;
}

.link-accent {
    position: relative;
    color: var(--main-color-primary);
    font-weight: 600;
    text-decoration: none;
}

.link-accent::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 100%;
    height: 2px;
    background: rgba(34, 140, 219, 0.45);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.link-accent:hover,
.link-accent:focus {
    color: var(--main-color-dark);
}

.link-accent:hover::after,
.link-accent:focus::after {
    transform: scaleX(1);
}

img {
    max-width: 100%;
    display: block;
}

button {
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--main-color-primary);
    color: var(--main-color-text);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover {
    background: var(--main-color-dark);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    background: var(--surface-muted);
    color: var(--main-color-dark);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--main-color-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(34, 140, 219, 0.18);
    outline: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

select {
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
    background-image: none;
    padding-right: 2.5rem;
}

.select-wrapper {
    position: relative;
    display: block;
}

.select-wrapper::after {
    content: "▾";
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(23, 10, 28, 0.65);
    font-size: 0.85rem;
}

.select-wrapper select {
    width: 100%;
    display: block;
}

.input-with-prefix {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-muted);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-with-prefix:focus-within {
    border-color: var(--main-color-primary);
    box-shadow: 0 0 0 3px rgba(34, 140, 219, 0.18);
}

.input-with-prefix .prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.9rem;
    background: rgba(34, 140, 219, 0.12);
    color: var(--main-color-dark);
    font-weight: 600;
    min-width: 46px;
    border-right: 1px solid var(--border-subtle);
}

.input-with-prefix input {
    flex: 1 1 auto;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0.65rem 0.85rem;
}

/* Layout helpers */
.layout-shell {
    width: min(1140px, 100%);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.surface-card {
    background: var(--surface-color);
    border-radius: var(--radius-large);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: clamp(2rem, 2vw + 1.5rem, 3rem);
}

.surface-card--centered {
    text-align: center;
}

.stack > * + * {
    margin-top: clamp(1.25rem, 1.25vw + 0.75rem, 1.75rem);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.cta-row .cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.85);
    color: var(--main-color-dark);
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.cta-row .cta-secondary:hover {
    border-color: var(--main-color-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
    color: var(--main-color-dark);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--main-color-primary);
}

.section-lead {
    max-width: 54ch;
    margin: 0.5rem auto 0;
    color: rgba(23, 10, 28, 0.72);
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(120deg, rgba(23, 10, 28, 0.96) 0%, rgba(18, 32, 68, 0.95) 50%, rgba(34, 140, 219, 0.92) 100%);
    color: var(--main-color-text);
    box-shadow: 0 18px 42px rgba(17, 7, 21, 0.32);
    backdrop-filter: blur(8px);
}

.nav-shell {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

.nav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    width: 100%;
    justify-content: space-between;
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--main-color-text);
}

.logo {
    height: 44px;
}

.nav .navbar-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color-text);
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav .navbar-burger:hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav .navbar-burger span {
    background-color: currentColor;
}

.nav .navbar-menu {
    display: none;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    box-shadow: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav .navbar-menu.is-active {
    display: flex;
}

.nav .navbar-end {
    align-items: center;
    gap: 0.5rem;
}

.nav .navbar-link,
.nav .navbar-item {
    color: var(--main-color-text) !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.nav .navbar-link:hover,
.nav .navbar-item:hover,
.nav .navbar-item:focus {
    color: var(--main-color-light) !important;
    background: transparent !important;
}

.nav .navbar-item.has-dropdown:hover .navbar-link {
    color: var(--main-color-light) !important;
}

.nav .navbar-dropdown {
    background: rgba(23, 10, 28, 0.95);
    border-radius: 16px;
    padding: 0.75rem 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px rgba(17, 7, 21, 0.45);
}

.nav .navbar-dropdown .navbar-item {
    color: var(--main-color-text) !important;
    padding: 0.5rem 1.5rem;
}

.nav .navbar-dropdown .navbar-item:hover {
    background: rgba(34, 140, 219, 0.18) !important;
    color: var(--main-color-text) !important;
}

.navbar-link:not(.is-arrowless)::after {
    border-color: var(--main-color-primary) !important;
}

@media screen and (max-width: 1023px) {
    .nav {
        padding: 0.85rem 1.25rem;
    }

    .nav-shell {
        flex-wrap: wrap;
    }

    .nav .navbar-menu {
        width: 100%;
        margin-top: 0.75rem;
        border-radius: 16px;
        padding: 1rem;
        background: rgba(23, 10, 28, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 20px 42px rgba(17, 7, 21, 0.48);
    }

    .nav .navbar-end {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav .navbar-link,
    .nav .navbar-item {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .nav .navbar-dropdown {
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0.25rem 0;
    }

    .nav .navbar-dropdown .navbar-item {
        padding-left: 1.25rem;
    }
}

@media screen and (min-width: 1024px) {
    .nav .navbar-menu {
        display: flex;
    }

    .nav .navbar-brand {
        width: auto;
        justify-content: flex-start;
    }

    .nav .navbar-burger {
        display: none;
    }
}

/* Tables */
.table-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.table-container,
.table-responsive {
    overflow-x: auto;
    background: var(--surface-color);
    border-radius: var(--radius-large);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    margin: clamp(1.5rem, 2vw + 1rem, 2.5rem) auto 0;
    width: 100%;
}

.table-container table,
.table-responsive table,
table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.data-table th,
.data-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.data-table th {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #ffffff;
}

table caption {
    text-align: left;
    padding-bottom: 0.75rem;
    font-weight: 700;
    color: var(--main-color-dark);
}

thead {
    background: linear-gradient(135deg, var(--main-color-primary) 0%, #1c6fb8 100%);
    color: #ffffff;
}

th,
td {
    padding: 0.35rem 0.45rem;
    font-size: 0.82rem;
    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

th {
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

tbody tr {
    border-bottom: 1px solid var(--border-subtle);
}

tbody tr:nth-child(odd) {
    background: var(--surface-color);
}

tbody tr:nth-child(even) {
    background: var(--surface-muted);
}

tbody tr:hover {
    background: rgba(34, 140, 219, 0.09);
    transition: background-color 0.18s ease-in-out;
}

td {
    color: var(--main-color-dark);
}

.table-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.cell-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid rgba(34, 140, 219, 0.35);
    color: var(--main-color-primary);
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-icon:hover {
    transform: translateY(-1px);
    background: var(--main-color-primary);
    color: var(--main-color-text);
    box-shadow: var(--shadow-hover);
}

.btn-icon--danger {
    border-color: rgba(214, 69, 69, 0.45);
    color: #d64545;
}

.btn-icon--danger:hover {
    background: #d64545;
    color: #ffffff;
}

.flash-message {
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: rgba(34, 140, 219, 0.12);
    border: 1px solid rgba(34, 140, 219, 0.25);
    color: var(--main-color-dark);
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(23, 10, 28, 0.65);
    font-weight: 500;
}

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

.menu-table tr + tr {
    border-top: 1px solid var(--border-subtle);
}

.menu-table td,
.menu-table th {
    padding: 0.75rem 0;
    text-align: left;
}

.menu-table a {
    color: var(--main-color-dark);
    font-weight: 600;
}

.menu-table a:hover {
    color: var(--main-color-primary);
}

/* Forms */
.form-card {
    width: min(640px, 100%);
    margin: 0 auto;
    background: var(--surface-muted);
    border-radius: var(--radius-large);
    border: 1px solid var(--border-subtle);
    padding: clamp(1.75rem, 2vw + 1.25rem, 2.5rem);
    box-shadow: 0 14px 32px rgba(17, 7, 21, 0.18);
    text-align: left;
}

.form-card p {
    margin-bottom: 0.75rem;
}

.form-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--main-color-dark);
}

.form-card .input,
.form-card select {
    margin-bottom: 0.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-field + .form-field {
    margin-top: 1rem;
}

.form-row .form-field + .form-field {
    margin-top: 0;
}

.form-field .cd {
    margin-top: 0;
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.form-inline label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 0 1 auto;
    min-width: 220px;
    margin: 0;
}

.form-inline select {
    min-width: 220px;
}

.form-inline button {
    flex: 0 0 auto;
    align-self: center;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.wbb {
    display: inline-flex !important;
    flex-direction: column;
    gap: 0.75rem;
    padding: clamp(1.5rem, 1.5vw + 1rem, 2rem) clamp(1.5rem, 1.5vw + 1rem, 2rem) !important;
    background: var(--surface-color) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-large) !important;
    box-shadow: var(--shadow-soft);
    text-align: left !important;
}

.wbb > * {
    width: 100%;
}

.wbb button {
    margin-top: 1rem;
    align-self: center;
}

.wbb.form-inline {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.wbb.form-inline > * {
    width: auto;
}

.wbb.form-inline button {
    margin-top: 0;
}

.cd {
    color: #d64545 !important;
    font-weight: 600;
    margin: 0.25rem 0 0 0;
}

.report-summary {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(34, 140, 219, 0.12);
    border: 1px solid rgba(34, 140, 219, 0.2);
    border-radius: 12px;
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    font-weight: 600;
    color: var(--main-color-dark);
}

/* Footer */
.footer {
    background: transparent;
    padding: 0;
}

.ftr {
    margin-top: auto;
    padding: 2rem 1rem;
    background: var(--main-color-dark);
    color: var(--main-color-text);
}

.ftr .content {
    max-width: 1140px;
    margin: 0 auto;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

/* Utility */
.no-link {
    color: inherit;
}

.no-link:hover {
    color: inherit;
}

.vert-align {
    display: flex;
    align-items: center;
}

.centered {
    margin-left: auto;
    margin-right: auto;
}

.centered2 {
    text-align: center;
}

.ddl {
    margin: 0 8px;
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.links > a {
    margin-right: 24px;
}

body .title {
    color: var(--main-color-bright) !important;
}

.accent {
    color: var(--main-color-text);
}

.accent-background {
    background: var(--main-color-primary) !important;
    border: 1px solid var(--main-color-primary) !important;
    border-radius: 999px !important;
    padding: 0.65rem 1.5rem !important;
    box-shadow: 0 10px 24px rgba(34, 140, 219, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.accent-background:hover {
    background: var(--main-color-dark) !important;
    border-color: var(--main-color-dark) !important;
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
    color: var(--main-color-text) !important;
}

.container button {
    margin-top: 30px;
}

@media screen and (max-width: 768px) {
    th,
    td {
        padding: 0.65rem 0.75rem;
        font-size: 0.9rem;
    }

    .table-container,
    .table-responsive {
        padding: 1.25rem;
        margin: 1.25rem 0 0;
    }

    .layout-shell {
        padding: 0 1rem;
    }

    .surface-card {
        padding: 1.5rem;
    }

    .table-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .table-title .accent {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .cta-row {
        flex-direction: column;
    }
}

@media screen and (max-width: 480px) {
    button {
        width: 100%;
    }

    .form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .form-inline button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
