:root {
    --bg: #f4f6f3;
    --bg-soft: #eef2ec;
    --surface: #ffffff;
    --surface-2: #f8faf7;
    --border: #dbe4da;
    --border-strong: #c7d3c7;

    --text: #1e2a23;
    --text-soft: #5d6b62;
    --text-faint: #7a897f;

    --primary: #173d2d;
    --primary-2: #224f3b;
    --primary-3: #2f664d;
    --primary-soft: #e6efe9;

    --danger: #8a2f2f;
    --warning: #b5852b;
    --success: #2d6a4f;

    --shadow-sm: 0 8px 20px rgba(23, 61, 45, 0.06);
    --shadow-md: 0 18px 40px rgba(23, 61, 45, 0.10);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;

    --container: 1400px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 79, 59, 0.05), transparent 28%),
        linear-gradient(180deg, #f8faf8 0%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.55;
}

a {
    color: var(--primary-2);
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    display: block;
}

.app-body {
    min-height: 100vh;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(244, 246, 243, 0.9);
    border-bottom: 1px solid rgba(215, 223, 215, 0.8);
}

.header-shell {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 20px 12px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 12px;
}

.brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    flex: 1;
}

.brand-block {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.brand-subtitle {
    color: var(--text-soft);
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.3;
}

.header-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 320px;
}

.meta-pill {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #edf1ed;
    border-radius: 999px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(23, 61, 45, 0.04);
}

.meta-label {
    color: #a2aca5;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta-value {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}


.nav-link,
.nav-link-button {
    appearance: none;
    border: 1px solid #edf1ed;
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary);
    padding: 10px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    line-height: 1;
    transition: 0.18s ease;
    box-shadow: 0 4px 14px rgba(23, 61, 45, 0.04);
}

.nav-link:hover,
.nav-link-button:hover,
.nav-dropdown:hover > .nav-link-dropdown {
    background: #ffffff;
    border-color: #e4ebe4;
    color: var(--primary-2);
    transform: translateY(-1px);
}

.nav-link-danger {
    color: #9b4f4f;
}

.nav-link-danger:hover {
    border-color: rgba(138, 47, 47, 0.15);
    background: #fff8f8;
    color: var(--danger);
}

.nav-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
}

.logout-form {
    margin: 0;
    display: inline-flex;
    width: auto;
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    width: auto;
}

.nav-link-dropdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.dropdown-arrow {
    font-size: 12px;
    opacity: 0.8;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 250px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    padding: 10px;
    display: none;
    z-index: 200;
}

.dropdown-menu a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-dropdown.open .dropdown-menu {
    display: block;
}

.nav-dropdown:focus-within .dropdown-menu {
    display: block;
}

/* MOBILE TOGGLE */
/* MOBILE TOGGLE */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    margin: 0;
    transition: 0.2s ease;
}

/* PAGE */
.page-shell {
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 24px 40px;
}

.page-shell-auth {
    width: 100%;
    max-width: 540px;
}

.page-card,
.card,
.section-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.page-title,
h1,
h2,
h3 {
    color: var(--text);
    margin-top: 0;
}

h1 {
    font-size: 34px;
    margin-bottom: 20px;
}

h2 {
    font-size: 28px;
    margin-bottom: 18px;
}

h3 {
    font-size: 22px;
    margin-bottom: 16px;
}

p {
    margin-top: 0;
}

/* ALERTS */
.messages-stack {
    margin-bottom: 20px;
}

.alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: #edf7f1;
    border-color: #cfe6d7;
    color: #214d38;
}

.alert-warning {
    background: #fff7e8;
    border-color: #ead7a6;
    color: #7b5a13;
}

.alert-error,
.alert-danger {
    background: #fff2f2;
    border-color: #e7c5c5;
    color: #7e2b2b;
}

.alert-info {
    background: #f6f9f7;
    border-color: var(--border);
    color: var(--text);
}

/* AUTH */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 34px 30px;
    box-shadow: var(--shadow-md);
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    color: #fff;
    font-weight: 700;
    font-size: 20px;
}

.auth-title {
    font-size: 30px;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: var(--text-soft);
    margin-bottom: 28px;
}

.auth-footer {
    margin-top: 20px;
    color: var(--text-soft);
    font-size: 14px;
}

/* FORMS */
form p {
    margin-bottom: 16px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 15px;
    transition: 0.2s ease;
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-3);
    box-shadow: 0 0 0 4px rgba(47, 102, 77, 0.12);
}

.helptext {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-faint);
}

.errorlist {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--danger);
    font-size: 14px;
}

button,
.btn {
    appearance: none;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    text-decoration: none;
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-2);
}

.btn-danger {
    background: linear-gradient(135deg, #7b2d2d, #9f3d3d);
}

/* TABLES */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th {
    background: #f0f5f1;
    color: var(--primary);
    text-align: left;
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf1ec;
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

/* CALENDAR EXISTENT */
.calendar-topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-date-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-date-form input,
.calendar-date-form button {
    padding: 10px 12px;
    font-size: 14px;
}

.calendar-actions {
    margin: 18px 0;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 18px 0;
    font-size: 14px;
}

.legend-item {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.legend-free { background: #edf8ef; }
.legend-scheduled { background: #fff5dc; }
.legend-confirmed { background: #e4f0ff; }
.legend-done { background: #e6f6ea; }
.legend-no-show { background: #fdeaea; }
.legend-cancelled { background: #f1f2f3; }

.kpi-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 18px;
    min-width: 180px;
    box-shadow: var(--shadow-sm);
}

.kpi-label {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.calendar-wrapper {
    overflow-x: auto;
    border-radius: 20px;
}

.calendar-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    border: none;
    box-shadow: none;

}

.calendar-table th {
    background: #edf3ee;
    padding: 12px 10px;
    border: 1px solid var(--border);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
}

.calendar-table td {
    border: 1px solid #e5ece5;
    padding: 4px;
    vertical-align: top;
}

.time-cell {
    width: 88px;
    min-width: 88px;
    text-align: center;
    font-weight: 700;
    background: #f8fbf8;
    height: 24px;
}

.free-cell {
    background: #edf8ef;
    text-align: center;
    vertical-align: middle;
}

.appointment-cell {
    vertical-align: top;
}

.status-scheduled { background: #fff5dc; }
.status-confirmed { background: #e4f0ff; }
.status-done { background: #e6f6ea; }
.status-no-show { background: #fdeaea; }
.status-cancelled { background: #eef0ef; }

.appointment-time {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.appointment-client {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.appointment-service {
    font-size: 13px;
    margin-bottom: 6px;
}

.appointment-status {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-soft);
}

.appointment-actions {
    font-size: 13px;
    line-height: 1.6;
}

.blocked-cell {
    background: #f2f4f2;
    color: #7e857f;
    text-align: center;
    font-size: 12px;
}

.appointment-note {
    font-size: 12px;
    margin-top: 6px;
}

.appointment-continuation {
    padding: 0;
    line-height: 0;
    font-size: 0;
}

/* UTILITY */
.text-muted {
    color: var(--text-soft);
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.content-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* RESPONSIVE */
@media (max-width: 980px) {
    .header-shell {
        padding: 12px 14px 10px;
    }

    .header-top {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 0;
    }

    .brand-row {
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
    }

    .brand-block {
        min-width: 0;
        align-items: center;
    }

    .brand-title {
        font-size: 18px;
    }

    .brand-subtitle {
        font-size: 11px;
        line-height: 1.25;
    }

    .header-meta {
        display: none;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .nav-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
        width: 100%;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav > .nav-link,
    .main-nav > .nav-dropdown,
    .main-nav > .logout-form {
        width: 100%;
    }

    .nav-dropdown {
        display: block;
        width: 100%;
    }

    .nav-link,
    .nav-link-button,
    .nav-link-dropdown {
        width: 100%;
        justify-content: space-between;
    }

    .logout-right {
        margin-left: 0;
    }

    .dropdown-menu {
        position: static;
        display: none;
        min-width: auto;
        margin-top: 8px;
        box-shadow: none;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.96);
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .content-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 20px 16px 30px;
    }


    .auth-card {
        padding: 26px 20px;
        border-radius: 22px;
    }

    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }

    th,
    td {
        padding: 12px;
    }
}

/* DASHBOARD LAYOUT */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    align-items: start;
}

/* TOP INFO CARDS */
.top-info-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.info-card {
    background: #f4f7f4;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text);
}

/* KPI IMPORTANT (INDICATORI AZI) */
.kpi-main {
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    color: white;
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow-md);
}

.kpi-main h3 {
    margin-bottom: 18px;
    color: white;
}

.kpi-list {
    display: grid;
    gap: 10px;
}

.kpi-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 6px;
}

.kpi-row:last-child {
    border-bottom: none;
}

.kpi-value-strong {
    font-weight: 700;
}

/* TABLE CARD */
.table-card {
    background: white;
    border-radius: 20px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* CTA LINK (DESCHIDE) */
.link-action {
    color: var(--primary);
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--primary-soft);
    display: inline-block;
    transition: 0.2s;
}

.link-action:hover {
    background: var(--primary);
    color: white;
}

/* SECTION TITLE */
.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}

/* DASHBOARD PREMIUM */
.dashboard-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-date {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
}

.dashboard-top-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 24px;
    align-items: start;
}

.dashboard-stack {
    display: grid;
    gap: 16px;
}

.info-card-soft {
    background: linear-gradient(180deg, #f6faf7 0%, #eef5f0 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}

.info-card-soft strong {
    color: var(--primary);
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: start;
}

.kpi-highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-3));
    color: #fff;
    border-radius: 22px;
    padding: 22px 22px 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.08);
}

.kpi-highlight h3 {
    color: #fff;
    margin-bottom: 16px;
}

.kpi-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border: none;
    box-shadow: none;
}

.kpi-table td,
.kpi-table th {
    padding: 11px 0;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.14);
    background: transparent;
    color: #fff;
}

.kpi-table tr:last-child td {
    border-bottom: none;
}

.kpi-table td:last-child,
.kpi-table th:last-child {
    text-align: right;
    font-weight: 700;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.dashboard-card h3 {
    margin-bottom: 16px;
}

.dashboard-section-space {
    margin-top: 24px;
}

.table-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.table-subtle {
    color: var(--text-soft);
    font-size: 14px;
}

.link-action {
    color: var(--primary);
    font-weight: 700;
    padding: 7px 11px;
    border-radius: 10px;
    background: var(--primary-soft);
    display: inline-block;
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.link-action:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    text-decoration: none;
}

.table-compact th,
.table-compact td {
    padding: 13px 14px;
}

@media (max-width: 1100px) {
    .dashboard-top-grid,
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

/* CALENDAR PREMIUM */
.calendar-page-header {
    margin-bottom: 18px;
}

.calendar-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 4px;
}

.calendar-toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-toolbar-group label {
    margin-bottom: 0;
    font-size: 14px;
}

.calendar-control-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 18px 0 18px;
}

.calendar-control-left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.calendar-filter-form {
    margin: 0;
}

.calendar-filter-form select {
    min-width: 210px;
}

.calendar-stats-section {
    margin-top: 26px;
}

.link-action-sm {
    padding: 5px 9px;
    font-size: 13px;
}

/* LEGENDĂ REFINATĂ */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0;
    font-size: 13px;
}

.legend-item {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(18, 49, 36, 0.08);
    box-shadow: none;
    font-size: 12px;
    font-weight: 600;
}

/* PALETĂ NOUĂ, MAI CLAR DIFERENȚIATĂ */
.legend-free,
.free-cell {
    background: #f3e6e8;
}

.legend-scheduled,
.status-scheduled {
    background: #f5ebd3;
}

.legend-confirmed,
.status-confirmed {
    background: #dfe9f4;
}

.legend-done,
.status-done {
    background: #dceee4;
}

.legend-no-show,
.status-no-show {
    background: #f3e6e8;
}

.legend-cancelled,
.status-cancelled {
    background: #f3e6e8;
}

/* TABEL CALENDAR */
.calendar-wrapper {
    overflow-x: auto;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}


.calendar-table th {
    background: #edf3ee;
    padding: 14px 10px;
    border-right: 1px solid #e2e9e2;
    border-bottom: 1px solid #dde6dd;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--primary);
    font-weight: 700;
}

.calendar-table th:last-child {
    border-right: none;
}

.calendar-table td {
    border-right: 1px solid #edf2ed;
    border-bottom: 1px solid #edf2ed;
    padding: 6px;
    vertical-align: top;
    background-clip: padding-box;
}

.calendar-table td:last-child {
    border-right: none;
}

.time-cell {
    width: 82px;
    min-width: 82px;
    text-align: center;
    font-weight: 700;
    background: #f8fbf8;
    color: var(--text);
    height: 38px;
    vertical-align: middle;
}

.free-cell {
    text-align: center;
    vertical-align: middle;
}

.free-cell a {
    display: inline-block;
    color: var(--primary-2);
    font-weight: 600;
    padding: 0;
    border-radius: 0;
    text-decoration: none;
    background: transparent;
    transition: color 0.15s ease, text-decoration-color 0.15s ease, opacity 0.15s ease;
}

.free-cell a:hover {
    background: transparent;
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.blocked-cell {
    background: #f4f5f3;
    color: #8a918b;
    text-align: center;
    font-size: 12px;
    vertical-align: middle;
}

.appointment-cell {
    vertical-align: top;
    border-radius: 0;
    color: var(--text);
}

.appointment-time {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    opacity: 0.9;
}

.appointment-client {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.appointment-service {
    font-size: 13px;
    margin-bottom: 6px;
    color: #38463d;
}

.appointment-status {
    font-size: 13px;
    margin-bottom: 10px;
    color: #405147;
    font-weight: 600;
}

.appointment-actions {
    font-size: 13px;
    line-height: 1.6;
}

.appointment-note {
    font-size: 12px;
    margin-top: 6px;
    color: #516159;
}

.appointment-continuation {
    padding: 0;
    line-height: 0;
    font-size: 0;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .calendar-title-row,
    .calendar-control-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

.calendar-title-row-compact {
    align-items: flex-start;
}

.calendar-top-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.calendar-nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    font-weight: 600;
}

.calendar-nav-links a {
    color: var(--primary-2);
    text-decoration: none;
}

.calendar-nav-links a:hover {
    color: var(--primary);
}

.calendar-toolbar-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.calendar-toolbar-inline label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.calendar-toolbar-inline input[type="date"] {
    width: auto;
    min-width: 155px;
}

.calendar-toolbar-inline button {
    margin: 0;
}

@media (max-width: 1100px) {
    .calendar-top-controls {
        align-items: flex-start;
        width: 100%;
    }

    .calendar-toolbar-inline {
        align-items: flex-start;
    }
}

/* PROGRAMĂRI CONTINUE VIZUAL, FĂRĂ ROWSPAN */
.appointment-cell,
.appointment-continuation {
    position: relative;
    border-left: 1px solid #edf2ed !important;
    border-right: 1px solid #edf2ed !important;
}

/* un singur slot */
.appointment-block-single {
    border-radius: 0;
}

.appointment-block-start {
    border-radius: 0;
    border-bottom: none !important;
    padding-bottom: 2px;
}

.appointment-block-middle {
    border-radius: 0;
    border-top: none !important;
    border-bottom: none !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.appointment-block-end {
    border-radius: 0;
    border-top: none !important;
    padding-top: 0 !important;
}

/* celulele de continuare nu mai afișează nimic, dar păstrează culoarea */
.appointment-continuation {
    min-height: 42px;
}

.appointment-continuation.appointment-block-middle,
.appointment-continuation.appointment-block-end {
    font-size: 0;
    line-height: 0;
}

/* reducem efectul de grilă între sloturile aceleiași programări */
.calendar-table td.appointment-block-start + tr td {
    border-top: none;
}

/* conținut mai compact și mai clar */
.appointment-time {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    opacity: 0.9;
}

.appointment-client {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.appointment-service {
    font-size: 13px;
    margin-bottom: 6px;
}

.appointment-status {
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 600;
}

.free-cell:hover {
    background: #f3e6e8;
}


.calendar-table th,
.calendar-table td {
    overflow: hidden;
}

.appointment-client,
.appointment-service,
.appointment-status,
.appointment-time {
    overflow-wrap: break-word;
    word-break: break-word;
}

.appointment-cell {
    text-align: center;
}

.appointment-time,
.appointment-client,
.appointment-service,
.appointment-status,
.appointment-note,
.appointment-actions {
    text-align: center;
}

.appointment-actions {
    display: flex;
    justify-content: center;
}



/* =========================
   COMPONENTE GENERALE UI
========================= */

/* Linkuri de acțiune: Editează / Deschide / Vezi */
.link-action,
a.link-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(23, 61, 45, 0.10);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: 0.18s ease;
    white-space: nowrap;
}

.link-action:hover,
a.link-action:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    text-decoration: none;
}

.link-action-sm,
a.link-action-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 9px;
}

/* Toolbar de filtre / rapoarte */
.filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px 14px;
    margin-bottom: 20px;
}

.filter-toolbar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    margin-right: 4px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 170px;
}

.filter-group-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.filter-group label,
.filter-group-inline label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.filter-toolbar input[type="date"],
.filter-toolbar input[type="month"],
.filter-toolbar select,
.filter-toolbar input[type="text"],
.filter-toolbar input[type="search"] {
    min-width: 160px;
    width: auto;
}

.filter-toolbar .btn,
.filter-toolbar button {
    align-self: end;
}

/* Formulare generale: etichetă + cîmp pe același rînd */
.form-inline-grid {
    display: grid;
    gap: 14px;
}

.form-row-inline {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.form-row-inline > label,
.form-row-inline .form-label-inline {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.form-row-inline .form-field-inline {
    min-width: 0;
}

.form-row-inline .form-field-inline input,
.form-row-inline .form-field-inline select,
.form-row-inline .form-field-inline textarea {
    width: 100%;
}

.form-row-inline .helptext {
    margin-top: 6px;
}

.form-actions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

/* Tabele: coloană acțiuni mai clară */
.table-actions {
    white-space: nowrap;
}

.table-actions .link-action,
.table-actions a.link-action {
    margin-right: 6px;
}

.table-actions .link-action:last-child,
.table-actions a.link-action:last-child {
    margin-right: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .form-row-inline {
        grid-template-columns: 1fr;
        gap: 8px;
        align-items: start;
    }

    .filter-group-inline {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .filter-toolbar input[type="date"],
    .filter-toolbar input[type="month"],
    .filter-toolbar select,
    .filter-toolbar input[type="text"],
    .filter-toolbar input[type="search"] {
        width: 100%;
        min-width: 0;
    }
}

/* =========================
   INPUT DATE / MONTH FIX
========================= */

input[type="date"],
input[type="month"] {
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(23, 61, 45, 0.15);
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    transition: 0.18s ease;
}

/* focus (important UX) */
input[type="date"]:focus,
input[type="month"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 61, 45, 0.08);
}

/* icon calendar */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.legend-online,
.status-online {
    background: #dfe9f4 !important;
}

.online-booking-page {
    min-height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 34px 0;
}

.online-booking-card {
    width: min(680px, 100%);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-md);
    padding: 28px;
}

.online-booking-brand {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.online-booking-salon {
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text);
}

.online-booking-address {
    margin-top: 8px;
    color: var(--muted);
}

.online-booking-form,
.online-booking-confirm-form {
    display: grid;
    gap: 16px;
}

.online-booking-choice,
.online-booking-field {
    display: grid;
    gap: 7px;
}

.online-booking-choice label,
.online-booking-field label {
    font-weight: 700;
    color: var(--text);
}

.online-booking-choice select,
.online-booking-choice input,
.online-booking-field input {
    width: 100%;
}

.online-booking-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 8px;
    min-height: 46px;
}

.online-slot-button {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
}

.online-slot-button:hover,
.online-slot-button.is-selected {
    background: #dfe9f4;
    border-color: #8aa9c9;
}

.online-booking-empty,
.online-booking-selected,
.online-booking-summary,
.online-booking-success {
    color: var(--muted);
}

.online-booking-empty {
    grid-column: 1 / -1;
    padding: 12px 0;
}

.online-booking-selected {
    min-height: 22px;
    font-weight: 700;
}

.online-booking-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.online-booking-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.online-booking-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8faf8;
}

.online-booking-summary strong,
.online-booking-summary span {
    display: block;
}

.online-booking-success h2 {
    margin-top: 0;
    color: var(--text);
}

@media (max-width: 640px) {
    .online-booking-card {
        border-radius: 0;
        padding: 22px;
    }

    .online-booking-contact,
    .online-booking-summary {
        grid-template-columns: 1fr;
    }

    .online-booking-summary {
        display: grid;
    }
}
input[type="date"],
input[type="month"] {
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
/* PROGRAMARE NOUĂ / EDITARE */
.appointment-client-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}

.appointment-client-panel {
    background: linear-gradient(180deg, #f7faf7 0%, #f1f6f2 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.appointment-client-panel-alt {
    background: linear-gradient(180deg, #fbf8f8 0%, #f7f2f2 100%);
}

.appointment-client-panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
}

.appointment-client-search-wrap {
    position: relative;
}

.client-search-results {
    border: 1px solid var(--border);
    display: none;
    width: 100%;
    background: #fff;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.client-search-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eef2ee;
    transition: 0.15s ease;
}

.client-search-item:last-child {
    border-bottom: none;
}

.client-search-item:hover {
    background: var(--primary-soft);
}

.selected-client-box {
    margin-top: 10px;
    color: var(--success);
    font-weight: 600;
}

.compact-form-grid .form-row-inline {
    grid-template-columns: 220px minmax(0, 1fr);
}

/* BUTOANE STATUS PROGRAMĂRI */
/* STATUS ACTIVE */
.action-confirmed,
.action-done,
.action-muted {
    color: #fff;
    border-width: 1px;
    border-style: solid;
}

.action-confirmed {
    background: #3f6f95;
    border-color: #3f6f95;
}

.action-done {
    background: #2f6a4f;
    border-color: #2f6a4f;
}

.action-muted {
    background: #7b817b;
    border-color: #7b817b;
}

/* STATUS INACTIVE */
.action-confirmed-soft,
.action-done-soft,
.action-muted-soft {
    background: #ffffff;
    color: var(--primary);
    border: 1px solid #cfd9d1;
    box-shadow: none;
}

/* hover pentru inactive */
.action-confirmed-soft:hover,
.action-done-soft:hover,
.action-muted-soft:hover {
    background: #f6faf7;
    color: var(--primary);
    border-color: #9fb8a7;
}

/* STATUS CURENT */
.action-current {
    box-shadow: 0 0 0 4px rgba(23, 61, 45, 0.10);
    transform: translateY(-1px);
}

@media (max-width: 980px) {
    .appointment-client-switcher {
        grid-template-columns: 1fr;
    }
}
/* APPOINTMENT EDIT - COMPACT 2 COLS */
.appointment-edit-card {
    padding: 18px 20px;
}

.compact-client-switcher {
    margin-bottom: 18px;
    gap: 14px;
}

.client-mode-active {
    border-color: rgba(23, 61, 45, 0.26);
    box-shadow: 0 0 0 3px rgba(23, 61, 45, 0.06);
}

.appointment-form-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 18px;
    margin-bottom: 12px;
}

.compact-inline-row {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.appointment-note-row {
    margin-top: 2px;
    margin-bottom: 14px;
}

.appointment-note-row textarea {
    min-height: 72px;
}

.appointment-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.appointment-save-wrap {
    display: flex;
    align-items: center;
}

.single-line-status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}



@media (max-width: 1100px) {
    .appointment-form-two-cols {
        grid-template-columns: 1fr;
    }

    .appointment-bottom-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .single-line-status-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .compact-inline-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
}
/* ===== FINAL OVERRIDE STATUS BUTTONS ===== */

.status-buttons-grid .link-action.action-confirmed,
.status-buttons-grid .link-action.action-done,
.status-buttons-grid .link-action.action-muted {
    color: #fff !important;
    border-width: 1px !important;
    border-style: solid !important;
}

.status-buttons-grid .link-action.action-confirmed {
    background: #3f6f95 !important;
    border-color: #3f6f95 !important;
    color: #fff !important;
}

.status-buttons-grid .link-action.action-done {
    background: #2f6a4f !important;
    border-color: #2f6a4f !important;
    color: #fff !important;
}

.status-buttons-grid .link-action.action-muted {
    background: #7b817b !important;
    border-color: #7b817b !important;
    color: #fff !important;
}

.status-buttons-grid .link-action.action-confirmed-soft,
.status-buttons-grid .link-action.action-done-soft,
.status-buttons-grid .link-action.action-muted-soft {
    background: #ffffff !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: none !important;
}

.status-buttons-grid .link-action.action-confirmed-soft:hover,
.status-buttons-grid .link-action.action-done-soft:hover,
.status-buttons-grid .link-action.action-muted-soft:hover {
    background: #f6faf7 !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.status-buttons-grid .link-action.action-current {
    box-shadow: 0 0 0 4px rgba(23, 61, 45, 0.14) !important;
    transform: translateY(-1px);
}
/* CHECKBOX ALIGN FIX */
.form-row-inline input[type="checkbox"] {
    justify-self: start;
    margin-left: 2px;
    transform: scale(1.1);
}



/* important: scoatem centrare verticală pentru checkbox */
.form-row-inline.checkbox-row {
    align-items: start;
}

/* container checkbox */

.form-row-inline.checkbox-row {
    align-items: flex-start !important;
}

.form-row-inline.checkbox-row .form-field-inline {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
}
/* CHECKBOX FIX */
.form-row-inline.checkbox-row {
    align-items: flex-start !important;
}

.form-row-inline.checkbox-row .form-field-inline {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-top: 2px;
}

.form-row-inline.checkbox-row .form-field-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    display: block;
    accent-color: var(--primary);
}
.audit-details {
    font-size: 13px;
    line-height: 1.45;
    color: #37423b;
    max-width: 520px;
}
/* RAPORT SERVICII - DIAGRAME */
.service-bars {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.service-bar-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) 60px;
    gap: 12px;
    align-items: center;
}

.service-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.service-bar-track {
    height: 12px;
    border-radius: 999px;
    background: #eef2ee;
    overflow: hidden;
    border: 1px solid #e0e8e1;
}

.service-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-3));
}

.service-bar-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

@media (max-width: 900px) {
    .service-bar-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .service-bar-value {
        text-align: left;
    }
}

#id_hour {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#id_minute {
    padding: 6px;
}

.dashboard-card-alert {
    border: 1px solid #d8b26a;
    box-shadow: 0 0 0 1px rgba(216, 178, 106, 0.12);
}

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
