/* ==========================================================================
   GAMING GARAGE UTDI - TAHAP 2-3 AUTH, APP SHELL & AKUN
   Palet mengikuti css/styles.css yang sudah ada.
   ========================================================================== */

[hidden] {
    display: none !important;
}

body {
    font-family: 'Inter', sans-serif;
}

/* --- Auth page shell --- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-topbar {
    border-bottom: 1px solid rgba(236, 232, 225, 0.1);
    background: rgba(15, 25, 35, 0.86);
    backdrop-filter: blur(14px);
}

.auth-topbar-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #ECE8E1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.auth-brand:hover {
    color: #FF4655;
}

.auth-brand-mark,
.app-brand-mark {
    position: relative;
    display: inline-block;
    border-radius: 3px;
    border: 1px solid rgba(255, 70, 85, 0.55);
    background: rgba(83, 33, 43, 0.5);
}

.auth-brand-mark {
    width: 1.5rem;
    height: 1.5rem;
}

.auth-brand-mark::after,
.app-brand-mark::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid #FF4655;
}

.auth-topbar-link {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #768079;
}

.auth-topbar-link:hover {
    color: #ECE8E1;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    padding: 2rem;
    border-top: 2px solid #FF4655;
}

.auth-card--wide {
    max-width: 36rem;
}

.auth-kicker {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #FF4655;
}

.auth-title {
    margin-top: 0.5rem;
    font-size: 1.75rem;
    line-height: 1.1;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: #fff;
}

.auth-subtitle {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #768079;
}

.auth-form {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(236, 232, 225, 0.72);
}

.auth-input {
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(236, 232, 225, 0.16);
    background: #0B1015;
    color: #ECE8E1;
    padding: 0.7rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: #5f6a64;
}

.auth-input:focus {
    outline: none;
    border-color: #FF4655;
    box-shadow: 0 0 0 3px rgba(255, 70, 85, 0.14);
}

.auth-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-input[aria-invalid="true"] {
    border-color: #FF4655;
}

select.auth-input {
    appearance: none;
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23768079' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
}

select.auth-input option {
    background: #0B1015;
    color: #ECE8E1;
}

.auth-hint {
    margin-top: 0.35rem;
    font-size: 10px;
    line-height: 1.5;
    color: #768079;
}

.auth-field-error {
    min-height: 1rem;
    margin-top: 0.3rem;
    font-size: 11px;
    line-height: 1.4;
    color: #FF8A94;
}

.auth-status {
    border-radius: 4px;
    border: 1px solid rgba(236, 232, 225, 0.16);
    padding: 0.7rem 0.85rem;
    font-size: 0.78rem;
    line-height: 1.5;
}

.auth-status[data-kind="error"] {
    border-color: rgba(255, 70, 85, 0.55);
    background: rgba(255, 70, 85, 0.09);
    color: #FFB3BA;
}

.auth-status[data-kind="info"] {
    border-color: rgba(75, 232, 255, 0.4);
    background: rgba(75, 232, 255, 0.07);
    color: #B9F6FF;
}

.auth-status[data-kind="success"] {
    border-color: rgba(26, 231, 128, 0.4);
    background: rgba(26, 231, 128, 0.08);
    color: #B7FFD7;
}

.auth-submit {
    margin-top: 0.25rem;
    width: 100%;
    border: 0;
    border-radius: 4px;
    background: #FF4655;
    color: #fff;
    padding: 0.8rem 1rem;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 85% 100%, 0 100%);
}

.auth-submit:hover:not(:disabled) {
    background: #FD4556;
    box-shadow: 0 0 24px rgba(255, 70, 85, 0.35);
}

.auth-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-switch {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(236, 232, 225, 0.1);
    font-size: 0.8rem;
    color: #768079;
    text-align: center;
}

.auth-switch a {
    color: #FF4655;
    font-weight: 600;
}

.auth-switch a:hover {
    color: #fff;
}

.auth-note {
    margin-top: 1rem;
    font-size: 10px;
    line-height: 1.6;
    color: #768079;
}

.auth-grid-two {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .auth-card {
        padding: 2.5rem;
    }

    .auth-title {
        font-size: 2rem;
    }

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

/* --- App shell --- */
.app-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    border-bottom: 1px solid rgba(236, 232, 225, 0.1);
    background: rgba(15, 25, 35, 0.9);
    backdrop-filter: blur(14px);
}

.app-header-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #ECE8E1;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.app-brand:hover {
    color: #FF4655;
}

.app-brand-mark {
    width: 1.35rem;
    height: 1.35rem;
}

.app-brand-mark::after {
    inset: 3px;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-user {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.2;
}

.app-user-name {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ECE8E1;
}

.app-user-role {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #FF4655;
}

.app-logout {
    border: 1px solid rgba(255, 70, 85, 0.55);
    background: transparent;
    color: #FF4655;
    border-radius: 3px;
    padding: 0.45rem 0.75rem;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.app-logout:hover:not(:disabled) {
    background: #FF4655;
    color: #fff;
}

.app-logout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.app-main {
    flex: 1;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.app-main--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.app-main > .auth-status {
    margin-bottom: 1rem;
}

.app-main--center > .auth-status {
    margin-bottom: 0;
}

.app-title {
    font-size: 2rem;
    line-height: 1.05;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: #fff;
}

.app-waiting-card {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: 2rem;
    border-top: 2px solid #FF4655;
}

.app-waiting-title {
    margin-top: 0.5rem;
    font-size: 1.6rem;
    line-height: 1.15;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    color: #fff;
}

.app-waiting-text {
    margin-top: 1rem;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #768079;
}

.app-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #768079;
    font-size: 0.8rem;
}

.app-spinner {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid rgba(236, 232, 225, 0.15);
    border-top-color: #FF4655;
    animation: app-spin 0.8s linear infinite;
}

@keyframes app-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Tahap 3: navigasi aplikasi dan halaman akun --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.app-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid transparent;
    color: #768079;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.app-nav-link:hover,
.app-nav-link[aria-current="page"] {
    color: #ECE8E1;
    border-bottom-color: #FF4655;
}

.app-main--wide {
    max-width: 90rem;
}

.app-kicker {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #FF4655;
}

.app-subtitle {
    margin-top: 0.55rem;
    max-width: 44rem;
    color: #768079;
    font-size: 0.82rem;
    line-height: 1.65;
}

.app-muted {
    color: #768079;
    font-size: 0.75rem;
    line-height: 1.55;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.page-heading .app-title {
    margin-top: 0.3rem;
}

.app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.3rem;
    border: 1px solid rgba(236, 232, 225, 0.22);
    border-radius: 3px;
    background: transparent;
    color: #ECE8E1;
    padding: 0.55rem 0.9rem;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
        opacity 0.2s ease;
}

.app-button:hover:not(:disabled) {
    border-color: rgba(236, 232, 225, 0.55);
    background: rgba(236, 232, 225, 0.06);
}

.app-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.app-button--primary {
    border-color: #FF4655;
    background: #FF4655;
    color: #fff;
}

.app-button--primary:hover:not(:disabled) {
    border-color: #FD4556;
    background: #FD4556;
    box-shadow: 0 0 24px rgba(255, 70, 85, 0.28);
}

.app-button--secondary {
    border-color: rgba(75, 232, 255, 0.38);
    color: #B9F6FF;
}

.app-button--secondary:hover:not(:disabled) {
    border-color: rgba(75, 232, 255, 0.7);
    background: rgba(75, 232, 255, 0.07);
}

.app-button--danger {
    border-color: rgba(255, 70, 85, 0.65);
    color: #FFB3BA;
}

.app-button--danger:hover:not(:disabled) {
    border-color: #FF4655;
    background: rgba(255, 70, 85, 0.14);
    color: #fff;
}

.app-button--small {
    min-height: 1.85rem;
    padding: 0.35rem 0.55rem;
    font-size: 9px;
    letter-spacing: 0.1em;
}

.app-button:focus-visible,
.app-nav-link:focus-visible,
.filter-button:focus-visible,
.auth-inline-link:focus-visible {
    outline: 2px solid #B9F6FF;
    outline-offset: 2px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    border: 1px solid rgba(236, 232, 225, 0.12);
    border-top: 2px solid rgba(255, 70, 85, 0.7);
    border-radius: 3px;
    background: rgba(15, 25, 35, 0.78);
    padding: 0.9rem 1rem;
}

.stat-label {
    display: block;
    color: #768079;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.stat-value {
    display: block;
    margin-top: 0.25rem;
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
}

.panel {
    border: 1px solid rgba(236, 232, 225, 0.12);
    border-radius: 4px;
    background: rgba(15, 25, 35, 0.82);
    padding: 1.5rem;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-title {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.panel-heading .app-muted {
    margin-top: 0.3rem;
}

.account-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.account-filters {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.filter-button {
    border: 1px solid rgba(236, 232, 225, 0.16);
    border-radius: 3px;
    background: transparent;
    color: #768079;
    padding: 0.45rem 0.7rem;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

.filter-button:hover {
    color: #ECE8E1;
    border-color: rgba(236, 232, 225, 0.42);
}

.filter-button[aria-pressed="true"] {
    border-color: #FF4655;
    background: rgba(255, 70, 85, 0.12);
    color: #fff;
}

.account-search {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: min(20rem, 100%);
    flex: 1;
}

.account-search > span {
    color: rgba(236, 232, 225, 0.72);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(236, 232, 225, 0.1);
    border-radius: 3px;
}

.app-table {
    width: 100%;
    min-width: 58rem;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.app-table th {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid rgba(236, 232, 225, 0.14);
    background: rgba(11, 16, 21, 0.75);
    color: #768079;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-table td {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid rgba(236, 232, 225, 0.08);
    vertical-align: middle;
    color: #ECE8E1;
}

.app-table tbody tr:last-child td {
    border-bottom: 0;
}

.app-table tbody tr:hover {
    background: rgba(236, 232, 225, 0.025);
}

.app-table td .app-muted {
    display: block;
    margin-top: 0.1rem;
}

.account-person {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 13rem;
}

.account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(145deg, #FF4655, #53212B);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.account-avatar--large {
    width: 4.25rem;
    height: 4.25rem;
    font-size: 1.15rem;
}

.account-name {
    display: block;
    color: #ECE8E1;
    font-size: 0.82rem;
    font-weight: 600;
}

.app-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(236, 232, 225, 0.18);
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    color: #ECE8E1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill::before {
    content: "";
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: currentColor;
}

.status-pill[data-status="pending"] {
    background: rgba(255, 196, 0, 0.1);
    color: #FFD66B;
}

.status-pill[data-status="active"] {
    background: rgba(26, 231, 128, 0.1);
    color: #8FFFC5;
}

.status-pill[data-status="inactive"] {
    background: rgba(118, 128, 121, 0.14);
    color: #A9B3AD;
}

.table-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.empty-state {
    border: 1px dashed rgba(236, 232, 225, 0.18);
    border-radius: 3px;
    padding: 1.25rem;
    color: #768079;
    font-size: 0.8rem;
    text-align: center;
}

.account-footnote {
    margin-top: 0.75rem;
}

.app-grid-two {
    display: grid;
    gap: 0.85rem;
}

.app-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.app-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.app-dialog {
    width: min(32rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 1px solid rgba(236, 232, 225, 0.16);
    border-top: 2px solid #FF4655;
    border-radius: 5px;
    background: #0F1923;
    color: #ECE8E1;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    color-scheme: dark;
}

.app-dialog--wide {
    width: min(42rem, calc(100vw - 2rem));
}

.app-dialog::backdrop {
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(3px);
}

.app-dialog-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.4rem;
    overflow-y: auto;
    max-height: calc(100vh - 2rem);
}

.dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(236, 232, 225, 0.16);
    border-radius: 3px;
    background: transparent;
    color: #768079;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.dialog-close:hover {
    color: #fff;
    border-color: rgba(236, 232, 225, 0.4);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.app-dialog-message {
    color: #B8C0BB;
    font-size: 0.82rem;
    line-height: 1.65;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.profile-card {
    padding: 1.5rem;
    border-top: 2px solid #FF4655;
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-name {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.45rem;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(236, 232, 225, 0.1);
}

.profile-details dt {
    color: #768079;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.profile-details dd {
    margin-top: 0.2rem;
    color: #ECE8E1;
    font-size: 0.82rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.profile-privacy {
    margin-top: 1.25rem;
}

.profile-edit-panel .auth-status {
    margin-bottom: 1rem;
}

.auth-inline-link {
    display: inline-block;
    margin-top: 0.3rem;
    color: #FF8A94;
    font-size: 11px;
    font-weight: 600;
}

.auth-inline-link:hover {
    color: #fff;
}

.auth-loading {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .app-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 899px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-header-inner {
        justify-content: space-between;
    }

    .app-brand {
        order: 1;
    }

    .app-header-actions {
        order: 2;
    }

    .app-nav {
        order: 3;
        width: 100%;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(236, 232, 225, 0.08);
    }

    .table-scroll {
        overflow: visible;
        border: 0;
    }

    .app-table {
        min-width: 0;
    }

    .app-table thead {
        display: none;
    }

    .app-table,
    .app-table tbody,
    .app-table tr,
    .app-table td {
        display: block;
        width: 100%;
    }

    .app-table tr {
        margin-bottom: 0.75rem;
        border: 1px solid rgba(236, 232, 225, 0.12);
        border-radius: 4px;
        background: rgba(11, 16, 21, 0.35);
        padding: 0.65rem 0.75rem;
    }

    .app-table td {
        display: grid;
        grid-template-columns: 6.5rem minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.35rem 0;
        border: 0;
    }

    .app-table td::before {
        content: attr(data-label);
        color: #768079;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        padding-top: 0.15rem;
    }

    .app-table td .app-muted {
        display: inline;
        margin-left: 0.25rem;
    }

    .account-person {
        min-width: 0;
    }
}

@media (max-width: 639px) {
    .app-header-inner {
        padding: 0.75rem 1rem;
    }

    .app-user {
        text-align: left;
    }

    .app-user-name {
        max-width: 11rem;
    }

    .app-main {
        padding: 2rem 1rem;
    }

    .app-title {
        font-size: 1.65rem;
    }

    .app-waiting-card {
        padding: 1.5rem;
    }

    .panel,
    .profile-card {
        padding: 1.1rem;
    }

    .stat-card {
        padding: 0.75rem 0.85rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .app-dialog-form {
        padding: 1.1rem;
    }

    .profile-details {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------------------- */
/* Tahap 4: presensi (sesi, detail, QR, check-in)                          */
/* ----------------------------------------------------------------------- */

.app-panel {
    border: 1px solid rgba(236, 232, 225, 0.12);
    border-radius: 4px;
    background: rgba(15, 25, 35, 0.78);
    padding: 1.2rem 1.3rem;
}

.app-empty {
    border: 1px dashed rgba(236, 232, 225, 0.2);
    border-radius: 4px;
    padding: 1.6rem;
    text-align: center;
    color: rgba(236, 232, 225, 0.7);
}

.app-back {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.app-back a {
    color: #B9F6FF;
    text-decoration: none;
}

.app-back a:hover {
    text-decoration: underline;
}

.auth-field-hint {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: rgba(236, 232, 225, 0.6);
}

.auth-field--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #ECE8E1;
}

.auth-field--checkbox input {
    width: auto;
}

.app-button--block {
    width: 100%;
}

/* Daftar sesi */
.session-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.session-card {
    border: 1px solid rgba(236, 232, 225, 0.12);
    border-left: 3px solid rgba(255, 70, 85, 0.7);
    border-radius: 4px;
    background: rgba(15, 25, 35, 0.78);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.session-card:hover {
    border-color: rgba(75, 232, 255, 0.4);
    background: rgba(15, 25, 35, 0.92);
}

.session-card-link {
    display: block;
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
}

.session-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.session-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.session-card-meta {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: rgba(236, 232, 225, 0.72);
}

.session-card-time {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: rgba(185, 246, 255, 0.85);
}

/* Badge status sesi */
.session-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(236, 232, 225, 0.3);
    color: rgba(236, 232, 225, 0.8);
}

.session-badge[data-status="open"] {
    border-color: rgba(26, 231, 128, 0.6);
    background: rgba(26, 231, 128, 0.12);
    color: #7CFFB2;
}

.session-badge[data-status="closed"] {
    border-color: rgba(236, 232, 225, 0.25);
    background: rgba(236, 232, 225, 0.05);
    color: rgba(236, 232, 225, 0.75);
}

.session-badge[data-status="pending"] {
    border-color: rgba(255, 196, 0, 0.5);
    background: rgba(255, 196, 0, 0.1);
    color: #FFD66B;
}

.session-badge[data-status="verified"] {
    border-color: rgba(26, 231, 128, 0.6);
    background: rgba(26, 231, 128, 0.12);
    color: #7CFFB2;
}

.session-badge[data-status="rejected"] {
    border-color: rgba(255, 92, 92, 0.55);
    background: rgba(255, 92, 92, 0.12);
    color: #FF9F9F;
}

/* Detail sesi */
.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.2rem;
    align-items: start;
}

.detail-list {
    margin: 0.8rem 0 0;
    display: grid;
    gap: 0.6rem;
}

.detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(236, 232, 225, 0.08);
    padding-bottom: 0.5rem;
}

.detail-list dt {
    color: rgba(236, 232, 225, 0.6);
    font-size: 0.82rem;
}

.detail-list dd {
    margin: 0;
    color: #ECE8E1;
    font-size: 0.86rem;
    text-align: right;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

/* QR */
.qr-box {
    margin: 0.9rem auto;
    width: 100%;
    max-width: 16rem;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 6px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-box svg {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.qr-code-text {
    margin-top: 0.7rem;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    color: #B9F6FF;
    word-break: break-all;
}

/* Check-in */
.app-page--narrow .app-main {
    max-width: 30rem;
}

.checkin-card {
    text-align: left;
}

.checkin-result {
    margin-top: 1rem;
    border: 1px solid rgba(26, 231, 128, 0.4);
    border-radius: 4px;
    background: rgba(26, 231, 128, 0.08);
    padding: 1rem;
}

.checkin-result-status {
    margin: 0;
    font-weight: 800;
    color: #7CFFB2;
}

.checkin-result-detail {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: rgba(236, 232, 225, 0.82);
}

@media (max-width: 720px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Tahap 5: rekap presensi dan tabel */
.recap-panel {
    margin-top: 1.2rem;
}

.recap-subtitle {
    margin: 1.1rem 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(185, 246, 255, 0.85);
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid rgba(236, 232, 225, 0.1);
    border-radius: 4px;
}

.recap-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 36rem;
}

.recap-table th,
.recap-table td {
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(236, 232, 225, 0.08);
}

.recap-table th {
    background: rgba(15, 25, 35, 0.95);
    color: rgba(236, 232, 225, 0.7);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: sticky;
    top: 0;
}

.recap-table tbody tr:hover {
    background: rgba(236, 232, 225, 0.03);
}

.recap-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.recap-tab[aria-selected="true"] {
    border-color: #FF4655;
    background: rgba(255, 70, 85, 0.12);
    color: #fff;
}

.attendance-summary {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0.3rem 0 1rem;
}

.attendance-percent {
    font-size: 2rem;
    font-weight: 900;
    color: #7CFFB2;
}

/* Catatan pelatih (Tahap 7) */
.coach-note-block {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(236, 232, 225, 0.18);
}

.coach-note-list {
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: rgba(236, 232, 225, 0.85);
}

.coach-note-list--general {
    font-size: 0.92rem;
}

.coach-note-section {
    margin-top: 1.5rem;
}

/* Grafik performa (radar dan tren, SVG buatan sendiri) */
.perf-chart {
    width: 100%;
    height: auto;
    display: block;
}

.perf-chart-label {
    font-size: 10px;
    fill: rgba(236, 232, 225, 0.85);
}

.perf-chart-axis {
    font-size: 10px;
    fill: rgba(236, 232, 225, 0.6);
}

.perf-radar-ring {
    fill: none;
    stroke: rgba(236, 232, 225, 0.16);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.perf-radar-baseline {
    fill: none;
    stroke: rgba(236, 232, 225, 0.45);
    stroke-width: 1.2;
}

.perf-radar-axis {
    stroke: rgba(236, 232, 225, 0.22);
    stroke-width: 1;
}

.perf-radar-data {
    fill: rgba(255, 70, 85, 0.22);
    stroke: #FF4655;
    stroke-width: 2;
    stroke-linejoin: round;
}

.perf-trend-line {
    fill: none;
    stroke: #7CFFB2;
    stroke-width: 2;
    stroke-linejoin: round;
}

.perf-trend-point {
    fill: #7CFFB2;
}


/* ---------------------------------------------------------------------------
   Tahap 8: halaman /konten
   --------------------------------------------------------------------------- */

.app-panel--inner {
    margin-top: 1.2rem;
    padding: 1rem 1.1rem;
    background: rgba(11, 16, 21, 0.55);
    border-color: rgba(236, 232, 225, 0.08);
}

.app-panel--inner .app-panel--inner {
    margin-top: 0.9rem;
}

.app-table-subtext {
    display: block;
    margin-top: 0.15rem;
    color: #768079;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

[data-form-status][data-kind="success"] {
    color: #7CFFB2;
}

/* ---------------------------------------------------------------------------
   Tahap 9: jadwal dan pengumuman
   --------------------------------------------------------------------------- */

.schedule-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem;
}

.schedule-participants {
    margin: 0;
    border: 1px solid rgba(236, 232, 225, 0.12);
    border-radius: 4px;
    padding: 0.8rem 0.9rem;
    display: grid;
    gap: 0.6rem;
}

.schedule-participants legend {
    padding: 0 0.35rem;
}

.participant-list {
    display: grid;
    gap: 0.35rem;
    max-height: 14rem;
    overflow-y: auto;
}

.participant-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(236, 232, 225, 0.85);
}

.participant-option input {
    margin-top: 0.15rem;
}

.announcement-body {
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
    line-height: 1.65;
    color: rgba(236, 232, 225, 0.85);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------------
   Tahap 10: inventaris dan peminjaman
   --------------------------------------------------------------------------- */

.return-list {
    display: grid;
    gap: 0.75rem;
}

.return-item {
    display: grid;
    gap: 0.3rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(236, 232, 225, 0.12);
    border-radius: 4px;
    background: rgba(11, 16, 21, 0.35);
}

.return-item-name {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------------------
   Tahap 11: arsip dan laporan
   --------------------------------------------------------------------------- */

.archive-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 639px) {
    .archive-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------------------------------------------------------------------------
   Tahap 12: dashboard Dosen dan log aktivitas
   --------------------------------------------------------------------------- */

.dosen-archive-list {
    display: grid;
    gap: 0.6rem;
}

.dosen-archive-item {
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(236, 232, 225, 0.1);
    border-radius: 4px;
    background: rgba(11, 16, 21, 0.28);
}

.dosen-archive-title {
    margin: 0 0 0.2rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.trend-up {
    color: #7ee2b8;
}

.trend-down {
    color: #ff8d98;
}

.trend-stable {
    color: rgba(236, 232, 225, 0.75);
}

/* =========================================================================
   Perbaikan 1: Hamburger + Drawer (Tugas 1)
   ========================================================================= */

/* Header tidak wrap lagi — satu baris */
.app-header-inner {
    flex-wrap: nowrap;
    align-items: center;
}

/* Reset text-decoration untuk tautan di area app */
a.app-brand,
a.app-drawer-link,
a.app-nav-link,
a.app-button,
.app-main a.app-button,
.app-header a {
    text-decoration: none;
}

/* Tombol hamburger */
.app-hamburger {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #ECE8E1;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: color 0.2s ease, background 0.2s ease;
}

.app-hamburger:hover {
    color: #FF4655;
    background: rgba(255, 70, 85, 0.07);
}

.app-hamburger:focus-visible {
    outline: 2px solid #B9F6FF;
    outline-offset: 2px;
}

/* Overlay drawer */
.app-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Drawer panel */
.app-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    height: 100%;
    width: 17rem;
    max-width: 85vw;
    background: #0F1923;
    border-right: 1px solid rgba(236, 232, 225, 0.12);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.app-drawer.is-open {
    transform: translateX(0);
}

/* Header drawer */
.app-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(236, 232, 225, 0.1);
    flex-shrink: 0;
}

.app-drawer-brand-text {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #ECE8E1;
}

.app-drawer-username {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: #768079;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 10rem;
}

/* Tombol tutup drawer */
.app-drawer-close {
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: #768079;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.app-drawer-close:hover {
    color: #ECE8E1;
    background: rgba(236, 232, 225, 0.07);
}

.app-drawer-close:focus-visible {
    outline: 2px solid #B9F6FF;
    outline-offset: 2px;
}

/* Nav dalam drawer */
.app-drawer-nav {
    padding: 0.75rem 0;
    flex: 1;
}

.app-drawer-group {
    margin-bottom: 0.25rem;
}

.app-drawer-group-label {
    margin: 0;
    padding: 0.5rem 1.25rem 0.3rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #768079;
}

.app-drawer-link {
    display: block;
    padding: 0.6rem 1.25rem;
    padding-left: calc(1.25rem + 2px);  /* kompensasi border kiri */
    color: rgba(236, 232, 225, 0.75);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
    border-left: 2px solid transparent;
}

.app-drawer-link:hover {
    color: #ECE8E1;
    background: rgba(236, 232, 225, 0.05);
}

.app-drawer-link[aria-current="page"] {
    background: rgba(255, 70, 85, 0.1);
    color: #FF4655;
    border-left-color: #FF4655;
    padding-left: 1.25rem;
}

.app-drawer-link:focus-visible {
    outline: 2px solid #B9F6FF;
    outline-offset: -2px;
}

/* Layar sangat sempit: potong nama di header */
@media (max-width: 479px) {
    .app-user-name {
        max-width: 6rem;
    }
}

/* =========================================================================
   Perbaikan 1: Bug Luapan dan Grup Aksi (Tugas 2)
   ========================================================================= */

/* Pastikan grup aksi dan header halaman fleksibel membungkus baris baru */
.page-heading {
    flex-wrap: wrap;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-width: 0;
}

/* Tombol tidak boleh menyusut melewati konten dan tidak bergaris bawah */
.app-button {
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

a.app-button {
    text-decoration: none;
}

