.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 14px 24px;
}

.detail-block {
    margin-top: 20px;
}

.btn-danger {
    background: #c62828;
    color: #fff;
    border: 1px solid #c62828;
}

.btn-danger:hover {
    background: #a81f1f;
    border-color: #a81f1f;
}

.filter-bar {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leave-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.leave-calendar-head {
    background: #eef3f8;
    border: 1px solid #d9e1ea;
    padding: 10px;
    font-weight: 700;
    text-align: center;
}

.leave-calendar-cell {
    min-height: 130px;
    border: 1px solid #d9e1ea;
    padding: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leave-balance-page .filter-card {
    padding: 18px 20px;
}

.leave-balance-page .filter-bar {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.leave-balance-page .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    flex: 1 1 220px;
}

.leave-balance-page .filter-group.filter-group-actions {
    flex: 0 0 auto;
    min-width: auto;
}

.leave-balance-page .filter-group input,
.leave-balance-page .filter-group select {
    width: 100%;
}

.leave-balance-page .table-card {
    overflow: hidden;
}

.leave-balance-page .employee-main {
    font-weight: 700;
    color: #102a43;
    line-height: 1.35;
}

.leave-balance-page .employee-sub {
    margin-top: 4px;
    font-size: .84rem;
    color: #6b7c93;
    line-height: 1.35;
}

.leave-balance-page .balance-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.leave-balance-page .balance-chip.type {
    background: #edf4ff;
    color: #123f73;
}

.leave-balance-page .balance-chip.good {
    background: #eafaf1;
    color: #1e6b45;
}

.leave-balance-page .balance-chip.warn {
    background: #fff7e6;
    color: #b26b00;
}

.leave-balance-page .balance-chip.low {
    background: #fff1f1;
    color: #b42318;
}

.leave-balance-page .days-cell {
    font-weight: 600;
    color: #243b53;
}

.leave-balance-page .action-cell {
    white-space: nowrap;
}

.leave-balance-page .table-note {
    margin-top: 14px;
    color: #7b8794;
    font-size: .88rem;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .leave-balance-page .filter-group {
        flex: 1 1 100%;
    }

    .leave-balance-page .filter-group.filter-group-actions {
        flex: 1 1 100%;
    }
}

.leave-balance-page .filter-group.filter-group-actions {
    flex: 0 0 auto;
    min-width: auto;
}

.leave-balance-page .filter-group.filter-group-actions label {
    visibility: hidden;
    margin: 0;
    height: 0;
    line-height: 0;
}

.leave-balance-page .filter-group.filter-group-actions .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 0;
}

.leave-balance-page .filter-submit,
.leave-balance-page .filter-reset {
    min-height: 46px;
    min-width: 120px;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 700;
}

.leave-balance-page .filter-submit {
    background: #123f73;
    color: #fff;
    border: 1px solid #123f73;
}

.leave-balance-page .filter-submit:hover {
    background: #0e345f;
    border-color: #0e345f;
}

.leave-balance-page .filter-reset {
    background: #fff;
    color: #334e68;
    border: 1px solid #d9e2ec;
}

.leave-balance-page .filter-reset:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

@media (max-width: 900px) {
    .leave-balance-page .filter-group.filter-group-actions {
        flex: 1 1 100%;
    }

    .leave-balance-page .filter-group.filter-group-actions .form-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .leave-balance-page .filter-submit,
    .leave-balance-page .filter-reset {
        width: 100%;
        min-width: 0;
    }
}

.leave-calendar-cell--muted {
    background: #f8fafc;
}

.leave-calendar-date {
    font-weight: 700;
    font-size: 14px;
}

.leave-calendar-event {
    display: block;
    padding: 8px;
    border-radius: 8px;
    background: #eef6ff;
    border: 1px solid #d7e7ff;
    text-decoration: none;
    color: #16355b;
    font-size: 12px;
    line-height: 1.35;
}

.leave-calendar-event:hover {
    background: #e5f0ff;
}

.dashboard-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.holiday-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.holiday-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f5f7fa;
    border: 1px solid #dbe3ec;
    font-size: 12px;
    color: #29445f;
}

.leave-calendar-holiday {
    display: block;
    padding: 8px;
    border-radius: 8px;
    background: #fff5e8;
    border: 1px solid #f0d4a8;
    color: #7a4d00;
    font-size: 12px;
    line-height: 1.35;
}

@media (max-width: 900px) {
    .leave-calendar {
        grid-template-columns: 1fr;
    }

    .leave-calendar-head {
        display: none;
    }

    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }
}