:root {
    --app-nav: #1f2933;
    --app-accent: #0d6efd;
}

body {
    background: #f4f6f8;
    min-height: 100vh;
}

.app-nav {
    background: var(--app-nav);
}

.app-main {
    padding: 1.25rem 0 2rem;
}

html,
body.schedule-page {
    height: 100%;
}

body.schedule-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

body.schedule-page .app-nav {
    flex-shrink: 0;
}

body.schedule-page .app-main {
    flex: 1;
    min-height: 0;
    padding: 0.55rem 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.schedule-page .app-main > .container-fluid {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.schedule-page .page-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.schedule-page .page-card > .card-header {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
}

body.schedule-page .page-card > .card-header h4 {
    font-size: 1.15rem;
}

body.schedule-page .page-card > .card-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0.4rem 0.65rem 0.35rem;
    display: flex;
    flex-direction: column;
}

body.schedule-page #calendarView,
body.schedule-page #listView {
    flex: 1;
    min-height: 0;
}

body.schedule-page #listView {
    overflow: auto;
}

body.schedule-page #calendarView {
    display: flex;
    flex-direction: column;
}

body.schedule-page #calendar,
body.schedule-page .fc {
    flex: 1;
    min-height: 0;
    height: 100%;
}

body.schedule-page .fc .fc-view-harness {
    min-height: 0;
}

body.schedule-page .fc-footer-toolbar {
    flex-shrink: 0;
    padding: 0.45rem 0 0.1rem;
    margin-top: 0.35rem;
}

.page-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.page-card .card-header {
    background: #fff;
    border-bottom: 1px solid #eef0f2;
}

.tabulator {
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
    min-height: 220px;
}

.tabulator .tabulator-header {
    background: #f8f9fa;
}

.tabulator-row.tabulator-row-even {
    background: #f8f9fa;
}

.tabulator-row.tabulator-row-odd {
    background: #fff;
}

.status-badge {
    font-weight: 600;
}

#calendar {
    min-height: 0;
}

.fc-client-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
    flex-shrink: 0;
}

.fc-daygrid-dot-event {
    background: transparent !important;
    color: #212529 !important;
}

.fc-daygrid-event {
    color: #212529;
}

.fc .fc-timegrid-col.fc-day {
    background: #fff;
}

.fc .fc-timegrid-slot {
    border-color: #f0f2f4;
}

.fc .fc-timegrid-event-harness {
    margin-right: 3px;
}

.fc .fc-timegrid-event.fc-event-pastel {
    border: 0 !important;
    border-radius: 6px !important;
    background: var(--event-bg, #f3f6fb) !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 1px 1px rgba(16, 24, 40, 0.04);
    overflow: hidden;
}

.fc .fc-timegrid-event.fc-event-pastel .fc-event-main {
    padding: 0;
    background: transparent !important;
    color: var(--event-fg, #334155) !important;
}

.fc-event-pastel-body {
    height: 100%;
    padding: 7px 8px 8px 10px;
    border-left: 4px solid var(--event-accent, #64748b);
    box-sizing: border-box;
}

.fc-event-time-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--event-accent, #64748b);
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.fc-event-title-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--event-fg, #1e293b);
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.fc .fc-timegrid-event.fc-event-pastel.fc-event-short .fc-event-time-label {
    margin-bottom: 0;
}

.fc-list-event .fc-client-dot {
    margin-right: 0.45rem;
}

.fc-event-done {
    opacity: 0.62;
}

.fc-footer-toolbar {
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    padding: 0.85rem 0 0.2rem;
    margin-top: 0.65rem;
    border-top: 1px solid #e9ecef;
}

.fc .fc-footer-toolbar .fc-toolbar-chunk {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.fc .fc-footer-toolbar .fc-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: none;
}

.fc .fc-footer-toolbar .fc-button-group > .fc-button {
    margin: 0;
    border-radius: 6px !important;
}

.fc .fc-footer-toolbar .fc-button-group > .fc-button:not(:first-child) {
    margin-left: 0;
}

.fc .fc-footer-toolbar .fc-button {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.38rem 0.75rem;
    border: 0 !important;
    border-radius: 6px !important;
    background: var(--event-bg, #f1f5f9) !important;
    color: var(--event-fg, #334155) !important;
    box-shadow: none;
    text-transform: none;
}

.fc .fc-footer-toolbar .fc-button:focus,
.fc .fc-footer-toolbar .fc-button:active,
.fc .fc-footer-toolbar .fc-button.fc-button-active {
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.fc .fc-footer-toolbar .fc-button.fc-filter-active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--event-accent, #64748b);
}

.fc .fc-footer-toolbar .fc-statusAwaiting-button,
.fc .fc-footer-toolbar .fc-statusDone-button,
.fc .fc-footer-toolbar .fc-statusAll-button {
    letter-spacing: 0.03em;
}

.status-badge.status-awaiting {
    background: #fdecdc;
    color: #c2410c;
}

.status-badge.status-done {
    background: #d1fae5;
    color: #047857;
}

.schedule-date-group {
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

.schedule-date-header {
    background: #212529;
    color: #fff;
    padding: 0.55rem 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-date-table {
    margin: 0;
    font-size: 0.82rem;
    width: 100%;
}

.schedule-date-table th {
    white-space: nowrap;
    background: #f8f9fa;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.schedule-date-table td {
    vertical-align: middle;
}

.schedule-date-table .btn {
    padding: 0.45rem 0.65rem;
    line-height: 1;
    font-size: 1.1rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.schedule-date-table .btn + .btn {
    margin-left: 0.25rem;
}

.settings-table td {
    vertical-align: middle;
}

.settings-table .btn {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.settings-table .btn + .btn {
    margin-left: 0.25rem;
}

#confirmModal {
    z-index: 1070;
}

.modal-backdrop.show ~ .modal-backdrop {
    z-index: 1065;
}

@media (max-width: 768px) {
    .app-main {
        padding-top: 0.75rem;
    }
}

body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-nav);
    padding: 1.25rem;
}

.login-wrap {
    width: 100%;
    max-width: 420px;
}

.login-card {
    border: 0;
    border-radius: 0.75rem;
    padding: 1.75rem 1.6rem 1.6rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.login-brand i {
    font-size: 1.85rem;
    color: var(--app-accent);
}

.login-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2933;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}
