:root {
    --fc-border-color: #dee2e6;
    --fc-today-bg-color: rgba(13, 110, 253, 0.06);
    --fc-button-bg-color: #0d6efd;
    --fc-button-active-bg-color: #0a58ca;
    --fc-button-border-color: #0d6efd;
    --fc-button-hover-bg-color: #0b5ed7;
    --fc-button-hover-border-color: #0a58ca;
}

body {
    background: #f5f7fa;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Calendar container */
#calendar {
    background: #fff;
    border-radius: .75rem;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.fc .fc-toolbar-title { font-size: 1.05rem; font-weight: 600; }

.fc .fc-event {
    border-radius: 4px;
    border: none;
    padding: 1px 4px;
    font-size: .78rem;
    cursor: pointer;
    transition: opacity .15s;
}
.fc .fc-event:hover { opacity: .85; }

/* Compact slot height — fits full day on laptop */
.fc .fc-timegrid-slot { height: 0.75rem !important; }

/* Grey time labels */
.fc .fc-timegrid-slot-label-cushion {
    color: #212529;
    font-size: 0.7rem;
    padding-right: 6px;
}

/* Subtle hover on empty slots */
.fc .fc-timegrid-slot-lane:hover { background: rgba(13,110,253,.04); cursor: pointer; }

/* Slot picker buttons */
.slot-btn {
    display: inline-block;
    padding: .3rem .65rem;
    border: 1px solid #dee2e6;
    border-radius: .4rem;
    background: #fff;
    cursor: pointer;
    font-size: .875rem;
    transition: all .12s;
    user-select: none;
}
.slot-btn:hover  { border-color: #0d6efd; color: #0d6efd; }
.slot-btn.active { background: #0d6efd; border-color: #0d6efd; color: #fff; font-weight: 500; }

/* Cards */
.card { border: none; box-shadow: 0 1px 4px rgba(0,0,0,.08); border-radius: .75rem; }
.card-header { border-radius: .75rem .75rem 0 0 !important; }

/* Table */
.table th { font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em;  }

/* Navbar tweaks */
.navbar-brand { font-size: 1.05rem; }

/* Login page */
.login-card { max-width: 380px; width: 100%; }

/* Next slot info box */
.next-slot-box {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: .5rem;
    padding: .75rem 1rem;
    font-size: .9rem;
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 767px) {
    .main-content { padding: 0.5rem !important; }

    #calendar { padding: 0.4rem; border-radius: .5rem; }

    .fc .fc-toolbar { flex-wrap: wrap; gap: 4px; }
    .fc .fc-toolbar-title { font-size: 0.85rem; }
    .fc .fc-button {
        font-size: 0.72rem;
        padding: 0.2rem 0.45rem;
    }
    .fc .fc-col-header-cell-cushion {
        font-size: 0.72rem;
        padding: 3px 2px;
    }
    .fc .fc-timegrid-slot-label-cushion { font-size: 0.62rem; }

    /* Dropdown date picker — pełna szerokość na mobile */
    #jump-dropdown { width: 220px; }

    /* Tabela usług — ukryj kolumnę ceny na małych ekranach */
    .table .col-price { display: none; }

    /* Formularz nowej wizyty — mniejszy padding */
    .card-body { padding: 1rem !important; }
}

/* ── Autocomplete klientów (picker kontaktów) ──────────────── */
.ac-wrap { position: relative; }

.ac-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    padding: 6px;
}

.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.ac-item:hover,
.ac-item.active { background: #f3f4f6; }

.ac-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .02em;
}

.ac-info { flex: 1; min-width: 0; }
.ac-name {
    font-weight: 600;
    font-size: .9rem;
    color: #111827;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-phone {
    font-size: .8rem;
    color: #6b7280;
    line-height: 1.2;
}

.ac-badge {
    flex-shrink: 0;
    font-size: .72rem;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 2px 9px;
    font-weight: 500;
}
.ac-item:hover .ac-badge,
.ac-item.active .ac-badge { background: #fff; }

.ac-empty {
    padding: 14px;
    text-align: center;
    color: #9ca3af;
    font-size: .85rem;
}
