body {
    font-family: Arial, sans-serif;
    background: #4FC3F7;
    margin: 0;
    padding: 0;
}

.tb-container {
    max-width: 820px;
    margin: 20px auto;
    background: #4FC3F7;
    padding: 16px 4px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tb-header {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    background: #81C784;
    padding: 10px;
    border-radius: 8px;
    color: #000;
}

.tb-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tb-field {
    display: flex;
    flex-direction: column;
}

.tb-field label {
    font-size: 13px;
    color: #000;
    margin-bottom: 4px;
}

.tb-field input,
.tb-field select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #c9def5;
    background: #d8eaff;
    min-width: 160px;
}

.tb-field-small input,
.tb-field-small select {
    min-width: 56px;
    width: 56px;
}

.tb-field-date input {
    min-width: 90px;
    width: 90px;
}

.tb-field-course {
    flex: 1 1 50%;
    max-width: 50%;
}

.tb-field-course select {
    width: 100%;
    min-width: 160px;
}

.tb-btn {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: #FFF176;
    color: #000;
    font-weight: 600;
    cursor: pointer;
}

.tb-btn:hover {
    background: #FFE082;
}

.tb-status {
    margin-top: 8px;
    color: #065f46;
    font-weight: 600;
}

.tb-table {
    margin-top: 12px;
    background: #4FC3F7;
    border-radius: 8px;
    overflow: auto;
    width: 100%;
    max-height: 60vh;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.tb-table-grid {
    border-collapse: collapse;
    table-layout: fixed;
    --col-name: 100px;
    --col-index: 50px;
    --col-tee: 85px;
    --col-hdcp: 60px;
    --col-team: 60px;
    width: calc(
        var(--col-name)
        + var(--col-index)
        + var(--col-tee)
        + var(--col-hdcp)
        + var(--col-team)
    );
    min-width: calc(
        var(--col-name)
        + var(--col-index)
        + var(--col-tee)
        + var(--col-hdcp)
        + var(--col-team)
    );
    box-sizing: border-box;
}

.tb-table-grid th,
.tb-table-grid td {
    padding: 6px 4px;
    border-right: 1px solid #000;
    text-align: center;
    font-size: 14px;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.tb-table-grid td.col.name {
    cursor: pointer;
}

.tb-table-grid thead th {
    background: #9e9e9e;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 2;
}

.tb-table-grid tbody tr:nth-child(even) td {
    background: #81C784;
}

.tb-table-grid tbody tr:nth-child(odd) td {
    background: #FFF176;
}

.tb-table-grid .col.name,
.tb-table-grid .col-name {
    width: var(--col-name);
    text-align: left;
    padding-left: 8px;
    position: sticky;
    left: 0;
    z-index: 3;
}
.tb-table-grid .col.index,
.tb-table-grid .col-index { width: var(--col-index); }
.tb-table-grid .col.tee,
.tb-table-grid .col-tee { width: var(--col-tee); }
.tb-table-grid .col.hdcp,
.tb-table-grid .col-hdcp { width: var(--col-hdcp); }
.tb-table-grid .col.team,
.tb-table-grid .col-team { width: var(--col-team); }
.tb-table-grid .col.team,
.tb-table-grid .col-team { border-right: none; }

.tb-table-grid thead th.col.name,
.tb-table-grid thead th.col-name {
    z-index: 4;
}

.tb-table-grid tbody tr:nth-child(even) td.col.name,
.tb-table-grid tbody tr:nth-child(even) td.col-name {
    background: #81C784;
}

.tb-table-grid tbody tr:nth-child(odd) td.col.name,
.tb-table-grid tbody tr:nth-child(odd) td.col-name {
    background: #FFF176;
}

.tb-tooltip {
    position: absolute;
    background: #111;
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    max-width: 260px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 5;
    display: none;
    pointer-events: none;
}

.tb-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.tb-modal.hidden {
    display: none;
}

.tb-modal-content {
    background: #4FC3F7;
    padding: 16px;
    border-radius: 10px;
    width: min(90vw, 360px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    border: 1px solid #000;
}

.tb-modal-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
    background: #81C784;
    padding: 6px 8px;
    border-radius: 6px;
}

.tb-modal-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.tb-modal-row label {
    font-size: 13px;
    font-weight: 600;
    color: #000;
}

.tb-modal-row select {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #c9def5;
    background: #d8eaff;
}

.tb-modal-value {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #c9def5;
    background: #e3f2fd;
    font-weight: 700;
    color: #000;
}

.tb-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
}
