* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    overscroll-behavior: none;
    overflow-x: hidden;
}

html {
    overscroll-behavior: none;
    xoverflow-x: hidden;
    xoverflow-y: auto;
}

.container {
    max-width: 100%;
    margin: 0;
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: left;
    position: relative;
    padding-right: 360px;
}

header h1 {
    font-size: 2.1em;
    margin-bottom: 10px;
    max-width: 70%;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
    max-width: 70%;
}

.controls {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.view-selector {
    display: flex;
    gap: 5px;
    background: white;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.view-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s;
    color: #666;
}

.view-btn:hover {
    background: #f0f0f0;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#currentPeriod {
    font-weight: 600;
    font-size: 1.1em;
    min-width: 250px;
    text-align: center;
    color: #333;
}

.nav-btn {
    padding: 8px 15px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.interval-selector {
    display: flex;
    gap: 15px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.interval-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
}

.interval-selector input[type="radio"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.availability-timeline {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.availability-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8em;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.availability-timeline-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-nav-btn {
    border: none;
    background: #e2e8f0;
    color: #334155;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.timeline-nav-btn.timeline-nav-today {
    width: auto;
    padding: 0 8px;
    font-size: 0.7em;
    letter-spacing: 0.02em;
}

.timeline-nav-btn.timeline-nav-short {
    width: auto;
    padding: 0 8px;
    font-size: 0.7em;
    letter-spacing: 0.02em;
}

.timeline-nav-btn:hover {
    background: #cbd5f5;
    color: #1e3a8a;
}

.availability-timeline-label {
    font-weight: 600;
    color: #0f172a;
}

.availability-timeline-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
}

.availability-slot {
    height: 16px;
    border-radius: 6px;
    background: #e2e8f0;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.availability-slot.is-free {
    background: #bbf7d0;
}

.availability-slot.is-busy {
    background: #fecdd3;
}

.availability-slot.is-selected {
    background: #38bdf8;
    box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.35);
    transform: translateY(-1px);
}

.availability-slot-label {
    font-size: 0.65em;
    color: #64748b;
    text-align: center;
    margin-top: 6px;
}

.availability-slot-text {
    font-size: 0.55em;
    color: rgba(15, 23, 42, 0.7);
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}

.availability-slot.is-busy .availability-slot-text {
    color: rgba(127, 29, 29, 0.75);
}

.availability-slot.is-selected .availability-slot-text {
    color: #0f172a;
}

.availability-highlight {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    animation: availabilityPulse 1.2s ease-out;
}

@keyframes availabilityPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

#calendar-container {
    padding: 30px;
    min-height: 500px;
    overflow-x: auto;
}

/* Widok dzienny */
.day-view {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0;
}

.time-label {
    padding: 15px 10px;
    text-align: right;
    font-weight: 600;
    color: #666;
    border-right: 1px solid rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
    background: #f8f9fa;
}

.week-view .time-label {
    border-right: 0;
    border-bottom: 0;
}

.time-slot {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    min-height: 60px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.time-slot.empty-slot::after {
    content: '+ ' attr(data-time);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
    font-weight: 700;
    color: #667eea;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.time-slot.empty-slot:hover::after {
    opacity: 0.9;
}

.time-slot.off-day {
    background: #f8fafc;
}

.time-slot:hover {
    background: #ababab;
    color: #ffffff;
}

.time-slot.occupied {
    background: #677eea;
    border-left: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
}

.time-slot.mixed {
    background: #f8fafc;
    color: inherit;
    display: block;
    padding: 0;
}

.day-cell-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    height: 100%;
}

.day-cell-meetings {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #677eea;
    color: #ffffff;
    height: 100%;
}

.day-cell-unavailability {
    background: var(--day-cell-bg, #fce7f4);
    color: var(--day-cell-text, #ef4444);
    border-radius: 0;
    padding: 8px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: 100%;
}

.day-cell-meetings > div {
    padding: 8px 10px;
}

.day-cell-meetings > div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.time-slot.occupied:not(.completed) {
    background: #677eea;
}

.time-slot.occupied.draft {
    border-left-color: transparent;
    background: #f28a2e;
}

.time-slot.occupied:hover {
    background: #ababab;
    color: #ffffff;
}

.time-slot.completed {
    background: #94a3b9;
    opacity: 1;
    border-left: none;
    color: #ffffff;
}

.time-slot.unavailable {
    background: var(--day-cell-bg, #fce7f4);
    border-left: none;
    color: var(--day-cell-text, #ef4444);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-slot.unavailable:hover {
    background: #ababab;
    color: #ffffff;
}

.day-unavailable {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.day-unavailable-title {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--day-cell-text, #ef4444);
}

.day-unavailable-author {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.85;
    color: var(--day-cell-text, #ef4444);
}

.meeting-card {
    background: white;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Widok dzienny: slot jest "kartą", więc wewnętrzna karta ma być płaska */
.day-view .meeting-card {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.day-view .time-slot.occupied > div + div {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 10px;
    margin-top: 2px;
}

.day-view .time-slot.completed .meeting-platform,
.day-view .time-slot.completed .meeting-program,
.day-view .time-slot.completed .meeting-draft-badge,
.day-view .time-slot.completed [title="ID spotkania"] {
    opacity: 0.75;
}

.day-view .meeting-platform,
.day-view .meeting-program,
.day-view .meeting-draft-badge {
    border-radius: 2px;
}

.day-view [title="ID spotkania"] {
    border-radius: 2px !important;
}

.meeting-card.draft {
    background: #f28a2e;
    border-left: none;
}

.meeting-draft-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 800;
    background: #f28a2e;
    color: #ffffff;
    border: 1px solid #e97814;
    line-height: 1;
}

.time-slot.occupied:not(.completed):not(.draft) .meeting-client,
.time-slot.occupied.draft .meeting-client,
.time-slot.completed .meeting-client {
    color: #ffffff;
}

.time-slot.occupied .meeting-time-range,
.time-slot.completed .meeting-time-range,
.time-slot.occupied .meeting-author-email,
.time-slot.completed .meeting-author-email {
    color: #ffffff;
}

.meeting-platform {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 800;
    margin-bottom: 5px;
    line-height: 1;
    border: 1px solid transparent;
}

.meeting-platform.mini {
    padding: 6px 12px;
    font-size: 0.9em;
    border-radius: 6px;
    gap: 6px;
    border: 1px solid transparent;
}

.meeting-card .meeting-platform,
.meeting-card .meeting-program {
    margin-bottom: 0;
}

.meeting-program {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 800;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e5e7eb;
    line-height: 1;
}

.meeting-program.df { background: #2299dd; color: white; border-color: #2299dd; }
.meeting-program.mf { background: #d70601; color: white; border-color: #d70601; }
.meeting-program.fp { background: #4bbd13; color: white; border-color: #4bbd13; }
.meeting-program.inne { background: #9333ea; color: white; border-color: #9333ea; }

.meeting-platform.teamviewer {
    background: #0070d2;
    color: white;
}

.meeting-platform.anydesk {
    background: #ef443b;
    color: white;
}

.meeting-platform.telefon {
    background: #16a34a;
    color: white;
}

.meeting-client {
    color: #333;
    font-size: 0.95em;
    white-space: pre-wrap;
    margin-top: 5px;
}

.meeting-time-range {
    font-size: 0.85em;
    color: #555;
    margin-top: 4px;
}

.meeting-author-email {
    font-size: 0.8em;
    color: #64748b;
    margin-top: 4px;
}

.time-slot:hover .meeting-time-range,
.time-slot:hover .meeting-author-email,
.time-slot:hover .meeting-client {
    color: #ffffff;
}

.meeting-unavailability-note {
    margin-top: 6px;
    font-size: 0.8em;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 4px 8px;
    display: inline-block;
}

.meeting-overlap {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 6px;
}

.meeting-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2em;
}

/* Widok tygodniowy */
.week-view {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: rgba(0, 0, 0, 0.18);
    min-width: 900px;
}

.week-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0;
    text-align: center;
    font-weight: 600;
}

.week-header.off-day {
    background: #f1f5f9;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.week-header.empty {
    background: #f8f9fa;
    padding: 15px;
}

.week-header-link {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 15px;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.week-header-link:hover {
    text-decoration: underline;
}

.week-header-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.92);
    outline-offset: -3px;
}

.week-day-name {
    font-size: 0.9em;
    opacity: 0.9;
}

.week-day-date {
    font-size: 1.2em;
    margin-top: 5px;
}

.week-time-cell {
    background: #ffffff;
    padding: 8px 6px;
    min-height: 52px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    position: relative;
}

.week-time-cell.unavailable {
    background: var(--week-cell-bg, #fce7f3);
    color: var(--week-cell-text, #be185d);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-left: none;
}

.week-time-cell.unavailable:hover {
    background: var(--week-cell-bg, #fce7f3);
}

.week-unavailable {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.week-unavailable-title {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.week-unavailable-author {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.85;
}

.week-time-cell.empty-slot::after {
    content: '+ ' attr(data-time);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1em;
    font-weight: 700;
    color: #667eea;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.week-time-cell.empty-slot:hover::after {
    opacity: 0.9;
}

.week-time-cell.off-day {
    background: #f8fafc;
}

.week-time-cell:hover {
    background: #f8fafc;
}

.week-time-cell.occupied {
    background: #667eea;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    border-left: none;
}

.week-time-cell.mixed {
    background: #f8fafc;
    color: inherit;
    display: block;
    padding: 0;
}

.week-cell-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    height: 100%;
}

.week-cell-meetings {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #667eea;
    color: #ffffff;
    height: 100%;
}

.week-cell-unavailability {
    background: var(--week-cell-bg, #fce7f3);
    color: var(--week-cell-text, #be185d);
    border-radius: 0;
    padding: 6px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 100%;
}

.week-cell-meetings .week-meeting-info {
    color: inherit;
    padding: 6px;
}

.week-cell-meetings .week-meeting-info + .week-meeting-info {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

/* "Do wykonania" ma się odcinać od tła */
.week-time-cell.occupied:not(.completed) {
    background: #667eea;
}

.week-time-cell.occupied.draft {
    background: #f28a2e;
    border-left-color: transparent;
}

.week-time-cell.draft {
    background: #f28a2e;
    border-left-color: transparent;
}

.week-time-cell.occupied:hover {
    background: inherit;
}

.week-time-cell.completed {
    background: #94a3b8;
    border-left-color: transparent;
    opacity: 1;
}

.week-meeting-info {
    font-size: 12px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.15;
    color: #0f172a;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
}

.week-meeting-info.draft {
    background: transparent;
    border-color: transparent;
}

.week-meeting-info.completed {
    background: transparent;
    border-color: transparent;
    opacity: 1;
}

/* Delikatny separator, gdy jest kilka spotkań w jednym slocie */
.week-time-cell.occupied .week-meeting-info + .week-meeting-info {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 6px;
    margin-top: 2px;
}

.week-time-cell.completed .week-meeting-time {
    color: #ffffff;
}

.week-time-cell.completed .week-meeting-client {
    color: #ffffff;
}

.week-time-cell.completed .week-meeting-author {
    color: #ffffff;
}

.week-time-cell.completed .meeting-platform.mini,
.week-time-cell.completed .meeting-program {
    opacity: 0.75;
}

.week-time-cell.completed .week-meeting-id {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

.week-time-cell.occupied:not(.completed):not(.draft) .week-meeting-info,
.week-time-cell.occupied:not(.completed):not(.draft) .week-meeting-time,
.week-time-cell.occupied:not(.completed):not(.draft) .week-meeting-client,
.week-time-cell.occupied:not(.completed):not(.draft) .week-meeting-author,
.week-time-cell.occupied.draft .week-meeting-info,
.week-time-cell.occupied.draft .week-meeting-time,
.week-time-cell.occupied.draft .week-meeting-client,
.week-time-cell.occupied.draft .week-meeting-author {
    color: #ffffff;
}

.week-time-cell.occupied:not(.completed):not(.draft) .week-meeting-id,
.week-time-cell.occupied.draft .week-meeting-id {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

.week-meeting-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.week-meeting-id {
    margin-left: auto;
    font-size: 11px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    padding: 2px 6px;
    font-variant-numeric: tabular-nums;
}

.week-meeting-time {
    font-weight: 400;
    color: #0f172a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    min-width: 44px;
}

.week-meeting-client {
    color: #334155;
    font-size: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.week-meeting-author {
    font-size: 11px;
    color: #64748b;
    opacity: 1;
    margin-left: auto;
    white-space: nowrap;
}

/* Ujednolicenie "kwadratowego" looku tylko w widoku tygodniowym */
.week-view .meeting-platform.mini,
.week-view .meeting-program {
    border-radius: 2px;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1;
}

.week-view .meeting-platform.mini {
    border: 1px solid rgba(255, 255, 255, 0.0);
}

.week-meeting-info .meeting-platform,
.week-meeting-info .meeting-program {
    margin-bottom: 0;
}

/* Widok miesięczny */
.month-view {
    display: grid;
    grid-template-columns: 70px repeat(7, 1fr);
    gap: 1px;
    background: rgba(0, 0, 0, 0.18);

.month-week-header {
    padding: 10px 10px;
    font-weight: 800;
    color: #334155;
    letter-spacing: .02em;
    text-transform: uppercase;
    font-size: 12px;
    background: #f8fafc;
    border: 0;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-week-number {
    background: #f8fafc;
    border: 0;
    border-radius: 2px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.month-week-number:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}
    min-width: 900px;
}

.month-day-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
}

.month-day {
    background: white;
    min-height: 120px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.month-day.off-day {
    background: #f8fafc;
}

.month-day.off-day .month-day-number {
    color: #64748b;
}

.month-day:hover {
    background: #f8fafc;
}

.month-day.other-month {
    background: #f8f9fa;
    opacity: 0.55;
}

.month-day-number {
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.month-day.today .month-day-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 2px;
    font-size: 0.95em;
    letter-spacing: 0.01em;
}

.month-meetings {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.month-meeting-item {
    font-size: 11px;
    padding: 4px 6px;
    border-radius: 0;
    background: #677eea;
    color: #ffffff;
    border-left: none;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.month-meeting-item:not(.completed):not(.draft):not(.unavailable) {
    background: #677eea;
}

.month-meeting-item.draft {
    background: #f28a2e;
    border-left-color: transparent;
    color: #ffffff;
}

.month-meeting-item.completed {
    background: #94a3b9;
    border-left-color: transparent;
    opacity: 1;
    color: #ffffff;
}

.month-meeting-item.unavailable {
    background: var(--month-item-bg, #fce7f4);
    border-left-color: transparent;
    color: var(--month-item-text, #ef4444);
    font-weight: 400;
    justify-content: center;
}

.month-time {
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.month-id-badge {
    margin-left: auto;
    font-size: 11px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    padding: 2px 6px;
    font-variant-numeric: tabular-nums;
}

.month-author-badge {
    font-size: 11px;
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
    padding: 2px 6px;
    border-radius: 2px;
}

/* Mniejsze badge w miesiącu (spójne z tygodniem) */
.month-view .meeting-platform.mini,
.month-view .meeting-program {
    margin-bottom: 0;
    border-radius: 2px;
    height: 18px;
    padding: 0 6px;
    font-size: 10px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    vertical-align: middle;
}

.month-view .meeting-platform.mini {
    min-width: 30px;
}

.month-view .meeting-program {
    min-width: 30px;
}

.month-meeting-item {
    line-height: 1.2;
}

/* Widok "Robocze" */
.drafts-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 10px 0 16px 0;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
}

.drafts-toolbar .btn {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 2px;
}

.drafts-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 800;
    color: #0f172a;
}

.drafts-empty {
    padding: 20px;
    background: #ffffff;
    border-radius: 2px;
    border: 1px dashed #e2e8f0;
    color: #334155;
}

.drafts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drafts-card {
    background: #fff7ed;
    border: none;
    border-left: none;
    border-radius: 2px;
    padding: 12px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.drafts-card:hover {
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.drafts-card-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.drafts-card-title {
    font-weight: 800;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.drafts-id {
    font-size: 11px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    padding: 2px 6px;
    font-variant-numeric: tabular-nums;
}

.drafts-card-author {
    font-size: 12px;
    color: #a16207;
    font-weight: 700;
    white-space: nowrap;
}

.drafts-card-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #334155;
}

.drafts-sep {
    margin: 0 6px;
    color: rgba(15, 23, 42, 0.35);
}

.drafts-card-notes {
    margin-top: 8px;
    font-size: 12px;
    color: #0f172a;
    white-space: pre-wrap;
    line-height: 1.4;
}

.month-meeting-count {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 1% auto;
    padding: 15px;
    border-radius: 12px;
    width: 92%;
    max-width: 520px;
    max-height: 98vh;
    overflow-y: auto;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s;
}

#meetingModal .modal-content {
    width: 96vw;
    max-width: 1040px;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 18px;
}

.close:hover {
    color: #000;
}

#modalTitle {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.5em;
}

.meeting-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 6px;
}

.meeting-modal-header #modalTitle {
    margin-bottom: 0;
}

.meeting-logs-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.meeting-logs-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

.meeting-logs-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.meeting-author {
    font-size: 0.95em;
    color: #475569;
    margin-bottom: 10px;
    font-weight: 600;
}

.meeting-logs {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #f8fafc;
}

.meeting-logs summary {
    cursor: pointer;
    font-weight: 700;
    color: #334155;
}

.meeting-log-item {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9em;
    color: #475569;
}

.meeting-log-item:last-child {
    border-bottom: none;
}

.meeting-logs-modal {
    max-width: 520px;
}

.client-picker-section {
    margin-bottom: 10px;
}

.client-picker-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

#clientSearchInput {
    flex: 1;
    min-width: 260px;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
}

.client-picker-btn {
    flex: initial;
    width: auto;
    white-space: nowrap;
    padding: 8px 12px;
}

.selected-client-meta {
    margin-top: 6px;
    font-size: 0.85em;
    color: #475569;
    font-weight: 600;
}

.client-preview-panel {
    border: 1px solid #dbeafe;
    background: #f8fbff;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #1f2937;
    line-height: 1.45;
}

.client-preview-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.client-preview-row {
    margin-bottom: 4px;
}

.client-editor-modal {
    max-width: 1120px;
    width: 96vw;
}

.client-editor-title {
    margin-bottom: 10px;
    color: #1f2937;
}

.client-editor-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 14px;
}

.client-editor-list-column {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    background: #f8fafc;
}

.client-editor-form-column {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    background: #ffffff;
}

.client-editor-list {
    max-height: 62vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-editor-item {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    cursor: pointer;
}

.client-editor-item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.client-editor-item.active {
    border-color: #3b82f6;
    background: #dbeafe;
}

.client-editor-item-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.client-editor-item-meta {
    font-size: 0.82em;
    color: #475569;
}

.client-gus-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.client-gus-status {
    font-size: 0.85em;
    color: #475569;
    font-weight: 600;
}

.meeting-logs-title {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #334155;
}

.meeting-logs-content {
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.meeting-datetime {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
}

textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    min-height: 50px;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

.platform-selector {
    display: flex;
    gap: 8px;
}

.platform-option {
    flex: 1;
    cursor: pointer;
}

.platform-option input[type="radio"] {
    display: none;
}

.platform-label {
    display: block;
    padding: 8px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-weight: 800;
    transition: all 0.3s;
    font-size: 0.95em;
    min-height: 38px;
    max-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.platform-program-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.platform-column,
.program-column {
    flex: 1;
    min-width: 220px;
}

.program-selector {
    display: flex;
    gap: 8px;
}

.program-option {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}

.program-option input[type="radio"] {
    display: none;
}

.program-label {
    display: block;
    font-weight: 800;
    font-size: 0.95em;
    color: #111;
}


.program-option:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

.program-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

/* Duration selector */
.duration-option {
    cursor: pointer;
    display: inline-block;
}

.duration-option input[type="radio"] {
    display: none;
}

.duration-label {
    display: block;
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
    background: #fafafa;
    color: #333;
    font-size: 0.85em;
}

.duration-option:hover .duration-label {
    border-color: #667eea;
    transform: translateY(-1px);
}

.duration-option input[type="radio"]:checked + .duration-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* Specyficzne kolory dla każdego programu */
.program-option:has(input[value="DF"]).selected,
.program-option:has(input[value="DF"]) input[type="radio"]:checked ~ .program-label {
    background: #2299dd;
    color: white;
}

.program-option:has(input[value="DF"]).selected {
    background: #2299dd;
    border-color: #2299dd;
}

.program-option:has(input[value="MF"]).selected,
.program-option:has(input[value="MF"]) input[type="radio"]:checked ~ .program-label {
    background: #d70601;
    color: white;
}

.program-option:has(input[value="MF"]).selected {
    background: #d70601;
    border-color: #d70601;
}

.program-option:has(input[value="FP"]).selected,
.program-option:has(input[value="FP"]) input[type="radio"]:checked ~ .program-label {
    background: #4bbd13;
    color: white;
}

.program-option:has(input[value="FP"]).selected {
    background: #4bbd13;
    border-color: #4bbd13;
}

.program-option:has(input[value="Inne"]).selected,
.program-option:has(input[value="Inne"]) input[type="radio"]:checked ~ .program-label {
    background: #9333ea;
    color: white;
}

.program-option:has(input[value="Inne"]).selected {
    background: #9333ea;
    border-color: #9333ea;
}

.program-option.selected .program-label {
    color: #fff;
}

.program-option input[type="radio"]:checked ~ .program-label {
    color: #fff;
}

.platform-label:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.platform-option input[type="radio"]:checked + .platform-label {
    border-color: transparent;
    color: white;
}

.platform-label.teamviewer {
    background: linear-gradient(135deg, #0070d2 0%, #0050a0 100%);
    color: white;
}

.platform-label.anydesk {
    background: linear-gradient(135deg, #ef443b 0%, #d32f28 100%);
    color: white;
}

.platform-label.telefon {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.platform-option input[type="radio"]:not(:checked) + .platform-label.teamviewer,
.platform-option input[type="radio"]:not(:checked) + .platform-label.anydesk,
.platform-option input[type="radio"]:not(:checked) + .platform-label.telefon {
    background: white;
    color: #333;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.header-actions {
    z-index: 10;
    right: 20px;
    top: 20px;
}

.form-row {
    flex-wrap: wrap;
}

.btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.email-section {
    margin-top: 10px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.email-section-header {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.email-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

#emailTemplateSelect {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5f5;
    background: white;
    font-size: 0.95em;
}

.email-status {
    margin-top: 8px;
    font-size: 0.85em;
    color: #475569;
}

.email-shortcodes {
    margin-top: 6px;
    font-size: 0.78em;
    color: #64748b;
    line-height: 1.4;
}

.shortcode-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}

.shortcode-hint {
    font-size: 0.9em;
    color: #475569;
}

.shortcode-hint.is-copied {
    color: #10b981;
    font-weight: 600;
}

.shortcode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shortcode-chip {
    position: relative;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #3730a3;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shortcode-chip:hover {
    background: #e0e7ff;
    border-color: #818cf8;
    transform: translateY(-1px);
}

.shortcode-chip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: #111827;
    color: #f9fafb;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.75em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.shortcode-chip::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #111827;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.shortcode-chip:hover::after,
.shortcode-chip:hover::before {
    opacity: 1;
}

.email-templates-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#emailTemplatesModal .modal-content {
    max-width: 920px;
    width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
}

#emailTemplatesModal .email-template-form textarea {
    min-height: 220px;
    resize: vertical;
}

.settings-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    margin-bottom: 12px;
}

.settings-section-title {
    font-size: 0.95em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.email-templates-list {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px;
    max-height: 420px;
    overflow-y: auto;
    background: #f8fafc;
}

.email-template-card {
    background: white;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

.email-template-card h4 {
    margin-bottom: 6px;
    font-size: 0.95em;
}

.email-template-card .template-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.email-template-card .template-actions button {
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.email-template-card .template-actions .edit {
    background: #2563eb;
    color: white;
}

.email-template-card .template-actions .delete {
    background: #ef4444;
    color: white;
}

@media (max-width: 768px) {
    .email-templates-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Responsywność */
@media (max-width: 1024px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    header {
        padding-right: 260px;
    }
    
    .view-selector,
    .date-navigation,
    .interval-selector {
        justify-content: center;
    }
    
    #currentPeriod {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 10px;
    }

    header h1 {
        font-size: 1.6em;
        max-width: 100%;
    }

    header p {
        font-size: 0.95em;
        max-width: 100%;
        text-align: center;
    }

    header {
        text-align: center;
        padding-right: 30px;
    }

    .header-actions {
        position: static !important;
        width: 100%;
        align-items: stretch !important;
        margin-top: 15px;
    }

    .header-actions-buttons,
    .header-actions-search {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-actions-search input {
        width: 100% !important;
        max-width: 280px;
    }

    .controls {
        padding: 15px;
    }

    .date-navigation {
        flex-wrap: wrap;
        justify-content: center;
    }

    #currentPeriod {
        min-width: 0;
        width: 100%;
        font-size: 1em;
        line-height: 1.3;
    }
    
    .week-view {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .month-view {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .month-day {
        min-height: 80px;
        padding: 5px;
    }

    .month-day-header {
        font-size: 0.75em;
        padding: 8px 4px;
        white-space: normal;
    }

    .week-header {
        padding: 10px 5px;
    }

    .week-day-name {
        font-size: 0.75em;
    }

    .week-day-date {
        font-size: 0.95em;
    }

    .time-label {
        font-size: 0.8em;
    }

    .time-slot,
    .week-time-cell {
        padding: 10px 6px;
    }

    #calendar-container {
        padding: 15px;
    }

    .form-row {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .platform-program-row {
        flex-direction: column;
        gap: 10px;
    }

    .platform-column,
    .program-column {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
    
    .platform-selector {
        flex-direction: column;
    }

    #meetingModal .modal-content {
        width: 96vw;
        max-width: 96vw;
        margin: 2vh auto;
        padding: 12px;
        max-height: 96vh;
    }

    #clientSearchInput {
        min-width: 0;
        width: 100%;
    }

    .client-picker-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .client-picker-btn {
        width: 100%;
    }

    .client-editor-layout {
        grid-template-columns: 1fr;
    }

    .client-editor-list {
        max-height: 36vh;
    }

    .client-gus-row {
        flex-direction: column;
        align-items: stretch;
    }

    .client-gus-status {
        text-align: left;
    }
}

@media (max-width: 520px) {
    .view-btn {
        padding: 8px 10px;
        font-size: 0.85em;
    }

    .interval-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .meeting-card {
        padding: 8px;
    }
}

/* Loader */
.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
    color: #666;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.page-loader {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 9999;
}

.page-loader.is-visible {
    display: flex;
}

.page-loader-content {
    background: #ffffff;
    padding: 20px 28px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.page-loader-cog {
    font-size: 42px;
    color: #667eea;
    animation: spin 1.1s linear infinite;
}

.page-loader-text {
    font-weight: 600;
    color: #334155;
    font-size: 0.95em;
}

body.is-loading {
    overflow: hidden;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Wyszukiwanie */
.search-controls {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.search-controls input[type="text"] {
    transition: all 0.3s;
}

.search-controls input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#searchResults {
    max-height: 600px;
    overflow-y: auto;
}

#searchResults::-webkit-scrollbar {
    width: 8px;
}

#searchResults::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#searchResults::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#searchResults::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.field-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    border: 1px solid #cbd5f5;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    position: relative;
    line-height: 1;
}

.field-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 140%;
    transform: translateX(-50%);
    background: #111827;
    color: #f9fafb;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
    z-index: 10;
}

.field-tooltip:hover::after {
    opacity: 1;
}

/* Animacja podświetlenia znalezionego spotkania */
.highlight-found {
    animation: flashHighlight 3s ease-in-out;
    position: relative;
    z-index: 5;
}

.time-slot.highlight-found {
    color: #111827;
}

.time-slot.occupied.highlight-found:not(.completed):not(.draft) .meeting-client,
.time-slot.occupied.draft.highlight-found .meeting-client,
.time-slot.completed.highlight-found .meeting-client,
.time-slot.occupied.highlight-found:not(.completed):not(.draft) .meeting-time-range,
.time-slot.occupied.draft.highlight-found .meeting-time-range,
.time-slot.completed.highlight-found .meeting-time-range,
.time-slot.occupied.highlight-found:not(.completed):not(.draft) .meeting-author-email,
.time-slot.occupied.draft.highlight-found .meeting-author-email,
.time-slot.completed.highlight-found .meeting-author-email,
.time-slot.highlight-found .meeting-overlap,
.time-slot.highlight-found .meeting-unavailability-note,
.time-slot.highlight-found .meeting-datetime {
    color: #111827;
}

@keyframes flashHighlight {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        background-color: inherit;
    }
    15% {
        box-shadow: 0 0 30px 10px rgba(255, 215, 0, 0.9), 0 0 50px 15px rgba(102, 126, 234, 0.6);
        background-color: rgba(255, 215, 0, 0.2);
        transform: scale(1.03);
    }
    30% {
        box-shadow: 0 0 20px 5px rgba(255, 215, 0, 0.7), 0 0 40px 10px rgba(102, 126, 234, 0.4);
        background-color: rgba(255, 215, 0, 0.15);
        transform: scale(1.02);
    }
    45% {
        box-shadow: 0 0 25px 8px rgba(255, 215, 0, 0.8), 0 0 45px 12px rgba(102, 126, 234, 0.5);
        background-color: rgba(255, 215, 0, 0.18);
        transform: scale(1.03);
    }
    60% {
        box-shadow: 0 0 15px 3px rgba(255, 215, 0, 0.5), 0 0 30px 8px rgba(102, 126, 234, 0.3);
        background-color: rgba(255, 215, 0, 0.1);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        background-color: inherit;
        transform: scale(1);
    }
}

/* Animacja slajdu dla modalu potwierdzenia */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
