@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f3f5f8;
    --surface: #ffffff;
    --surface-soft: #fafbfc;
    --line: #e4e8ef;
    --line-strong: #d5dbe5;
    --ink: #111827;
    --muted: #667085;
    --primary: #2159a6;
    --primary-hover: #1b4b8c;
    --danger: #b4233f;
    --shadow-soft: 0 12px 36px rgba(16, 24, 40, 0.07);
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--ink);
    background: var(--bg);
}

.login-body {
    background: var(--bg);
}

.login-card {
    width: 100%;
    max-width: 460px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.login-card .card-body {
    padding: 2rem;
}

.calendar-body {
    min-height: 100vh;
    background: var(--bg);
}

.app-header {
    border-radius: var(--radius-lg);
}

.clean-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.app-actions .btn,
.app-actions .badge {
    border-radius: 10px;
}

.app-actions .badge {
    border: 1px solid var(--line);
    color: var(--ink) !important;
    background: var(--surface-soft) !important;
}

.user-badge.role-aiste {
    background: #fde8f3 !important;
    color: #a01062 !important;
    border-color: #f6cde3;
}

.user-badge.role-aurimas {
    background: #e7f0ff !important;
    color: #194e95 !important;
    border-color: #c8daf8;
}

.user-badge.role-aida {
    background: #fff5cc !important;
    color: #7a5a00 !important;
    border-color: #f2df95;
}

#calendar {
    animation: fadeIn 220ms ease-out;
}

.fc {
    --fc-border-color: var(--line-strong);
    --fc-page-bg-color: var(--surface);
    --fc-neutral-bg-color: var(--surface-soft);
    --fc-today-bg-color: #edf3ff;
    --fc-event-bg-color: var(--primary);
    --fc-event-border-color: var(--primary);
}

.fc a {
    color: var(--ink);
    text-decoration: none;
}

.fc .fc-toolbar {
    gap: 0.75rem;
    margin-bottom: 1rem !important;
}

.fc .fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
}

.fc .fc-button {
    border-radius: 10px !important;
    border: 1px solid var(--line) !important;
    background: var(--surface) !important;
    color: var(--ink) !important;
    font-weight: 600;
    box-shadow: none !important;
    padding: 0.42rem 0.8rem !important;
}

.fc .fc-button:hover,
.fc .fc-button:focus {
    background: var(--surface-soft) !important;
    border-color: var(--line-strong) !important;
    color: var(--ink) !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.fc .fc-scrollgrid {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.fc .fc-col-header-cell {
    background: var(--surface-soft);
}

.fc .fc-col-header-cell-cushion {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: lowercase;
    padding: 0.6rem 0.2rem;
    color: #3b4756;
}

.fc .fc-daygrid-day-number,
.fc .fc-timegrid-slot-label-cushion,
.fc .fc-timegrid-axis-cushion {
    color: #304152;
    font-weight: 600;
}

.fc .fc-day-other .fc-daygrid-day-number {
    color: #a2acb9;
}

.fc .fc-daygrid-day-frame {
    min-height: 112px;
}

.fc .fc-daygrid-day.fc-day-today {
    background: #edf3ff !important;
}

.fc .fc-daygrid-day:hover {
    background: #f9fbff;
}

.fc .fc-event {
    border-radius: 8px;
    border: 0;
    padding: 3px 6px;
    box-shadow: none;
    max-width: 100%;
    overflow: hidden;
}

.fc-custom-event {
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
}

.fc-custom-title {
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-custom-time {
    font-size: 0.72rem;
    opacity: 0.95;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-mobile-month-item {
    max-width: 100%;
    display: block;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc .fc-list-event-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fc .fc-timegrid-event .fc-event-main,
.fc .fc-daygrid-event .fc-event-main {
    overflow: hidden;
}

.fc .fc-timegrid-event .fc-event-main-frame,
.fc .fc-daygrid-event .fc-event-main-frame {
    min-width: 0;
}

.fc .fc-list {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.fc .fc-list-day-cushion {
    background: var(--surface-soft);
}

.modal-content {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
}

.modal-header,
.modal-footer {
    border-color: var(--line);
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: #d6dde7;
}

.form-control:focus,
.form-select:focus {
    border-color: #89a5d1;
    box-shadow: 0 0 0 0.2rem rgba(33, 89, 166, 0.14);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-danger {
    color: var(--danger);
    border-color: #efc3ce;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .fc .fc-button {
        flex: 1 1 auto;
    }

    .fc .fc-toolbar-title {
        font-size: 1.1rem;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 78px;
    }

    .fc .fc-daygrid-day-events {
        margin-top: 1px;
    }

    .fc-custom-title {
        font-size: 0.75rem;
    }

    .fc-custom-time {
        font-size: 0.68rem;
    }


@media (max-width: 575.98px) {
    .fc .fc-toolbar-title {
        font-size: 1rem;
    }

    .fc .fc-button {
        padding: 0.36rem 0.55rem !important;
        font-size: 0.82rem;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 62px;
    }

    .fc .fc-daygrid-day-events {
        margin: 0 2px;
    }

    .fc .fc-daygrid-event-harness {
        margin-top: 1px;
    }

    .fc .fc-daygrid-event {
        padding: 1px 4px;
        border-radius: 6px;
    }

    .fc .fc-daygrid-more-link {
        font-size: 0.68rem;
        font-weight: 700;
    }

    .fc .fc-daygrid-day-number {
        font-size: 0.77rem;
    }

    .fc .fc-list-event-time {
        white-space: nowrap;
        font-size: 0.74rem;
    }

    .fc .fc-list-event-title {
        font-size: 0.78rem;
    }

    .fc-custom-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
    }
}
    .modal-dialog {
        margin: 0.55rem;
    }

    .modal-body {
        padding: 1rem;
    }

    #timeRangeWrap .row {
        --bs-gutter-x: 0.5rem;
    }

    .app-actions {
        width: 100%;
    }

    .app-actions .btn,
    .app-actions .badge {
        width: 100%;
        justify-content: center;
    }
}
