body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px;
}

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-header h2 {
    margin: 0;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-user-line {
    font-size: 12px;
    color: #475569;
    line-height: 1.2;
}

.dashboard-logout-btn {
    width: auto;
    margin: 0;
}

.tabs-card {
    padding: 12px;
}

.tab-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-button {
    width: auto;
    margin: 0;
    margin-bottom: 0;
}

.tab-button.active {
    background: #1e3a8a;
}

h1, h2 {
    margin-top: 0;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

input, select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 12px;
}

button,
.tab-button,
.inline-buttons a {
    width: auto;
    display: inline-block;
    margin-bottom: 12px;
    font-size: 1rem;
    background: #1d4ed8;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.tab-button:hover,
.inline-buttons a:hover {
    background: #1e40af;
}

.inline-buttons {
    display: flex;
    gap: 12px;
}

.inline-buttons a {
    margin-bottom: 0;
}

.form-home-link {
    margin: 0 0 10px;
}

.form-home-link a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 400;
}

.form-home-link a:hover {
    text-decoration: underline;
}

a.form-home-link-anchor {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

a.form-home-link-anchor:hover {
    text-decoration: underline;
}

.notice {
    padding: 10px;
    border-radius: 8px;
    margin-top: 12px;
}

.section-gap-top {
    margin-top: 16px;
}

.notice.ok {
    background: #dcfce7;
    color: #166534;
}

.notice.error {
    background: #fee2e2;
    color: #991b1b;
}

table {
    border-collapse: collapse;
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
}

th,
td {
    border: 1px solid #cbd5e1;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #e2e8f0;
}

.name-column {
    white-space: normal;
    overflow-wrap: anywhere;
}

.today-column {
    background: #fff6bf;
}

label input[type="radio"] {
    width: auto;
    margin: 0 4px 0 0;
}

input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.attendance-save-indicator {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: #64748b;
    min-width: 70px;
}

.attendance-save-indicator.saving {
    color: #0f172a;
}

.attendance-save-indicator.saved {
    color: #166534;
}

.attendance-save-indicator.error {
    color: #991b1b;
}

.attendance-table th:first-child,
.attendance-table td:first-child {
    white-space: nowrap;
    overflow-wrap: normal;
}

#trainer-admin-login-row{
text-align: right;
}

.overview-page h2 {
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .overview-lessons-table tr:first-child {
        display: none;
    }

    .attendance-table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .attendance-table th:first-child,
    .attendance-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #fff;
        white-space: nowrap;
        overflow-wrap: normal;
    }

    .attendance-table.has-horizontal-scroll th:first-child,
    .attendance-table.has-horizontal-scroll td:first-child {
        box-shadow: 6px 0 8px -6px rgba(15, 23, 42, 0.25);
    }

    .attendance-table th:first-child {
        background: #e2e8f0;
        z-index: 3;
    }

    .mobile-stack-table {
        width: 100%;
        max-width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .mobile-stack-table tr:first-child {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .mobile-stack-table tr {
        display: block;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        margin-bottom: 1.5rem;
        background: #fff;
    }

    .mobile-stack-table td {
        display: grid;
        grid-template-columns: minmax(110px, max-content) 1fr;
        gap: 8px;
        border: 0;
        border-bottom: 1px solid #e2e8f0;
        padding: 8px 10px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .mobile-stack-table td:last-child {
        border-bottom: 0;
    }

    .mobile-stack-table tr td:first-child {
        font-weight: 700;
    }

    .mobile-stack-table tr td:first-child::before {
        font-weight: 600;
    }

    .mobile-stack-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #334155;
        display:none;
    }
}
