:root {
    --brand-red: #e32636;
    --brand-black: #000000;
    --brand-white: #ffffff;
    --link-color: #7fd6ff;
    --link-hover-color: #b7ecff;
    --page-bg: #060606;
    --panel-bg: rgba(16, 16, 16, 0.92);
    --panel-border: rgba(255, 255, 255, 0.08);
    --muted-text: rgba(255, 255, 255, 0.72);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--brand-white);
    background:
        radial-gradient(circle at top, rgba(227, 38, 54, 0.28), transparent 34%),
        linear-gradient(135deg, #020202 0%, #0a0a0a 42%, #161616 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
}

.auth-page,
.dashboard-page {
    display: grid;
    place-items: center;
    padding: clamp(12px, 2.4vw, 28px);
}

.auth-shell,
.dashboard-shell {
    position: relative;
    z-index: 1;
    width: 100%;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    min-height: min(820px, calc(100vh - clamp(24px, 5vw, 56px)));
    max-width: 1200px;
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.brand-panel,
.auth-card,
.dashboard-card,
.dashboard-header {
    background: var(--panel-bg);
}

.brand-panel {
    padding: 48px;
    border-right: 1px solid var(--panel-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(227, 38, 54, 0.18), transparent 36%),
        var(--panel-bg);
}

.brand-badge,
.eyebrow {
    width: fit-content;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.77rem;
    color: var(--brand-red);
}

.brand-logo {
    width: 180px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 36px rgba(227, 38, 54, 0.18);
}

.brand-panel h1,
.auth-card h2,
.dashboard-header h1,
.dashboard-card h2 {
    margin: 0;
    line-height: 1;
}

.brand-panel h1 {
    font-size: clamp(2.4rem, 4vw, 4.8rem);
}

.brand-panel p,
.auth-copy,
.dashboard-card p {
    margin: 0;
    max-width: 34rem;
    color: var(--muted-text);
    line-height: 1.65;
}

.auth-card {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.auth-card h2 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.alert-error {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(227, 38, 54, 0.4);
    background: rgba(227, 38, 54, 0.14);
    color: var(--brand-white);
}

.alert-success {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(70, 214, 126, 0.34);
    background: rgba(70, 214, 126, 0.14);
    color: var(--brand-white);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-helper {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.6;
}

.auth-helper a {
    color: var(--brand-white);
}

.auth-helper a:hover {
    color: rgba(255, 255, 255, 0.82);
}

.auth-form label {
    font-size: 0.95rem;
    color: var(--brand-white);
}

.auth-form input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--brand-white);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.auth-form input:focus {
    border-color: rgba(227, 38, 54, 0.9);
    box-shadow: 0 0 0 4px rgba(227, 38, 54, 0.18);
    transform: translateY(-1px);
}

.auth-form button,
.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff3b4b 0%, var(--brand-red) 62%, #8f0f1c 100%);
    color: var(--brand-white);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(227, 38, 54, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-form button:hover,
.logout-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(227, 38, 54, 0.34);
    filter: brightness(1.06);
}

.demo-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted-text);
}

.demo-box strong {
    color: var(--brand-white);
}

.dashboard-shell {
    display: grid;
    grid-template-columns: minmax(220px, 18vw) minmax(0, 1fr);
    gap: clamp(12px, 1.6vw, 20px);
    max-width: 1600px;
    align-items: start;
}

.sidebar-card,
.dashboard-header,
.dashboard-card {
    border: 1px solid var(--panel-border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.sidebar-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 14px;
    position: sticky;
    top: clamp(12px, 2vw, 28px);
    background:
        linear-gradient(180deg, rgba(227, 38, 54, 0.14), transparent 28%),
        var(--panel-bg);
}

.sidebar-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-top h1,
.dashboard-header h2,
.dashboard-card h3 {
    margin: 0;
    line-height: 1.1;
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 12px;
    color: var(--brand-white);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    flex: 0 0 24px;
}

.sidebar-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(227, 38, 54, 0.16);
    border-color: rgba(227, 38, 54, 0.38);
    transform: translateX(2px);
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
    background: rgba(227, 38, 54, 0.3);
    border-color: rgba(227, 38, 54, 0.42);
}

.sidebar-branch-panel {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-branch-panel strong {
    display: block;
    margin-top: 4px;
    font-size: 0.98rem;
}

.sidebar-branch-form {
    display: grid;
    gap: 8px;
}

.sidebar-branch-label {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.sidebar-branch-select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--brand-white);
    color-scheme: dark;
    font: inherit;
    outline: none;
}

.sidebar-branch-select option {
    color: var(--brand-white);
    background: #121212;
}

.sidebar-branch-select:focus {
    border-color: rgba(227, 38, 54, 0.9);
    box-shadow: 0 0 0 4px rgba(227, 38, 54, 0.18);
}

.sidebar-branch-copy {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.82rem;
    line-height: 1.5;
}

.sidebar-user {
    margin-top: auto;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-text);
}

.sidebar-user strong {
    font-size: 0.98rem;
}

.sidebar-user small {
    display: block;
    margin-top: 4px;
    color: var(--muted-text);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-content {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.dashboard-logo {
    width: 74px;
    height: 74px;
    object-fit: cover;
    border-radius: 20px;
}

.dashboard-card {
    padding: 20px 18px;
}

.dashboard-card h3 {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.dashboard-grid article {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-text);
    font-size: 0.9rem;
}

.dashboard-grid strong {
    font-size: 1.02rem;
}

.manage-users-card {
    display: grid;
    gap: 18px;
}

body.modal-open {
    overflow: hidden;
}

.attendance-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.settings-grid-two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-panel-wide {
    grid-column: 1 / -1;
}

.leave-settings-grid {
    align-items: start;
}

.settings-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-list {
    display: grid;
    gap: 10px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-row strong,
.settings-row span {
    min-width: 0;
}

.settings-row a,
.dashboard-card a:not(.action-button):not(.table-action):not(.modal-close):not(.logout-link):not(.sidebar-link),
.user-table a:not(.action-button):not(.table-action):not(.modal-close):not(.logout-link):not(.sidebar-link) {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: rgba(127, 214, 255, 0.55);
    text-underline-offset: 0.14em;
    font-weight: 500;
}

.settings-row a:hover,
.settings-row a:focus-visible,
.dashboard-card a:not(.action-button):not(.table-action):not(.modal-close):not(.logout-link):not(.sidebar-link):hover,
.dashboard-card a:not(.action-button):not(.table-action):not(.modal-close):not(.logout-link):not(.sidebar-link):focus-visible,
.user-table a:not(.action-button):not(.table-action):not(.modal-close):not(.logout-link):not(.sidebar-link):hover,
.user-table a:not(.action-button):not(.table-action):not(.modal-close):not(.logout-link):not(.sidebar-link):focus-visible {
    color: var(--link-hover-color);
    text-decoration-color: currentColor;
}

.settings-form {
    display: grid;
    gap: 12px;
}

.settings-form label {
    display: grid;
    gap: 8px;
    min-width: 0;
    font-size: 0.92rem;
    color: var(--muted-text);
}

.settings-form input,
.settings-form select,
.settings-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--brand-white);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-form select option {
    color: var(--brand-white);
    background: #121212;
}

.settings-form textarea {
    min-height: 120px;
    resize: vertical;
}

.settings-form input[type="file"] {
    padding: 10px 12px;
    min-height: 52px;
    line-height: 1.35;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
    border-color: rgba(227, 38, 54, 0.9);
    box-shadow: 0 0 0 4px rgba(227, 38, 54, 0.18);
}

.ot-time-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}

.ot-time-grid > * {
    min-width: 0;
}

.weekday-rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.settings-submit {
    width: fit-content;
    padding: 0 24px;
}

.report-highlight {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(227, 38, 54, 0.16), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(227, 38, 54, 0.24);
}

.report-highlight strong {
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
}

.user-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.user-summary-grid article {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-summary-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-text);
    font-size: 0.9rem;
}

.user-summary-grid strong {
    font-size: 1.05rem;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.report-card {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.report-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted-text);
    font-size: 0.9rem;
}

.report-card strong {
    font-size: 1.08rem;
}

.settings-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-form label {
    display: grid;
    gap: 8px;
}

.settings-form span {
    color: var(--muted-text);
    font-size: 0.9rem;
}

.form-helper-text {
    display: block;
    color: var(--muted-text);
    font-size: 0.82rem;
    line-height: 1.5;
}

.form-helper-text.is-error {
    color: #ffb3ba;
}

.settings-form input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--brand-white);
}

.about-company {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.about-company h4 {
    margin: 6px 0 0;
    font-size: 1.2rem;
}

.about-company p {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.7;
}

.services-company {
    gap: 16px;
}

.service-process-list,
.service-highlights-list {
    margin: 0;
    padding-left: 1.4rem;
    display: grid;
    gap: 10px;
    color: var(--brand-white);
}

.service-process-list li,
.service-highlights-list li {
    line-height: 1.65;
}

.service-summary,
.service-action {
    font-weight: 500;
    color: var(--brand-white);
}

.service-cta {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(227, 38, 54, 0.1);
    border: 1px solid rgba(227, 38, 54, 0.2);
}

.user-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(227, 38, 54, 0.14), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(227, 38, 54, 0.22);
}

.user-toolbar strong {
    display: block;
    font-size: 1.05rem;
}

.attendance-toolbar {
    align-items: end;
}

.attendance-filter-form {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.attendance-employee-selector {
    display: grid;
    grid-template-columns: minmax(240px, 320px) auto;
    align-items: end;
    gap: 12px;
}

.attendance-employee-selector label {
    margin: 0;
}

.attendance-filter-form label {
    margin: 0;
}

.attendance-filter-form .table-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.page-back-row {
    display: flex;
    justify-content: flex-start;
}

.modal-actions-start {
    justify-content: flex-start;
}

.action-button,
.table-action,
.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.08);
    color: var(--brand-white);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.action-button {
    background: linear-gradient(135deg, #ff3b4b 0%, var(--brand-red) 62%, #8f0f1c 100%);
    box-shadow: 0 14px 30px rgba(227, 38, 54, 0.24);
}

.action-button:hover,
.table-action:hover,
.modal-close:hover {
    transform: translateY(-1px);
}

.action-button:disabled,
.table-action:disabled,
.modal-close:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions form {
    display: inline-flex;
    margin: 0;
}

.table-action {
    min-height: 36px;
    padding: 0 14px;
    border-color: rgba(255, 255, 255, 0.1);
}

.table-action-danger,
.action-button-danger {
    background: rgba(227, 38, 54, 0.16);
    border-color: rgba(227, 38, 54, 0.28);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pill.is-active {
    background: rgba(70, 214, 126, 0.16);
    border-color: rgba(70, 214, 126, 0.3);
}

.status-pill.is-inactive {
    background: rgba(255, 189, 66, 0.14);
    border-color: rgba(255, 189, 66, 0.28);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-log-panel {
    min-width: 0;
}

.activity-log-panel .table-wrap {
    max-height: 460px;
    overflow: auto;
}

.activity-log-panel .user-table {
    min-width: 980px;
}

.user-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    min-width: 640px;
}

.user-table thead {
    background: transparent;
}

.user-table th {
    padding: 0 14px 8px;
    text-align: left;
    color: var(--muted-text);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.user-table td {
    padding: 12px 14px;
    font-size: 0.94rem;
    vertical-align: middle;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user-table tbody tr td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px 0 0 14px;
}

.user-table tbody tr {
    transition: transform 0.2s ease;
}

.user-table tbody tr td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 14px 14px 0;
}

.user-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.role-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(227, 38, 54, 0.16);
    border: 1px solid rgba(227, 38, 54, 0.34);
    color: var(--brand-white);
    font-size: 0.84rem;
    font-weight: 700;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-shell.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 820px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 22px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(227, 38, 54, 0.12), transparent 28%),
        rgba(16, 16, 16, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-panel::-webkit-scrollbar {
    display: none;
}

.modal-panel-compact {
    width: min(100%, 460px);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    min-height: 38px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.modal-form {
    grid-template-columns: 1fr;
    gap: 14px;
}

.modal-form .settings-list,
.modal-form .weekday-rate-grid,
.modal-form .ot-time-grid,
.modal-form .modal-actions {
    grid-column: 1 / -1;
}

.modal-form label {
    grid-column: 1 / -1;
}

.modal-copy {
    margin: 0;
    color: var(--muted-text);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .brand-panel {
        border-right: 0;
        border-bottom: 1px solid var(--panel-border);
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        padding: 18px;
        position: static;
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .sidebar-user,
    .logout-link {
        margin-top: 0;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .attendance-layout {
        grid-template-columns: 1fr;
    }

    .user-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-grid,
    .settings-form {
        grid-template-columns: 1fr;
    }

    .attendance-employee-selector {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .brand-panel,
    .auth-card,
    .sidebar-card,
    .dashboard-card,
    .dashboard-header {
        padding: 18px;
    }

    .brand-logo {
        width: 132px;
    }

    .dashboard-brand {
        align-items: flex-start;
        width: 100%;
    }

    .sidebar-top {
        align-items: flex-start;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .sidebar-link {
        min-height: 44px;
    }

    .dashboard-grid,
    .user-summary-grid {
        grid-template-columns: 1fr;
    }

    .modal-shell {
        padding: 16px;
    }

    .modal-panel {
        padding: 18px;
    }

    .modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .action-button,
    .table-action,
    .modal-close {
        width: 100%;
    }

    .ot-time-grid {
        grid-template-columns: 1fr;
    }

    .settings-row {
        flex-direction: column;
        align-items: flex-start;
    }
}