:root, html, body { color-scheme: light !important; }
/* ==========================================================================
   FOGLALJBE.HU - UNIFIED ROSE GOLD & PEZSGŐ BLUSH LUXURY THEME
   ========================================================================== */

:root {
    --primary: #A86B58;
    --primary-dark: #965B49;
    --primary-light: #C9887E;
    --bg-dark: #FAF5EA;
    --bg-card: #FFFFFF;
    --text-main: #2A120E;
    --text-muted: #54433E;
    --accent: #B57966;
    --accent-glow: rgba(163, 103, 84, 0.35);
    --border-warm: #EFE4DC;
    --border-input: #D9C8BE;
    --danger: #B91C1C;
    --success: #047857;
    --glass: rgba(255, 255, 255, 0.98);
    --glass-border: #EFE4DC;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Elegáns Editorial Serif Címsorok */
h1, h2, h3, .section-title, #welcomeText, .modal-title {
    font-family: 'DM Serif Display', Georgia, serif !important;
    font-weight: 400 !important;
    color: #2A120E !important;
    letter-spacing: -0.5px !important;
}

/* Kártyák és Panelek Egységes Megjelenése */
.panel, .card, .modal-card, .modal {
    background: #FFFFFF !important;
    border: 1px solid var(--border-warm) !important;
    border-radius: 20px !important;
    color: #2A120E !important;
    box-shadow: 0 4px 20px rgba(163, 103, 84, 0.05) !important;
}

/* Minden Űrlapmező Tiszta Fehér és Magas Kontraszt */
input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
select,
textarea,
.form-input,
.form-control {
    padding: 0.75rem 1.15rem !important;
    min-height: 46px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    width: 100%;
    background: #FFFFFF !important;
    border: 1px solid var(--border-input) !important;
    color: #2A120E !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

input:focus, select:focus, textarea:focus, .form-input:focus {
    border-color: #B57966 !important;
    box-shadow: 0 0 0 3px rgba(181, 121, 102, 0.18) !important;
    outline: none !important;
}

input::placeholder, textarea::placeholder {
    color: #9C8E85 !important;
    opacity: 1 !important;
}

select option {
    background-color: #FFFFFF !important;
    color: #2A120E !important;
}

/* Statisztika / KPI kártyák */
.stat-card {
    background: #FFFFFF !important;
    border: 1px solid var(--border-warm) !important;
    border-radius: 20px !important;
    padding: 1.75rem 2rem !important;
    box-shadow: 0 4px 18px rgba(163, 103, 84, 0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: 120px !important;
    box-sizing: border-box !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.stat-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(163, 103, 84, 0.09) !important;
}
.stat-label {
    color: #6B5550 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 0.65rem !important;
    line-height: 1.3 !important;
}
.stat-value {
    color: #2A120E !important;
    font-family: 'DM Serif Display', Georgia, serif !important;
    font-size: 2.2rem !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Gombok és Kapszulák */
.btn-primary,
.section-title .btn-primary,
button[onclick="openNewApptModal()"] {
    background: linear-gradient(135deg, #B57966 0%, #A36754 100%) !important;
    color: #FFFFFF !important;
    border-radius: 999px !important;
    box-shadow: 0 6px 18px rgba(163, 103, 84, 0.35) !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: transform 0.15s, box-shadow 0.2s !important;
}

.btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 22px rgba(163, 103, 84, 0.45) !important;
}

.btn-ghost {
    background: #FFFFFF !important;
    border: 1px solid var(--border-input) !important;
    color: #2A120E !important;
    border-radius: 999px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-ghost:hover {
    background: #FAF5EA !important;
    border-color: #B57966 !important;
    color: #B57966 !important;
}

/* Jelvények (Badges) */
.badge-success, .partner-status-badge.connected, .status-done {
    background: #ECFDF5 !important;
    color: #047857 !important;
    border: 1px solid #A7F3D0 !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
}

.badge-warning {
    background: #FFFBEB !important;
    color: #B45309 !important;
    border: 1px solid #FDE68A !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
}

.badge-danger, .partner-status-badge.disconnected {
    background: #FEF2F2 !important;
    color: #B91C1C !important;
    border: 1px solid #FECACA !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
}

/* Toast Értesítések */
.toast {
    background: #2A120E !important;
    color: #FAF5EA !important;
    border: 1px solid #4A2E28 !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 30px rgba(42, 18, 14, 0.25) !important;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #FFFFFF;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    box-shadow: 4px 0 20px rgba(163, 103, 84, 0.04);
}

.sidebar .logo {
    display: block !important;
    gap: 0 !important;
}

.logo {
    font-size: 1.5rem;
    font-family: 'DM Serif Display', Georgia, serif;
    margin-bottom: 2.2rem;
    padding: 0 0.5rem;
    text-decoration: none;
    color: var(--text-main);
}

.logo-text {
    display: inline-flex;
    align-items: baseline;
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    color: #2A120E;
    font-size: 1.5rem;
}

.logo-accent {
    color: #A86B58;
}

.logo-tld {
    color: #A86B58;
    font-weight: 400;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(168, 107, 88, 0.12);
    color: var(--primary);
    font-weight: 700;
}

.nav-link svg {
    width: 20px;
    height: 20px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex-grow: 1;
    padding: 2rem 3rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #B57966 0%, #A36754 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Dashboard Stats */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 1.75rem !important;
    margin-bottom: 2.5rem !important;
}

/* Guest Table */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    background: #FAF5EA;
}

td {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-main);
}

.guest-info {
    display: flex;
    flex-direction: column;
}

.guest-name {
    font-weight: 600;
    color: #2A120E;
}

.guest-phone {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 18, 14, 0.45);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex !important;
}

.modal {
    background: #FFFFFF;
    width: 100%;
    max-width: 520px;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border-warm);
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 25px 60px rgba(163, 103, 84, 0.15);
    color: var(--text-main);
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 400;
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Jelszó kukucskáló */
.input-with-toggle {
    padding-right: 2.75rem !important;
}

.password-toggle-btn {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.35rem;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
    user-select: none;
    z-index: 2;
}

.password-toggle-btn:hover {
    color: #B57966;
    background: #FAF5EA;
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}


/* Sötétített, jól olvasható Gyors Kérdés Gombok (Chips) */
#simQuickChips button,
.sim-quick-chip {
    background: #FFFFFF !important;
    border: 1px solid #D9C8BE !important;
    color: #2A120E !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    padding: 0.4rem 0.85rem !important;
    border-radius: 9999px !important;
    box-shadow: 0 2px 5px rgba(163, 103, 84, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

#simQuickChips button:hover,
.sim-quick-chip:hover {
    background: #FAF5EA !important;
    border-color: #B57966 !important;
    color: #B57966 !important;
}

/* Magas kontrasztú státusz feliratok */
.text-success,
.status-success,
.status-active {
    color: #047857 !important;
    font-weight: 600 !important;
}


/* Kényelmes belső térköz a többsoros szövegmezőknek */
textarea {
    min-height: 100px !important;
    padding: 0.85rem 1.15rem !important;
    line-height: 1.5 !important;
    resize: vertical;
}

/* Jelszómezők kényelmes helye a szem ikon mellett */
.input-with-toggle {
    padding-right: 3.2rem !important;
}

/* Időválasztók és beágyazott mezők kényelmes margóval */
input[type="time"].wh-start,
input[type="time"].wh-end,
input[type="time"].wh-break-start,
input[type="time"].wh-break-end,
input[type="time"].custom-sched-start,
input[type="time"].custom-sched-end,
input[type="time"].schedule-time {
    padding: 0.45rem 0.85rem !important;
    min-height: 38px !important;
    width: 110px !important;
}

/* Szám mezők belső térköze (ne érjen bele a fel/le nyílba) */
input[type="number"] {
    padding-right: 1.5rem !important;
}

/* Lekerekített címkék és jelvények kényelmes belső térközei */
.badge-success, .badge-warning, .badge-danger, .status-badge, .partner-status-badge {
    padding: 0.4rem 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    border-radius: 9999px !important;
}

/* Kártyák és panelek belső térköze */
.panel, .card, .modal-card, .modal {
    padding: 1.75rem !important;
}

/* Normál űrlap címkék (beviteli mezők feletti feliratok) */
.form-group > label:not(.inline-label):not(.checkbox-label),
label.form-label {
    display: block !important;
    margin-bottom: 0.45rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #2A120E !important;
}

/* Jelölőnégyzetet (Checkbox) és Rádiógombot tartalmazó címkék - TÖKÉLETES FÜGGŐLEGES KÖZÉPRE IGAZÍTÁS */
label:has(input[type="checkbox"]),
label:has(input[type="radio"]),
label.checkbox-label,
label.inline-label,
.wh-enabled-label,
.wh-break-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.45rem !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    cursor: pointer !important;
    user-select: none !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* Minden jelölőnégyzet pontos függőleges és vízszintes igazítása */
input[type="checkbox"],
input[type="radio"] {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-height: 18px !important;
    vertical-align: middle !important;
    position: relative !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
    accent-color: #B57966 !important;
    top: 0 !important;
}

select, option, input, textarea { color-scheme: light !important; }
