* {
    box-sizing: border-box;
}

body.mycot-body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6fb;
    color: #1b2430;
}

body.mycot-auth-page {
    background: linear-gradient(135deg, #5a0a0a 0%, #8b1515 55%, #a82020 100%);
}

.mycot-header {
    --navbar-height: 76px;
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    min-height: var(--navbar-height);
    gap: 16px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #5a0a0a, #8b1515);
    color: #fff;
    box-shadow: 0 8px 24px rgba(32, 6, 6, 0.28);
}

.mycot-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: calc(var(--navbar-height) - 24px);
    color: #fff;
    text-decoration: none;
}

.mycot-brand-logo {
    height: 100%;
    width: auto;
    max-height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.mycot-brand-text {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.mycot-navbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.nav-link,
.mycot-logout {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-link {
    background: rgba(255, 255, 255, 0.08);
}

.mycot-logout {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.14);
}

.nav-link:hover,
.mycot-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.nav-link.active {
    background: #fff;
    border-color: rgba(255, 255, 255, 0.45);
    color: #5a0a0a;
    font-weight: 600;
}

.nav-link:focus-visible,
.mycot-logout:focus-visible,
.mycot-brand:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

.mycot-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mycot-auth-main {
    max-width: none;
    margin: 0;
    width: 100%;
    min-height: 100vh;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-head {
    margin-bottom: 18px;
}

.page-head h1 {
    margin: 0 0 6px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(18, 52, 86, 0.08);
    padding: 16px;
    margin-bottom: 16px;
}

.card.spaced {
    margin-bottom: 18px;
}

.card.empty {
    text-align: center;
    color: #667080;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
    justify-content: start;
    gap: 16px;
    margin-bottom: 20px;
}

.player-card h2,
.card h2,
.card h3 {
    margin-top: 0;
}

.player-section {
    margin-bottom: 12px;
}

.muted {
    color: #6f7a89;
}

.tags-list,
.status-list,
.event-list,
.people-list {
    margin: 0;
    padding-left: 18px;
}

.tags-list li,
.status-list li,
.event-list li,
.people-list li {
    margin: 5px 0;
}

.tag-link,
.link-arrow {
    color: #255ea8;
    text-decoration: none;
}

.tag-link:hover,
.link-arrow:hover {
    text-decoration: underline;
}

.status-line,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
}

.status-red {
    background: #fde7e7;
    color: #b10000;
}

.status-orange {
    background: #fff2de;
    color: #a96400;
}

.status-yellow {
    background: #fff8d2;
    color: #8f6b00;
}

.status-green {
    background: #e3f8ea;
    color: #0e7a2d;
}

.status-blue {
    background: #e2f0ff;
    color: #215baf;
}

.status-gray {
    background: #ebedf1;
    color: #4f5a69;
}

.packs-orders {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pack-order {
    border: 1px solid #e0e8f3;
    border-radius: 10px;
    padding: 10px;
    background: #f8fbff;
}

.pack-order-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.pack-order-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.pack-order-summary::-webkit-details-marker {
    display: none;
}

.pack-order-summary::before {
    content: "\25B6"; /* triangle déroulant */
    font-size: 11px;
    color: #5a7799;
    transition: transform .15s ease;
}

.pack-order[open] > .pack-order-summary::before {
    transform: rotate(90deg);
}

.pack-order[open] > .pack-order-summary {
    margin-bottom: 8px;
}

.pack-order-details {
    background: #fff;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    padding: 8px 10px;
}

.pack-order-details ul {
    margin: 0;
    padding-left: 18px;
}

.pack-order-details li {
    margin: 4px 0;
}

.pack-order-details .muted {
    margin: 0;
}

.table-wrapper {
    overflow-x: auto;
}

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

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #edf1f6;
    vertical-align: middle;
}

th {
    background: #f8fbff;
}

.btn {
    border: 0;
    background: #1e5fb2;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #174f95;
}

.btn-secondary {
    background: #4e627d;
}

.btn-secondary:hover {
    background: #394a60;
}

.btn-disabled,
.btn:disabled {
    background: #aab4c2;
    cursor: not-allowed;
}

.auth-wrapper {
    min-height: calc(100vh - 40px);
    display: grid;
    place-items: center;
    width: 100%;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(17, 39, 67, 0.15);
    padding: 24px;
}

.auth-wrapper-login {
    min-height: 100%;
}

.auth-login-card {
    max-width: 440px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}

.auth-login-header {
    background: linear-gradient(135deg, #5a0a0a, #8b1515);
    padding: 32px 32px 24px;
    text-align: center;
}

.auth-login-header .logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.auth-login-header .logo-wrap img {
    height: 90px;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.auth-login-header h1 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin: 0;
}

.auth-login-header p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.auth-login-body {
    padding: 32px;
}

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

.form-grid input,
.form-grid select {
    width: 100%;
    border: 1px solid #ccd7e5;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
}

.mycot-auth-page .form-grid {
    gap: 12px;
}

.mycot-auth-page .form-grid label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: -4px;
}

.mycot-auth-page .form-grid input {
    border: 1.5px solid #dde2ea;
    padding: 11px 14px;
    font-size: 0.95rem;
    color: #333;
    background: #f8fafc;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.mycot-auth-page .form-grid input:focus {
    border-color: #8b1515;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(139, 21, 21, 0.12);
    outline: none;
}

.mycot-auth-page .btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: linear-gradient(90deg, #5a0a0a, #8b1515);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: opacity 0.2s ease, transform 0.1s ease;
    margin-top: 8px;
}

.mycot-auth-page .btn:hover {
    background: linear-gradient(90deg, #5a0a0a, #8b1515);
    opacity: 0.92;
}

.mycot-auth-page .btn:active {
    transform: scale(0.98);
}

.mycot-auth-page .auth-links {
    margin-top: 16px;
    text-align: center;
}

.mycot-auth-page .auth-links a {
    color: #8b1515;
    text-decoration: none;
    font-weight: 600;
}

.mycot-auth-page .auth-links a:hover {
    text-decoration: underline;
}

.form-grid.two-columns {
    grid-template-columns: 1fr;
}

.fieldset-full {
    border: 1px solid #dde6f2;
    border-radius: 8px;
    padding: 10px;
}

.checkbox-grid {
    display: grid;
    gap: 6px;
}

.checkbox-label {
    display: flex;
    gap: 8px;
    align-items: center;
}

.checkbox-label input {
    width: auto;
}

.form-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-links {
    margin-top: 14px;
}

.alert {
    border-radius: 10px;
    padding: 12px;
    margin: 12px 0;
}

.alert-success {
    background: #e3f8ea;
    color: #0e7a2d;
}

.alert-error {
    background: #fde7e7;
    color: #b10000;
}

.mycot-auth-page .alert-error {
    background: #fff0f0;
    border-left: 4px solid #d9534f;
    color: #a10000;
}

.alert-warning {
    background: #fff3da;
    color: #8d6700;
}

.layout-two-columns {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 16px;
    align-items: start;
}

.inline-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.info-banner {
    background: #e9f4ff;
    border-left: 4px solid #1e5fb2;
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mt-12 {
    margin-top: 12px;
}

/* Members Grid Layout */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.member-tile {
    background: #fff;
    border: 1px solid #edf1f6;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.member-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.member-photo-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8fbff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-info {
    padding: 12px 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.member-name {
    font-weight: 700;
    font-size: 14px;
    color: #1b2430;
    margin: 0;
    line-height: 1.3;
}

.member-title {
    font-size: 12px;
    color: #6f7a89;
    margin-top: 4px;
    font-weight: 500;
}

@media (max-width: 900px) {
    .layout-two-columns {
        grid-template-columns: 1fr;
    }

    .mycot-header {
        --navbar-height: 64px;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 14px 12px;
    }

    .mycot-brand {
        height: calc(var(--navbar-height) - 18px);
    }

    .mycot-navbar {
        width: 100%;
    }

    .mycot-logout {
        margin-left: 0;
    }

    .mycot-auth-main {
        padding: 12px;
    }

    .auth-login-header {
        padding: 24px 20px 18px;
    }

    .auth-login-header .logo-wrap img {
        height: 76px;
    }

    .auth-login-body {
        padding: 24px 20px;
    }
}
