* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Segoe UI, Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

.app {
    display: flex;
    min-height: 100vh;
}

.menu {
    width: 260px;
    background: #111827;
    color: white;
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
}

.menu nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 8px;
    display: block;
}

.menu a:hover,
.menu a.active {
    background: #374151;
}

.page {
    flex: 1;
    padding: 30px;
}

h1 {
    margin-top: 0;
}

.cards {
    display: flex;
    gap: 20px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 14px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card-title {
    color: #6b7280;
}

.card-number {
    font-size: 34px;
    font-weight: bold;
    margin-top: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
    background: white;
    padding: 18px;
    border-radius: 12px;
}

input, select, button {
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

button {
    background: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
}

.agenda {
    display: grid;
    gap: 12px;
}

.agenda-item, .booking-box {
    background: white;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.booking-box {
    max-width: 520px;
    display: grid;
    gap: 10px;
}

.success {
    color: #15803d;
    font-weight: bold;
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .cards {
        flex-direction: column;
    }
}

.user-box {
    background: #1f2937;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: grid;
    gap: 4px;
}

.user-box span {
    color: #cbd5e1;
    font-size: 13px;
}

.menu-button {
    width: 100%;
    text-align: left;
    background: #374151;
    margin-top: 12px;
}

.menu-button:hover {
    background: #4b5563;
}


.form-vertical {
    max-width: 560px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.form-group {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

    .form-group label {
        font-weight: 600;
        color: #374151;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
    }

    .form-group textarea {
        min-height: 100px;
    }

.vertical-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.vertical-group label {
        font-weight: 600;
        margin-bottom: 2px;
    }

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkbox-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 26px;
}

.checkbox-line label {
        margin: 0;
        font-weight: 600;
    }
.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .checkbox-group label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 0;
    }

.action-button {
    padding: 7px 10px;
    font-size: 14px;
}


.delete-button{
    background-color:#cc0000 !important;
    color:white !important;
    margin-left:5px;
}

.delete-button:hover{
    background-color:#990000 !important;
}


.modal-backdrop{
    position:fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    background:rgba(0,0,0,0.55);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.confirm-modal{
    background:white;
    color:#111827;
    width:420px;
    max-width:calc(100% - 30px);
    border-radius:14px;
    padding:24px;
    box-shadow:0 20px 60px rgba(0,0,0,0.30);
}

.confirm-modal h3{
    margin-top:0;
    margin-bottom:12px;
    font-size:22px;
}

.confirm-modal p{
    margin-bottom:22px;
    line-height:1.5;
}

.confirm-modal-buttons{
    display:flex;
    justify-content:flex-end;
    gap:10px;
}

.phone-row{
    display:flex;
    gap:8px;
    align-items:center;
}

.phone-row select{
    max-width:170px;
}

.phone-row input{
    flex:1;
}


.agenda-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.agenda-buttons {
    display: flex;
    gap: 8px;
}

.custom-calendar-wrapper {
    width: 100%;
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.custom-calendar {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
    background: white;
}

.custom-calendar th,
.custom-calendar td {
    border: 1px solid #e5e7eb;
    vertical-align: top;
    padding: 6px;
}

.custom-calendar th {
    background: #f8fafc;
    text-align: center;
    font-weight: 700;
    height: 54px;
}

.custom-calendar td {
    height: 54px;
}

.time-column {
    width: 80px;
    min-width: 80px;
    background: #f8fafc;
    text-align: center;
    font-weight: 600;
    color: #374151;
}

.calendar-appointment {
    color: white;
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.25;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.calendar-appointment strong {
    display: block;
    font-size: 13px;
}

.calendar-appointment span {
    display: block;
    opacity: 0.95;
}

.calendar-appointment small {
    display: block;
    opacity: 0.85;
    margin-top: 2px;
}

/* Closing days layout fix */
.closing-company-grid {
    grid-template-columns: minmax(180px, 280px);
}

.closing-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-items: start;
}

.vertical-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.vertical-group label {
    font-weight: 600;
    margin-bottom: 2px;
}

.checkbox-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 30px;
    min-height: 42px;
}

.checkbox-line input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-line label {
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
}

/* Agenda improvements */
.agenda-toolbar-modern {
    align-items: end;
    justify-content: flex-start;
}

.agenda-filter-item {
    min-width: 150px;
    margin-bottom: 0;
}

.agenda-date-jump {
    min-width: 360px;
}

.agenda-date-selects {
    display: flex;
    gap: 8px;
    align-items: center;
}

.agenda-date-selects select {
    min-width: 90px;
}

.agenda-navigation-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 12px;
}

.info-message {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 12px 14px;
    border-radius: 10px;
}

.agenda-scroll {
    max-height: calc(100vh - 290px);
    overflow-y: auto;
    overflow-x: auto;
}

.agenda-table thead th {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #f8fafc;
}

.agenda-table thead th.time-column,
.agenda-table tbody td.time-column {
    position: sticky;
    left: 0;
    z-index: 7;
}

.agenda-table thead th.time-column {
    z-index: 10;
}

.weekend-header {
    background: #fff5f5 !important;
}

.weekend-cell {
    background: #fff7f7;
}

.closed-day-header {
    background: #fee2e2 !important;
    color: #991b1b;
}

.closed-day-cell {
    background: #ffe5e5;
}

.blocked-hour-cell {
    background: #ffd6d6;
}

@media (max-width: 900px) {
    .agenda-date-jump {
        min-width: 100%;
    }

    .agenda-date-selects {
        flex-wrap: wrap;
    }

    .agenda-buttons {
        flex-wrap: wrap;
    }
}

/* Public booking page */
.public-layout {
    min-height: 100vh;
    background: #ffffff;
}

.public-booking-page {
    min-height: 100vh;
    background: #ffffff;
    color: #111827;
}

.public-booking-header {
    max-width: 1120px;
    margin: 0 auto;
    padding: 26px 28px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.public-booking-logo {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.public-booking-steps {
    background: #eaf6f8;
    border-bottom: 1px solid #d1e9ed;
    display: flex;
    justify-content: center;
    gap: 64px;
    padding: 18px 16px;
    font-weight: 700;
    color: #475569;
}

.public-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.65;
}

.public-step span {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #cbd5e1;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.public-step.active {
    opacity: 1;
    color: #0f172a;
}

.public-step.active span {
    background: #0891b2;
}

.public-booking-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px;
}

.booking-step-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 24px;
}

.booking-step-card h1 {
    font-size: 28px;
    margin-bottom: 22px;
}

.booking-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.booking-date-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.date-nav-button,
.date-today-button {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    min-width: 44px;
    font-weight: 700;
}

.date-today-button {
    min-width: 110px;
}

.date-nav-button:hover,
.date-today-button:hover {
    background: #f3f4f6;
    color: #111827;
}

.date-picker {
    max-width: 180px;
}

.selected-date-title {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    padding: 14px 16px;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
}

.available-time-list {
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.available-time-button {
    width: 100%;
    display: block;
    background: #4ade80;
    color: #111827;
    border: none;
    border-bottom: 3px solid #ffffff;
    border-radius: 0;
    padding: 14px 18px;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
}

.available-time-button:hover {
    background: #22c55e;
    color: #111827;
}

.two-column-booking {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 52px;
    border: none;
}

.personal-data-column h1,
.appointment-summary-column h1 {
    font-size: 28px;
    margin-bottom: 26px;
}

.appointment-summary-box {
    margin-bottom: 48px;
    line-height: 1.7;
}

.appointment-summary-column h2 {
    font-size: 26px;
    margin-bottom: 22px;
}

.public-phone-row {
    width: 100%;
}

.public-checkbox-line {
    padding-top: 0;
    margin-bottom: 18px;
}

.booking-action-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 64px;
}

.primary-button,
.secondary-button {
    border: none;
    border-radius: 6px;
    padding: 14px 22px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

.primary-button {
    background: #0d6efd;
}

.secondary-button {
    background: #6b7280;
}

.public-booking-footer {
    max-width: 1120px;
    margin: 36px auto 0;
    padding: 0 28px 34px;
    text-align: right;
    color: #6b7280;
}

.public-booking-footer a {
    color: #111827;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 800px) {
    .public-booking-header {
        padding: 22px 18px 14px;
    }

    .public-booking-logo {
        font-size: 30px;
    }

    .public-booking-steps {
        justify-content: flex-start;
        gap: 20px;
        overflow-x: auto;
        padding: 16px 18px;
    }

    .public-booking-shell {
        padding: 20px 16px;
    }

    .booking-step-card {
        padding: 18px;
        border-radius: 10px;
    }

    .booking-step-card h1,
    .personal-data-column h1,
    .appointment-summary-column h1 {
        font-size: 28px;
    }

    .two-column-booking {
        display: block;
    }

    .appointment-summary-column {
        margin-top: 34px;
    }

    .booking-action-row {
        margin-top: 34px;
        flex-direction: row;
    }

    .booking-action-row button {
        width: 100%;
    }

    .public-booking-footer {
        text-align: center;
    }
}


/* Mobile collapsible admin menu */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

@media (max-width: 900px) {
    .app {
        display: block;
        min-height: 100vh;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 14px;
        right: 14px;
        z-index: 3001;
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 12px;
        background: #1f2937;
        color: #ffffff;
        font-size: 26px;
        line-height: 1;
        box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    }

    .mobile-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 2998;
        background: rgba(0,0,0,0.45);
    }

    .menu {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 2999;
        width: 285px;
        max-width: 85vw;
        height: 100vh;
        padding: 24px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 12px 0 30px rgba(0,0,0,0.30);
    }

    .menu.mobile-open {
        transform: translateX(0);
    }

    .page {
        width: 100%;
        padding: 78px 16px 24px;
    }

    .brand {
        padding-right: 55px;
    }
}
