/* ACSP Academic Day — Show Team & Name Edit */

.team-page {
    background:
        radial-gradient(circle at 5% 14%, rgba(144, 213, 160, 0.22) 0, rgba(144, 213, 160, 0) 26%),
        radial-gradient(circle at 96% 30%, rgba(181, 22, 52, 0.06) 0, rgba(181, 22, 52, 0) 24%),
        #f2f8f4;
}

.team-hero {
    position: relative;
    padding: 55px 20px 64px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0e4f3a 0%, #176b4d 56%, #2b8c62 100%);
}

.team-hero:before {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    top: -220px;
    right: -70px;
    border: 58px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.team-hero:after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    left: -110px;
    bottom: -125px;
    background: rgba(169, 232, 111, 0.1);
    border-radius: 50%;
}

.team-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}

.team-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 11px;
    color: #ffffff;
    background: #b51634;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(64, 5, 19, 0.24);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.team-hero h1 {
    margin: 13px 0 0;
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
}

.team-hero p {
    max-width: 720px;
    margin: 10px 0 0;
    color: #dcefe5;
    font-size: 16px;
}

.team-theme-badge {
    width: 245px;
    flex: 0 0 245px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    box-shadow: 0 20px 42px rgba(3, 42, 29, 0.18);
}

.team-theme-badge strong,
.team-theme-badge span {
    display: block;
}

.team-theme-badge strong {
    width: 58px;
    padding: 5px 10px;
    color: #14593f;
    background: #dff8da;
    border-radius: 10px;
    font-size: 17px;
    letter-spacing: 0.08em;
    text-align: center;
}

.team-theme-badge span {
    margin-top: 8px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
}

.team-content {
    position: relative;
    z-index: 2;
    width: calc(100% - 40px);
    max-width: 1080px;
    margin: -30px auto 0;
    padding-bottom: 70px;
}

.team-toolbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #dfece3;
    border-radius: 17px;
    box-shadow: 0 13px 30px rgba(20, 73, 54, 0.1);
}

.team-back-link {
    color: #176b4d;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.team-back-link:hover {
    color: #a71330;
}

.team-toolbar-badge {
    padding: 7px 12px;
    color: #176b4d;
    background: #eaf6ed;
    border: 1px solid #d5eadb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.team-alert {
    margin-bottom: 16px;
    padding: 14px 17px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
}

.team-alert.success {
    color: #145b40;
    background: #e6f6ea;
    border: 1px solid #cce8d4;
}

.team-alert.error {
    color: #8d1b31;
    background: #fff0f3;
    border: 1px solid #efcbd3;
}

.team-race-card {
    position: relative;
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 18px;
    padding: 24px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(118deg, #123f31 0%, #176b4d 58%, #31845f 100%);
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(15, 73, 52, 0.18);
}

.team-race-card:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    background: linear-gradient(90deg, #a70f2d 0%, #d31f3f 28%, #ffffff 28%, #ffffff 42%, #d31f3f 42%, #9edb8f 100%);
}

.team-race-number {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
}

.team-race-number small {
    color: #d8eee2;
    font-size: 11px;
    font-weight: 700;
}

.team-race-number strong {
    color: #ffffff;
    font-size: 32px;
    line-height: 1;
}

.team-race-copy > span {
    color: #ffeaa6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
}

.team-race-copy h2 {
    margin: 5px 0 0;
    color: #ffffff;
    font-size: 25px;
    line-height: 1.45;
}

.team-race-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.team-race-meta div {
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 11px;
}

.team-race-meta small,
.team-race-meta strong {
    display: block;
}

.team-race-meta small {
    color: #bfe0cf;
    font-size: 10px;
}

.team-race-meta strong {
    color: #ffffff;
    font-size: 13px;
}

.team-summary-grid {
    display: grid;
    grid-template-columns: 160px 180px minmax(0, 1fr);
    gap: 13px;
    margin-bottom: 18px;
}

.team-summary-card,
.team-summary-note {
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #dfece3;
    border-radius: 17px;
    box-shadow: 0 10px 25px rgba(20, 73, 54, 0.07);
}

.team-summary-card span,
.team-summary-card strong,
.team-summary-note strong,
.team-summary-note span {
    display: block;
}

.team-summary-card span {
    color: #71877f;
    font-size: 12px;
    font-weight: 700;
}

.team-summary-card strong {
    margin-top: 2px;
    color: #176b4d;
    font-size: 28px;
    line-height: 1.15;
}

.team-summary-note {
    color: #5f4b05;
    background: #fff8d9;
    border-color: #eedf99;
}

.team-summary-note strong {
    font-size: 14px;
}

.team-summary-note span {
    margin-top: 3px;
    color: #79631d;
    font-size: 12px;
}

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

.team-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #dfece3;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(20, 73, 54, 0.08);
}

.team-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.team-order-box {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #176b4d, #369b6a);
    border-radius: 15px;
    box-shadow: 0 8px 18px rgba(23, 107, 77, 0.18);
}

.team-order-box small {
    font-size: 9px;
}

.team-order-box strong {
    font-size: 20px;
    line-height: 1;
}

.team-card-title {
    min-width: 0;
}

.team-card-title span {
    color: #84968f;
    font-size: 11px;
    font-weight: 700;
}

.team-card-title h3 {
    margin: 3px 0 0;
    color: #183b30;
    font-size: 18px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.team-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 17px;
}

.team-info-grid div {
    padding: 10px 12px;
    background: #f5f9f6;
    border: 1px solid #e7f0e9;
    border-radius: 12px;
}

.team-info-grid small,
.team-info-grid strong {
    display: block;
}

.team-info-grid small {
    color: #789087;
    font-size: 10px;
    font-weight: 700;
}

.team-info-grid strong {
    margin-top: 2px;
    color: #294d41;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.team-members {
    margin-top: 16px;
    padding: 14px 15px;
    background: #fafcfb;
    border: 1px solid #e7eee9;
    border-radius: 14px;
}

.team-members-heading {
    color: #176b4d;
    font-size: 12px;
    font-weight: 800;
}

.team-members ol {
    margin: 8px 0 0;
    padding-left: 25px;
}

.team-members li {
    padding: 3px 0;
    color: #294d41;
    font-size: 14px;
}

.team-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
}

.team-button {
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.team-button:hover {
    transform: translateY(-2px);
}

.team-button.print {
    color: #ffffff;
    background: #176b4d;
    box-shadow: 0 8px 18px rgba(23, 107, 77, 0.18);
}

.team-button.edit {
    color: #ffffff;
    background: #c91f3b;
    box-shadow: 0 8px 18px rgba(201, 31, 59, 0.17);
}

.team-empty-card {
    padding: 45px 25px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #dfece3;
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(20, 73, 54, 0.1);
}

.team-empty-card.compact {
    padding: 35px 25px;
}

.team-empty-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #ffffff;
    background: #176b4d;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 900;
}

.team-empty-card h2 {
    margin: 0;
    color: #174f3b;
}

.team-empty-card p {
    margin: 8px 0 20px;
    color: #71877f;
}

.team-back-button {
    display: inline-flex;
    padding: 10px 18px;
    color: #ffffff;
    background: #176b4d;
    border-radius: 12px;
    font-weight: 800;
    text-decoration: none;
}

/* Edit screen */
.edit-content {
    max-width: 880px;
}

.edit-context-card,
.phone-verify-card,
.edit-form-section {
    background: #ffffff;
    border: 1px solid #dfece3;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(20, 73, 54, 0.08);
}

.edit-context-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 15px;
    margin-bottom: 18px;
    padding: 20px;
}

.edit-context-card > span {
    grid-column: 1 / -1;
    color: #b51634;
    font-size: 11px;
    font-weight: 800;
}

.edit-context-card h2 {
    grid-column: 1 / -1;
    margin: -8px 0 3px;
    color: #174f3b;
    font-size: 22px;
}

.edit-context-card div {
    padding: 10px 12px;
    background: #f5f9f6;
    border-radius: 12px;
}

.edit-context-card small,
.edit-context-card strong {
    display: block;
}

.edit-context-card small {
    color: #789087;
    font-size: 10px;
}

.edit-context-card strong {
    color: #294d41;
    font-size: 13px;
}

.phone-verify-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 35px 30px;
    text-align: center;
}

.phone-lock-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #176b4d, #369b6a);
    border-radius: 22px;
    box-shadow: 0 12px 24px rgba(23, 107, 77, 0.2);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.phone-verify-card h2 {
    margin: 0;
    color: #174f3b;
    font-size: 24px;
}

.phone-verify-card p {
    margin: 7px 0 20px;
    color: #71877f;
}

.phone-verify-card label {
    display: block;
    margin-bottom: 8px;
    color: #294d41;
    font-size: 13px;
    font-weight: 800;
}

.phone-last4-input {
    width: 180px;
    min-height: 58px;
    display: block;
    margin: 0 auto 14px;
    padding: 10px 15px;
    color: #174f3b;
    background: #fbfefc;
    border: 2px solid #bfd8c7;
    border-radius: 14px;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-align: center;
}

.phone-last4-input:focus {
    border-color: #2b8c62;
    box-shadow: 0 0 0 4px rgba(43, 140, 98, 0.12);
    outline: none;
}

.verify-button {
    min-height: 50px;
    padding: 11px 23px;
    color: #ffffff;
    background: #176b4d;
    border: 0;
    border-radius: 13px;
    box-shadow: 0 10px 22px rgba(23, 107, 77, 0.2);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.verify-help {
    display: block;
    margin-top: 14px;
    color: #879990;
    font-size: 11px;
}

.edit-name-form {
    display: grid;
    gap: 18px;
}

.edit-form-section {
    padding: 24px;
}

.edit-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5eee8;
}

.edit-section-heading > span {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #176b4d, #369b6a);
    border-radius: 13px;
    font-size: 12px;
    font-weight: 900;
}

.edit-section-heading h2 {
    margin: 0;
    color: #174f3b;
    font-size: 20px;
}

.edit-section-heading p {
    margin: 3px 0 0;
    color: #71877f;
    font-size: 12px;
}

.edit-name-form label {
    display: block;
    margin-bottom: 7px;
    color: #294d41;
    font-size: 13px;
    font-weight: 800;
}

.edit-name-form input[type="text"],
.edit-name-form select {
    width: 100%;
    min-height: 47px;
    padding: 10px 13px;
    color: #183b30;
    background: #ffffff;
    border: 1px solid #cfded4;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
}

.edit-name-form input[type="text"]:focus,
.edit-name-form select:focus {
    border-color: #2b8c62;
    box-shadow: 0 0 0 4px rgba(43, 140, 98, 0.12);
    outline: none;
}

.edit-member-list {
    display: grid;
    gap: 15px;
}

.edit-member-card {
    min-width: 0;
    margin: 0;
    padding: 18px;
    background: #f7faf8;
    border: 1px solid #dfeae3;
    border-radius: 16px;
}

.edit-member-card legend {
    padding: 5px 11px;
    color: #176b4d;
    background: #e6f3ea;
    border: 1px solid #d1e7d8;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.edit-grid {
    display: grid;
    gap: 14px;
}

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

.edit-grid.name {
    grid-template-columns: 135px minmax(0, 1fr) minmax(0, 1fr);
}

.edit-notice {
    padding: 15px 18px;
    color: #5f4b05;
    background: #fff8d9;
    border: 1px solid #eedf99;
    border-radius: 14px;
    font-size: 13px;
}

.edit-submit-row {
    display: flex;
    justify-content: flex-end;
    gap: 11px;
}

.edit-cancel-button,
.edit-save-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 13px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.edit-cancel-button {
    color: #536a62;
    background: #ffffff;
    border: 1px solid #d3e0d7;
}

.edit-save-button {
    min-width: 220px;
    color: #ffffff;
    background: #176b4d;
    border: 0;
    box-shadow: 0 10px 22px rgba(23, 107, 77, 0.2);
}

@media (max-width: 820px) {
    .team-hero-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .team-theme-badge {
        width: 100%;
        flex-basis: auto;
    }

    .team-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-summary-note {
        grid-column: 1 / -1;
    }

    .team-list {
        grid-template-columns: 1fr;
    }

    .edit-grid.name {
        grid-template-columns: 135px minmax(0, 1fr);
    }

    .edit-grid.name > div:last-child {
        grid-column: 2;
    }
}

@media (max-width: 620px) {
    .team-hero {
        padding: 44px 14px 56px;
    }

    .team-hero h1 {
        font-size: 31px;
    }

    .team-content {
        width: calc(100% - 28px);
        margin-top: -22px;
    }

    .team-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .team-race-card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 15px;
        padding: 19px;
    }

    .team-race-number {
        min-height: 72px;
    }

    .team-race-copy h2 {
        font-size: 20px;
    }

    .team-race-meta {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
    }

    .team-summary-grid,
    .team-info-grid,
    .team-actions,
    .edit-context-card,
    .edit-grid.two,
    .edit-grid.name {
        grid-template-columns: 1fr;
    }

    .edit-grid.name > div:last-child {
        grid-column: auto;
    }

    .team-card,
    .edit-form-section,
    .phone-verify-card {
        padding: 19px 16px;
    }

    .edit-context-card > span,
    .edit-context-card h2 {
        grid-column: auto;
    }

    .edit-submit-row {
        flex-direction: column-reverse;
    }

    .edit-cancel-button,
    .edit-save-button {
        width: 100%;
    }
}
