/* 2026-08-12 multi-CG roster */
.cg-v2-page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 48px;
}

.cg-v2-page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    text-align: center;
}

.cg-v2-month-nav {
    display: grid;
    grid-template-columns: auto minmax(220px, auto) auto;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cg-v2-month-nav h1 {
    margin: 0;
    color: #17271f;
    font-size: clamp(26px, 2.6vw, 38px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.035em;
    text-align: center;
}

.cg-v2-month-nav .button,
.cg-v2-add-button {
    min-height: 0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}

.cg-v2-groups {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.cg-v2-group-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cg-v2-group-heading {
    margin-bottom: 9px;
    text-align: center;
}

.cg-v2-group-heading h2 {
    margin: 0;
    color: #31594d;
    font-size: 20px;
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.cg-v2-group-heading p {
    margin: 5px 0 0;
    color: #718079;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.cg-v2-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(31, 48, 42, .08);
}

.cg-v2-table {
    width: calc(112px + (var(--cg-date-count) * 156px));
    min-width: calc(112px + (var(--cg-date-count) * 156px));
    max-width: none;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #fffdf9;
    font-family: inherit;
}

.cg-v2-table th,
.cg-v2-table td {
    text-align: center;
    vertical-align: middle;
}

.cg-v2-role-head {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    height: 66px;
    padding: 0 8px;
    background: #82b0a7;
    color: #fff;
    border: 0;
    font-size: 12px;
    font-weight: 850;
}

.cg-v2-date-head {
    width: 156px;
    min-width: 156px;
    max-width: 156px;
    height: 66px;
    padding: 8px 6px 7px;
    border: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.cg-v2-date-head:nth-child(even) { background: #365f55; }
.cg-v2-date-head:nth-child(odd) { background: #4e8176; }

.cg-v2-date-head span,
.cg-v2-date-head small {
    display: block;
    text-align: center;
}

.cg-v2-date-head small {
    margin-top: 5px;
    color: rgba(255,255,255,.5);
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.cg-v2-table tbody tr {
    height: 38px;
}

.cg-v2-role-cell {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    height: 38px;
    padding: 4px 8px;
    border-top: 1px solid #e9e2d8;
    border-right: 1px solid #eee7de;
    background: #fffdf9;
    color: #5d4d15;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
}

.cg-v2-assignment-cell {
    width: 156px;
    min-width: 156px;
    max-width: 156px;
    height: 38px;
    padding: 3px 7px;
    border-top: 1px solid #e9e2d8;
    border-right: 1px solid #eee7de;
    background: #fff8f2;
    color: #5d4d15;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
}

.cg-v2-assignment-button {
    width: 100%;
    min-height: 28px;
    padding: 0 6px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #5d4d15;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}

.cg-v2-assignment-button:hover {
    background: rgba(53, 101, 86, .07);
}

.cg-v2-assignment-button.is-empty {
    color: #b9b1a4;
}

.cg-v2-table thead th:first-child { border-top-left-radius: 10px; }
.cg-v2-table thead th:last-child { border-top-right-radius: 10px; }
.cg-v2-table tbody tr:last-child th { border-bottom-left-radius: 10px; }
.cg-v2-table tbody tr:last-child td:last-child { border-bottom-right-radius: 10px; }

.cg-v2-dialog {
    width: min(430px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fffdf9;
    color: #17271f;
    box-shadow: 0 22px 60px rgba(21, 41, 34, .24);
}

.cg-v2-dialog::backdrop {
    background: rgba(18, 31, 26, .35);
}

.cg-v2-dialog-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
}

.cg-v2-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cg-v2-dialog-head h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1;
}

.cg-v2-dialog-head .eyebrow {
    margin: 0 0 6px;
}

.cg-v2-dialog-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f0ece4;
    color: #53625c;
    font-size: 22px;
    cursor: pointer;
}

.cg-v2-dialog-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #53625c;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.cg-v2-dialog-form input,
.cg-v2-dialog-form select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #d8dfdb;
    border-radius: 9px;
    background: #fff;
    color: #17271f;
    font: inherit;
    font-size: 14px;
}

.cg-v2-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

@media (max-width: 720px) {
    .cg-v2-page {
        width: calc(100% - 20px);
        padding-top: 12px;
    }

    .cg-v2-month-nav {
        grid-template-columns: auto 1fr auto;
        width: 100%;
        gap: 6px;
    }

    .cg-v2-month-nav h1 {
        font-size: 24px;
    }

    .cg-v2-month-nav .button {
        padding: 7px 8px;
        font-size: 11px;
    }

    .cg-v2-table {
        width: calc(104px + (var(--cg-date-count) * 136px));
        min-width: calc(104px + (var(--cg-date-count) * 136px));
    }

    .cg-v2-role-head,
    .cg-v2-role-cell {
        width: 104px;
        min-width: 104px;
        max-width: 104px;
    }

    .cg-v2-date-head,
    .cg-v2-assignment-cell {
        width: 136px;
        min-width: 136px;
        max-width: 136px;
    }
}
