html, body {
    background: #f6f4ef;
    color: #262626;
    font-family: "Segoe UI", Arial, sans-serif;
}

a, .btn-link {
    color: #7b3f54;
}

h1, h2 {
    letter-spacing: 0;
}

h1 {
    font-size: 2rem;
    margin: 0;
}

h1:focus {
    outline: none;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

section, .auth-panel {
    background: #fff;
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.content {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.btn-primary {
    background-color: #7b3f54;
    border-color: #7b3f54;
}

.btn-primary:hover {
    background-color: #693548;
    border-color: #693548;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(123, 63, 84, .18);
    border-color: #7b3f54;
}

.page-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.page-header p {
    color: #6f6a61;
    margin: .25rem 0 0;
}

.toolbar {
    align-items: end;
    display: flex;
    gap: .75rem;
}

.toolbar .form-control {
    min-width: 220px;
}

.auth-panel {
    margin: 4rem auto;
    max-width: 480px;
}

.form-grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.compact {
    grid-template-columns: 1fr;
}

.form-grid label {
    color: #4d4942;
    font-weight: 600;
}

.form-grid input, .form-grid textarea, .form-grid select {
    margin-top: .35rem;
}

.client-profile-form {
    max-width: 980px;
}

.span-2 {
    grid-column: span 2;
}

.appointment-list-time {
    min-width: 210px;
    white-space: nowrap;
}

.service-picker {
    color: #4d4942;
}

.service-options {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: .45rem;
}

.service-option {
    align-items: center;
    background: #faf9f6;
    border: 1px solid #e0d9cc;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    gap: .5rem;
    min-height: 2.6rem;
    padding: .45rem .6rem;
}

.service-option:has(input:checked) {
    background: #f4e8ed;
    border-color: #b98999;
}

.service-option input {
    flex: 0 0 auto;
    margin: 0;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.inline-form {
    align-items: center;
    display: grid;
    gap: .5rem;
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) auto;
}

.password-field {
    align-items: stretch;
    display: grid;
    gap: .4rem;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: .35rem;
}

.password-field .form-control {
    margin-top: 0;
}

.password-field .btn {
    min-width: 78px;
}

.checkbox-row {
    align-items: center;
    display: flex;
    gap: .5rem;
    margin-top: 1.8rem;
}

.checkbox-row input {
    margin: 0;
}

.form-control-color {
    min-height: 2.4rem;
    padding: .25rem;
    width: 100%;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.color-swatch {
    border: 2px solid #d8d1c5;
    border-radius: 999px;
    height: 28px;
    width: 28px;
}

.color-swatch.selected {
    border-color: #2f2a27;
    box-shadow: 0 0 0 2px rgba(47, 42, 39, .14);
}

.color-dot {
    border: 1px solid rgba(47, 42, 39, .2);
    border-radius: 999px;
    display: inline-block;
    height: .85rem;
    margin-right: .35rem;
    vertical-align: -.1rem;
    width: .85rem;
}

.appointment-row > td {
    background: color-mix(in srgb, var(--appointment-row-color, #efe5e9) 42%, #fff);
}

.appointment-row:hover > td {
    background: color-mix(in srgb, var(--appointment-row-color, #efe5e9) 58%, #fff);
}

.appointment-row.first-visit > td:first-child {
    border-left: 5px solid #198754;
}

.appointment-row.first-visit > td:first-child::after {
    color: #146c43;
    content: "Prvi dolazak";
    display: block;
    font-size: .7rem;
    font-weight: 700;
}

.status-pill {
    border-radius: 999px;
    display: inline-block;
    font-size: .82rem;
    padding: .18rem .5rem;
    white-space: nowrap;
}

.status-current {
    background: #d1e7dd;
    color: #0f5132;
}

.status-late {
    background: #f8d7da;
    color: #842029;
}

.status-next {
    background: #cff4fc;
    color: #055160;
}

.stylist-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.1rem;
    padding: .75rem 1rem;
}

.stylist-legend span {
    white-space: nowrap;
}

.quick-time-slots {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1rem;
}

.two-column {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
}

.two-column.wide-left {
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
}

.metric-grid, .summary-band, .info-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.metric, .summary-band div, .info-grid div {
    background: #fff;
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    padding: 1rem;
}

.metric span, .summary-band span, .info-grid span {
    color: #6f6a61;
    display: block;
    font-size: .85rem;
}

.metric strong, .summary-band strong, .info-grid strong {
    display: block;
    font-size: 1.35rem;
    margin-top: .25rem;
    overflow-wrap: anywhere;
}

.table-wrap {
    overflow-x: auto;
}

.dashboard-today-appointments {
    max-height: 28rem;
    overflow-y: auto;
}

.dashboard-today-appointments thead th {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.holiday-year {
    max-width: 8rem;
}

.working-hours-days-off {
    max-height: 32rem;
    overflow-y: auto;
}

.table {
    margin-bottom: 0;
}

.actions {
    white-space: nowrap;
}

.actions .btn {
    margin: .1rem;
}

.muted {
    color: #6f6a61;
}

.list-stack {
    display: grid;
    gap: .5rem;
}

.list-row {
    align-items: center;
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    color: inherit;
    display: flex;
    justify-content: space-between;
    padding: .75rem;
    text-decoration: none;
}

.list-row .actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
}

.list-row small {
    color: #6f6a61;
    display: block;
    margin-top: .15rem;
}

.upcoming-appointments {
    margin-bottom: 1.5rem;
}

.appointment-editor {
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1rem;
}

.appointment-editor h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.timeline {
    display: grid;
    gap: .75rem;
}

.timeline-item {
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    padding: 1rem;
}

.timeline-head {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.timeline-head span {
    color: #6f6a61;
    display: block;
}

.timeline dl {
    display: grid;
    gap: .35rem .75rem;
    grid-template-columns: 110px minmax(0, 1fr);
    margin: .75rem 0 0;
}

.timeline dt {
    color: #6f6a61;
    font-weight: 600;
}

.timeline dd {
    margin: 0;
}

.total-box {
    background: #f6f4ef;
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    padding: .75rem;
}

.hint-box {
    background: #f6f4ef;
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    color: #6f6a61;
    padding: .65rem .75rem;
}

.calendar-grid {
    display: grid;
    gap: .35rem;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    margin-bottom: 1rem;
}

.calendar-weekday {
    background: #2f2a27;
    border-radius: 6px;
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
    padding: .5rem .6rem;
    text-align: center;
}

.calendar-day {
    background: #fff;
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: 138px;
    min-height: 0;
    overflow: hidden;
    padding: .5rem;
}

.calendar-day.selected-day {
    border-color: #7b3f54;
    box-shadow: inset 0 0 0 1px #7b3f54;
}

.calendar-day.empty-calendar-day {
    cursor: pointer;
}

.calendar-day.empty-calendar-day:hover {
    background: #fbf7f8;
    border-color: #b98999;
}

.calendar-day-header {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: flex;
    justify-content: space-between;
    padding: 0;
    text-align: left;
    width: 100%;
}

.calendar-day-header strong {
    font-size: 1.05rem;
}

.calendar-day-header span {
    background: #7b3f54;
    border-radius: 999px;
    color: #fff;
    font-size: .75rem;
    min-width: 1.45rem;
    padding: .1rem .35rem;
    text-align: center;
}

.calendar-items-preview {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.muted-day {
    background: #faf9f6;
    color: #918a7d;
}

.calendar-item {
    background: #efe5e9;
    border: 1px solid #d9c6ce;
    border-radius: 6px;
    color: #3d2931;
    display: block;
    font-size: .78rem;
    margin-top: .25rem;
    padding: .18rem .3rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.calendar-item strong,
.calendar-item small,
.calendar-item span {
    display: block;
    line-height: 1.25;
}

.calendar-item small {
    color: #6f6a61;
}

.calendar-item:hover {
    background: #e4d2da;
    color: #2f1d25;
}

.calendar-more {
    background: transparent;
    border: 0;
    color: #7b3f54;
    font-size: .78rem;
    font-weight: 700;
    padding: .15rem 0 0;
    text-align: left;
}

.day-schedule {
    margin-bottom: 1rem;
}

.day-filter-grid {
    align-items: end;
    background: #f6f4ef;
    border: 1px solid #e0d9cc;
    border-radius: 8px;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(170px, 1.2fr) minmax(150px, 1fr) repeat(2, minmax(120px, .75fr)) minmax(150px, 1fr) minmax(150px, 1fr) auto;
    margin-bottom: 1rem;
    padding: .85rem;
}

.day-filter-grid label {
    color: #4d4942;
    font-weight: 600;
}

.day-filter-grid .form-control,
.day-filter-grid .form-select {
    margin-top: .3rem;
}

.day-filter-actions {
    display: flex;
    justify-content: flex-end;
}

.section-header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header p {
    color: #6f6a61;
    margin: .25rem 0 0;
}

.alert {
    margin-bottom: 0;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    background: #fff0f0;
    border-top: 1px solid #d18a8a;
    bottom: 0;
    display: none;
    left: 0;
    padding: .75rem 1rem;
    position: fixed;
    right: 0;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
}

@media print {
    .sidebar, .top-row, .print-hide {
        display: none !important;
    }

    .content {
        padding: 0;
    }

    section, .metric, .summary-band div {
        break-inside: avoid;
        border-color: #bbb;
    }
}
