/* ── Portal layout ── */

/* Sidebar two-column body */
.hd-portal-body {
    display: flex;
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
    gap: 28px;
    align-items: flex-start;
}

/* ── Sidebar ── */
.hd-sidebar {
    width: 230px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}
.hd-sidebar-nav {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
}
.hd-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #3c4535;
    transition: background .12s, color .12s;
}
.hd-sidebar-link svg { flex-shrink: 0; opacity: .7; }
.hd-sidebar-link:hover { background: #f1efe5; color: #16280f; }
.hd-sidebar-link.is-active {
    background: #16280f;
    color: #bcda6d;
}
.hd-sidebar-link.is-active svg { opacity: 1; }
.hd-sidebar-client {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hd-sidebar-email  { font-size: 12px; color: #8a917d; word-break: break-all; }
.hd-sidebar-logout { font-size: 12px; color: #c8503a; text-decoration: none; font-weight: 500; }
.hd-sidebar-logout:hover { text-decoration: underline; }

/* ── Content area ── */
.hd-content { flex: 1; min-width: 0; }

.hd-page-title {
    font-size: 26px;
    font-weight: 600;
    color: #16280f;
    margin: 0 0 8px;
}
.hd-page-sub {
    font-size: 15px;
    color: #6b7260;
    margin: 0 0 28px;
}
.hd-section { margin-bottom: 32px; }
.hd-back-link {
    display: inline-block;
    font-size: 13px;
    color: #6b7260;
    text-decoration: none;
    margin-bottom: 8px;
}
.hd-back-link:hover { color: #16280f; }
.hd-link { color: #6f9016; font-size: 14px; text-decoration: none; }
.hd-link:hover { text-decoration: underline; }

/* Header */
.hd-portal-header {
    background: #fff;
    border-bottom: 1px solid #e6e3d7;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.hd-portal-header-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}
.hd-portal-brand { text-decoration: none; display: flex; align-items: center; }
.hd-portal-logo-img  { max-height: 36px; }
.hd-portal-logo-text { font-size: 18px; font-weight: 700; color: #16280f; }
.hd-portal-header-user { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.hd-portal-header-email  { font-size: 13px; color: #8a917d; }
.hd-portal-header-logout { font-size: 13px; color: #c8503a; text-decoration: none; font-weight: 500; }
.hd-portal-header-logout:hover { text-decoration: underline; }

/* Login page (standalone, no sidebar) */
.hd-portal-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1efe5;
    padding: 40px 20px;
}
.hd-portal-box {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 22px;
    padding: 48px 44px;
    width: 100%;
    max-width: 440px;
}
.hd-portal-logo { text-align: center; margin-bottom: 24px; }
.hd-portal-logo img { max-height: 48px; }
.hd-portal-title { font-size: 26px; font-weight: 600; color: #16280f; margin: 0 0 10px; text-align: center; }
.hd-portal-sub   { font-size: 15px; color: #6b7260; text-align: center; margin: 0 0 24px; }

.hd-portal-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1efe5;
}
.hd-portal-header {
    background: #fff;
    border-bottom: 1px solid #e6e3d7;
    padding: 14px 32px;
}
.hd-portal-header-inner {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.hd-portal-greeting { font-weight: 600; color: #16280f; font-size: 15px; }
.hd-portal-back, .hd-portal-logout {
    font-size: 14px;
    color: #6b7260;
    text-decoration: none;
}
.hd-portal-back:hover, .hd-portal-logout:hover { color: #16280f; }

.hd-portal-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 32px;
    width: 100%;
    flex: 1;
}

/* ── Plan card ── */
.hd-pcard {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 18px;
    padding: 28px 32px;
    margin-bottom: 28px;
}
.hd-pcard-plan { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.hd-plan-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 999px;
    background: #16280f;
    color: #bcda6d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
}
.hd-plan-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.hd-plan-status--active   { background: #e2ecc4; color: #4a6b1e; }
.hd-plan-status--paused   { background: #fff3cd; color: #856404; }
.hd-plan-status--cancelled{ background: #f8d7da; color: #721c24; }

.hd-pcard-usage { display: flex; gap: 32px; flex-wrap: wrap; }
.hd-usage-item  { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.hd-usage-label { font-size: 12px; color: #8a917d; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.hd-usage-val   { font-size: 22px; font-weight: 700; color: #16280f; }

.hd-quota-bar  { height: 6px; background: #edeade; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.hd-quota-fill { height: 100%; background: #6f9016; border-radius: 3px; transition: width .3s; }

.hd-no-plan { background: #fff; border: 1.5px dashed #cfccba; border-radius: 18px; padding: 32px; text-align: center; color: #6b7260; margin-bottom: 28px; }

/* ── Submit CTA ── */
.hd-submit-cta { margin-bottom: 32px; display: flex; align-items: center; gap: 16px; }
.hd-quota-hint { font-size: 13px; color: #8a917d; }
.hd-limit-notice { margin-top: .75rem; padding: .85rem 1rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; }
.hd-limit-notice__text { margin: 0 0 .6rem; font-size: .9rem; color: #374151; }
.hd-discount-notice { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; font-size: .9rem; color: #166534; margin-bottom: 1.25rem; }
.hd-dash-notices { display: flex; flex-direction: column; gap: .75rem; margin-top: 1.25rem; }
.hd-dash-notices .hd-limit-notice { margin-top: 0; }
.hd-upgrade-notice { padding: .85rem 1rem; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; font-size: .9rem; color: #0c4a6e; }
.hd-upgrade-notice p { margin: 0; }
.hd-upgrade-notice a { color: #0369a1; font-weight: 600; }
.hd-upgrade-notice--cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #f5f3ff; border-color: #c4b5fd; color: #3b0764; }
.hd-upgrade-notice--cta .hd-upgrade-notice__body p { margin: .25rem 0 0; font-size: .88rem; opacity: .85; }

.hdb-reply-notice { padding: .8rem 1rem; background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; font-size: .9rem; color: #166534; margin-bottom: 1.25rem; }
.hdb-reply-notice--express { background: #fffbeb; border-color: #fcd34d; color: #92400e; }

.hdb-slot-loading { display: flex; align-items: center; gap: .6rem; padding: .75rem 0; font-size: .9rem; color: #6b7280; margin-top: .5rem; }
.hdb-slot-loading[hidden] { display: none; }
.hdb-slot-loading-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #d1d5db; border-top-color: #4a6b1e; border-radius: 50%; animation: hdbSpin .7s linear infinite; flex: none; }
@keyframes hdbSpin { to { transform: rotate(360deg); } }

/* ── Query list ── */
.hd-section-title { font-size: 20px; font-weight: 600; color: #16280f; margin: 0 0 16px; }
.hd-query-list { display: flex; flex-direction: column; gap: 10px; }
.hd-query-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 12px;
    padding: 16px 20px;
    text-decoration: none;
    transition: border-color .15s;
}
.hd-query-row:hover { border-color: #a8cc3d; }
.hd-query-subject { flex: 1; font-weight: 500; color: #16280f; font-size: 15px; }
.hd-query-date    { font-size: 13px; color: #8a917d; white-space: nowrap; }
.hd-query-status  { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.hd-query-status--open        { background: #cce5ff; color: #004085; }
.hd-query-status--in_progress { background: #fff3cd; color: #856404; }
.hd-query-status--answered    { background: #d4edda; color: #155724; }
.hd-query-status--closed      { background: #e2e3e5; color: #383d41; }

.hd-empty { color: #8a917d; font-size: 15px; }

/* ── Query detail ── */
.hd-portal-main--query { max-width: 740px; }
.hd-query-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.hd-query-title  { font-size: 24px; font-weight: 600; color: #16280f; margin: 0; flex: 1; }
.hd-query-meta-info { font-size: 13px; color: #8a917d; margin: 0 0 28px; }

.hd-thread-item {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.hd-thread-item--admin  { border-color: #b8d9a0; background: #f7fbf0; }
.hd-thread-item--original { border-color: #e6e3d7; }
.hd-thread-author { font-size: 12px; font-weight: 700; color: #7ea22a; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.hd-thread-body   { font-size: 15px; line-height: 1.65; color: #2b3327; }
.hd-thread-time   { font-size: 12px; color: #aaa; margin-top: 10px; }
.hd-thread-attachments { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.hd-thread-attachments a { color: #2271b1; text-decoration: underline; }

.hd-reply-box { background: #fff; border: 1px solid #e6e3d7; border-radius: 14px; padding: 24px; margin-top: 24px; }
.hd-reply-title { font-size: 16px; font-weight: 600; color: #16280f; margin: 0 0 14px; }

/* ── Forms ── */
.hd-form { display: flex; flex-direction: column; gap: 20px; }
.hd-form-group { display: flex; flex-direction: column; gap: 6px; }
.hd-label { font-size: 14px; font-weight: 600; color: #3c4535; }
.hd-label-hint { font-weight: 400; color: #8a917d; }
.hd-form-actions { display: flex; gap: 12px; align-items: center; }

.hd-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e6e3d7;
    border-radius: 10px;
    font-size: 15px;
    color: #16280f;
    background: #fff;
    transition: border-color .15s;
    box-sizing: border-box;
}
.hd-input:focus { outline: none; border-color: #a8cc3d; }
.hd-input--code { letter-spacing: .3em; font-size: 22px; text-align: center; }

.hd-textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #e6e3d7;
    border-radius: 10px;
    font-size: 15px;
    color: #16280f;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color .15s;
}
.hd-textarea:focus { outline: none; border-color: #a8cc3d; }

.hd-file-input { font-size: 14px; color: #6b7260; }

/* ── Buttons ── */
.hd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.hd-btn--primary {
    background: #16280f;
    color: #f1efe5;
}
a.hd-btn--primary:visited,
a.hd-btn--primary:focus,
a.hd-btn--primary:active {
    color: #f1efe5;
}
.hd-btn--primary:hover:not(:disabled) { background: #243f18; color: #f1efe5; }
.hd-btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.hd-btn--secondary {
    background: #fde68a;
    color: #78350f;
    border: 1.5px solid #fbbf24;
}
.hd-btn:hover svg {
    transform: translate(2px);
}
.hd-btn svg {
    display: inline-block;
    transition: transform 0.15s ease-in-out;
    margin-left: 10px;
    height: 12px;
}
.hd-btn--secondary:hover { background: #fbbf24; color: #78350f; }
.hd-btn--ghost {
    background: transparent;
    color: #6b7260;
    border: 1.5px solid #e6e3d7;
}
.hd-btn--ghost:hover { border-color: #aaa; color: #16280f; }

/* ── Alerts / messages ── */
.hd-alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.hd-alert--error { background: #fde8e8; color: #9b1c1c; }
.hd-msg-area { font-size: 14px; margin-top: 10px; min-height: 20px; }
.hd-msg-area--ok    { color: #155724; }
.hd-msg-area--error { color: #9b1c1c; }

/* ── Document cards ── */
.hd-doc-list { display: flex; flex-direction: column; gap: 16px; }
.hd-doc-card {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 14px;
    padding: 22px 24px;
}
.hd-doc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.hd-doc-title { font-size: 17px; font-weight: 600; color: #16280f; margin: 0; }
.hd-doc-date  { font-size: 12px; color: #aaa; white-space: nowrap; }
.hd-doc-body  { font-size: 15px; line-height: 1.65; color: #3c4535; }
.hd-doc-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #6f9016;
    text-decoration: none;
}
.hd-doc-download:hover { text-decoration: underline; }

/* ── File grid (biblioteka attachments) ── */
.hd-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.hd-file-item {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #3c4535;
    transition: border-color .15s;
    text-align: center;
}
.hd-file-item:hover { border-color: #a8cc3d; }
.hd-file-item svg   { color: #8a917d; }
.hd-file-name { font-size: 13px; font-weight: 500; word-break: break-all; }
.hd-file-meta { font-size: 11px; color: #aaa; }

/* ── Chat ── */
.hd-content--chat { display: flex; flex-direction: column; }
.hd-chat-thread {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 16px;
    padding: 20px;
    min-height: 300px;
    max-height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}
.hd-chat-empty { margin: auto; text-align: center; color: #aaa; font-size: 15px; }
.hd-chat-msg { display: flex; flex-direction: column; max-width: 72%; }
.hd-chat-msg--client { align-self: flex-end; align-items: flex-end; }
.hd-chat-msg--admin  { align-self: flex-start; align-items: flex-start; }
.hd-chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.55;
}
.hd-chat-msg--client .hd-chat-bubble { background: #16280f; color: #f1efe5; border-bottom-right-radius: 4px; }
.hd-chat-msg--admin  .hd-chat-bubble { background: #f1efe5; color: #16280f; border: 1px solid #e6e3d7; border-bottom-left-radius: 4px; }
.hd-chat-time { font-size: 11px; color: #aaa; margin-top: 4px; }

.hd-chat-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}
.hd-chat-input {
    flex: 1;
    padding: 13px 16px;
    border: 1.5px solid #e6e3d7;
    border-radius: 14px;
    font-size: 15px;
    resize: none;
    font-family: inherit;
    transition: border-color .15s;
}
.hd-chat-input:focus { outline: none; border-color: #a8cc3d; }
.hd-chat-send { align-self: flex-end; flex-shrink: 0; border-radius: 14px; }

/* ── Contact card ── */
.hd-contact-card {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 18px;
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}
.hd-contact-card--pending { color: #6b7260; font-style: italic; }
.hd-contact-avatar img { border-radius: 50%; display: block; }
.hd-contact-name  { font-size: 22px; font-weight: 600; color: #16280f; margin: 0 0 4px; }
.hd-contact-role  { font-size: 13px; color: #8a917d; margin: 0 0 12px; }
.hd-contact-email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6f9016;
    text-decoration: none;
}
.hd-contact-email:hover { text-decoration: underline; }
.hd-contact-booking {
    background: #f7fbf0;
    border: 1px solid #d2e8a0;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
}
.hd-contact-booking h3 { margin: 0 0 8px; font-size: 18px; color: #16280f; }
.hd-contact-booking p  { font-size: 14px; color: #6b7260; margin: 0 0 16px; }
.hd-contact-note { font-size: 13px; color: #8a917d; margin-top: 12px !important; }
.hd-contact-chat-cta { font-size: 14px; color: #6b7260; }
.hd-contact-chat-cta a { color: #6f9016; }

/* ── Empty state ── */
.hd-empty-state {
    background: #fff;
    border: 1.5px dashed #e0ddd1;
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    color: #8a917d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.hd-empty-state p { margin: 0; font-size: 15px; }

/* ── Query header (detail page) ── */
.hd-query-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.hd-query-title    { font-size: 22px; font-weight: 600; color: #16280f; margin: 4px 0 0; }
.hd-query-meta-info { font-size: 13px; color: #8a917d; margin: 4px 0 0; }

/* ── Query row (improved) ── */
.hd-query-row-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }

/* ── Authorized emails ── */
.hd-auth-primary {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7fbf0;
    border: 1px solid #d2e8a0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    color: #3c4535;
    margin-bottom: 20px;
}
.hd-auth-primary svg { color: #7ea22a; flex-shrink: 0; }

.hd-auth-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.hd-auth-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 14px;
    color: #3c4535;
}
.hd-auth-item svg   { color: #8a917d; flex-shrink: 0; }
.hd-auth-email      { flex: 1; font-weight: 500; }
.hd-auth-date       { font-size: 12px; color: #aaa; white-space: nowrap; }
.hd-auth-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    color: #aaa;
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
}
.hd-auth-remove:hover { color: #c8503a; background: #fff0ee; }

.hd-auth-counter { font-size: 13px; color: #8a917d; margin-bottom: 16px; }

.hd-auth-add-form { background: #fff; border: 1px solid #e6e3d7; border-radius: 14px; padding: 22px 24px; }
.hd-auth-input-row { display: flex; gap: 10px; }
.hd-auth-input-row .hd-input { flex: 1; }
.hd-auth-limit-note { font-size: 14px; color: #8a917d; font-style: italic; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .hd-portal-body { flex-direction: column; padding: 20px 16px; gap: 16px; }
    .hd-sidebar { width: 100%; position: static; }
    .hd-sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .hd-sidebar-link { padding: 8px 12px; font-size: 13px; }
    .hd-sidebar-client { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (max-width: 600px) {
    .hd-portal-box { padding: 32px 24px; }
    .hd-portal-header { padding: 12px 16px; }
    .hd-pcard { padding: 18px; }
    .hd-pcard-usage { gap: 16px; }
    .hd-query-row { flex-wrap: wrap; gap: 8px; }
    .hd-form-actions { flex-direction: column; align-items: stretch; }
    .hd-chat-msg { max-width: 88%; }
    .hd-contact-card { flex-direction: column; align-items: flex-start; }
    .hd-file-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   HD Booking form (rezervuoti-vertinima / rezervuoti-patarima)
   ══════════════════════════════════════════════════════════════ */

.hdb-wrap {
    max-width: 680px;
}

.hdb-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #16280f;
    margin: 0 0 16px;
}

/* ── Category grid ── */
.hdb-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 500px) {
    .hdb-cat-grid { grid-template-columns: 1fr; }
}

.hdb-cat-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    font-family: inherit;
    font-size: 14px;
    color: #16280f;
}

.hdb-cat-tile:hover {
    background: #f1efe5;
    border-color: #a8cc3d;
}

.hdb-cat-tile--sel {
    background: #16280f;
    border-color: #16280f;
    color: #bada6d;
}

.hdb-cat-img img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.hdb-cat-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
}

/* ── Back button ── */
.hdb-back {
    display: block;
    background: none;
    border: none;
    color: #3c4535;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: color .12s;
}

.hdb-back:hover {
    color: #16280f;
}

/* ── Calendar card ── */
.hdb-cal-wrap {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 16px;
    padding: 20px;
}

.hdb-cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #16280f;
    margin-bottom: 12px;
}

.hdb-month-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #16280f;
    padding: 4px 10px;
    border-radius: 8px;
    line-height: 1;
    transition: background .12s;
}

.hdb-month-btn:hover {
    background: #f1efe5;
}

.hdb-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-size: 12px;
    color: #9aa08d;
    text-align: center;
    padding: 8px 0;
}

.hdb-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.hdb-cal-day {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-self: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: default;
    font-family: inherit;
    color: #16280f;
    transition: background .12s, color .12s;
}

.hdb-cal-day--blank {
    visibility: hidden;
}

.hdb-cal-day--past {
    color: #c5c9b8;
    cursor: not-allowed;
}

.hdb-cal-day--avail {
    cursor: pointer;
    background: #f7fbf0;
    color: #4a6b1e;
}

.hdb-cal-day--avail:hover {
    background: #e2ecc4;
    color: #16280f;
}

.hdb-cal-day--sel {
    background: #16280f !important;
    color: #bada6d !important;
}

/* ── Time slots ── */
.hdb-cal-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hdb-time-slot {
    border: 1.5px solid #e6e3d7;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    color: #3c4535;
    cursor: pointer;
    font-family: inherit;
    transition: background .12s, border-color .12s, color .12s;
}

.hdb-time-slot:hover {
    border-color: #a8cc3d;
    background: #f7fbf0;
    color: #16280f;
}

.hdb-time-slot--sel {
    background: #16280f;
    border-color: #16280f;
    color: #bada6d;
}

/* ── Confirm summary ── */
.hdb-confirm-summary {
    background: #fff;
    border: 1px solid #e6e3d7;
    border-radius: 12px;
    padding: 4px 16px;
    margin-bottom: 1.25rem;
}

.hdb-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f1efe5;
    font-size: 14px;
    color: #3c4535;
}

.hdb-confirm-row:last-child {
    border-bottom: none;
}

.hdb-confirm-row > span:first-child {
    color: #8a917d;
    font-weight: 500;
    white-space: nowrap;
}

.hdb-confirm-row > span:last-child {
    font-weight: 600;
    color: #16280f;
    text-align: right;
}

/* ── Success screen ── */
.hdb-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 40px 20px;
}

/* ── Loading / empty ── */
.hdb-loading {
    color: #9aa08d;
    font-style: italic;
    font-size: 14px;
    padding: 8px 0;
}

.hdb-no-slots {
    color: #9aa08d;
    font-size: 13px;
    margin-top: 8px;
}

/* ── Inline message ── */
.hdb-msg {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
}

.hdb-msg--error {
    background: #fde8e8;
    color: #9b1c1c;
}

.hdb-msg--ok {
    background: #e2ecc4;
    color: #4a6b1e;
}

/* ── Toast ── */
.hdb-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #16280f;
    color: #f1efe5;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 18px rgba(0,0,0,.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s, transform .2s;
    z-index: 9999;
}

.hdb-toast--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── Amelia booking list ────────────────────────────────────────────── */
.hdb-booking-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: 1.5rem;
}
.hdb-booking-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .9rem;
    background: #fafaf8;
    border: 1px solid #e8e8e0;
    border-radius: 8px;
    font-size: .9rem;
    flex-wrap: wrap;
}
.hdb-booking-dt {
    font-weight: 600;
    color: #2c2c2c;
    min-width: 130px;
    flex-shrink: 0;
}
.hdb-booking-svc {
    color: #374151;
    font-weight: 500;
}
.hdb-booking-cat {
    color: #6b7280;
    flex: 1;
}

/* Booking status badges */
.hdb-status {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.hdb-status--approved { background: #e2f0d3; color: #2e6b0a; }
.hdb-status--pending  { background: #fff3cd; color: #856404; }
.hdb-status--canceled { background: #f3f4f6; color: #6b7280; }

/* ── Custom fields (step-fields) ────────────────────────────────────── */
.hdb-cf-group { margin-bottom: 1.25rem; }
.hdb-cf-title-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.hdb-cf-qnum { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #BAD142; color: #0C2814; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.hdb-cf-title { font-weight: 600; font-size: .95rem; color: #1a1a1a; }
.hdb-req { color: #c0392b; }
.hdb-cf-info-btn { background: none; border: none; cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0; }
.hdb-cf-desc { font-size: .85rem; color: #6b7280; margin: 0 0 .5rem; }
.hdb-cf-tooltip { position: relative; background: #f0f7da; border: 1px solid #BAD142; border-radius: 8px; padding: .75rem 2rem .75rem .85rem; margin-bottom: .5rem; font-size: .85rem; color: #2a3d0f; }
.hdb-cf-tooltip-close { position: absolute; top: .4rem; right: .5rem; background: none; border: none; cursor: pointer; font-size: .9rem; color: #4a6b1e; }
.hdb-cf-textarea { width: 100%; box-sizing: border-box; padding: .6rem .75rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: .9rem; font-family: inherit; resize: vertical; min-height: 90px; transition: border-color .15s; }
.hdb-cf-textarea:focus { outline: none; border-color: #BAD142; }
.hdb-cf-error { display: block; color: #c0392b; font-size: .8rem; margin-top: .25rem; }

/* ── Upload zones ────────────────────────────────────────────────────── */
.hdb-upload-wrap { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hdb-upload-section { flex: 1; min-width: 240px; }
.hdb-upload-title { font-size: .95rem; font-weight: 600; margin: 0 0 .2rem; color: #1a1a1a; }
.hdb-upload-hint { font-size: .8rem; color: #9ca3af; margin: 0 0 .6rem; }
.hdb-upload-zone { border: 2px dashed #d1d5db; border-radius: 10px; background: #fafafa; cursor: pointer; transition: border-color .15s, background .15s; }
.hdb-upload-zone:hover, .hdb-upload-zone--over { border-color: #BAD142; background: #f8fce8; }
.hdb-upload-zone-inner { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.25rem 1rem; color: #9ca3af; font-size: .85rem; text-align: center; pointer-events: none; }
.hdb-upload-zone-inner p { margin: 0; pointer-events: auto; }
.hdb-upload-browse { background: none; border: none; color: #4a6b1e; font-weight: 600; cursor: pointer; text-decoration: underline; font-size: inherit; padding: 0; }
.hdb-file-list { display: flex; flex-direction: column; gap: .35rem; margin-top: .5rem; }
.hdb-upload-file { display: flex; align-items: center; gap: .5rem; padding: .45rem .65rem; background: #f3f4f6; border-radius: 7px; font-size: .82rem; flex-wrap: wrap; }
.hdb-upload-icon { flex-shrink: 0; }
.hdb-upload-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; }
.hdb-upload-sz { color: #9ca3af; white-space: nowrap; flex-shrink: 0; }
.hdb-upload-st { white-space: nowrap; flex-shrink: 0; }
.hdb-upload-st--loading { color: #9ca3af; }
.hdb-upload-st--ok  { color: #2e6b0a; font-weight: 600; }
.hdb-upload-st--err { color: #c0392b; font-weight: 600; }
.hdb-upload-rm { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: .85rem; padding: 0 2px; line-height: 1; flex-shrink: 0; }
.hdb-upload-rm:hover { color: #c0392b; }
.hdb-upload-wc { font-size: .78rem; color: #6b7260; flex-basis: 100%; padding-left: 1.6rem; }
.hdb-upload-page-range { flex-basis: 100%; display: flex; align-items: center; gap: .5rem; padding-left: 1.6rem; margin-top: .15rem; }
.hdb-upload-page-label { font-size: .78rem; color: #6b7260; white-space: nowrap; }
.hdb-upload-page-input { font-size: .78rem; border: 1px solid #d1d5db; border-radius: 5px; padding: 2px 6px; width: 130px; }
.hdb-upload-summary { font-size: .85rem; color: #374151; margin-top: .5rem; padding: .4rem .65rem; background: #f3f4f6; border-radius: 7px; }
.hdb-upload-word-warn { color: #c0392b; font-weight: 600; }

/* ── Registration page ── */
.hd-reg-page .hd-portal-box { max-width: 560px; }
.hd-reg-box { text-align: left; }
.hd-reg-box .hd-portal-title,
.hd-reg-box .hd-portal-sub { text-align: left; }

.hd-reg-plans {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.hd-reg-plan-opt {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 2px solid #e6e3d7;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, background .15s;
}
.hd-reg-plan-opt:hover { border-color: #b5c98a; background: #f8faf2; }
.hd-reg-plan-opt.is-selected {
    border-color: #16280f;
    background: #f2f6e8;
}
.hd-reg-plan-name {
    font-size: 14px;
    font-weight: 700;
    color: #16280f;
}
.hd-reg-plan-price {
    font-size: 13px;
    color: #6b7260;
    font-weight: 500;
}
.hd-reg-plan-opt.is-selected .hd-reg-plan-price { color: #4a6b1e; }

.hd-reg-row {
    display: flex;
    gap: 14px;
}
.hd-reg-row .hd-reg-field { flex: 1; }

.hd-reg-field { margin-bottom: 14px; }

.hd-reg-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3c4535;
    margin-bottom: 5px;
}
.hd-req { color: #c0392b; }

.hd-reg-submit { width: 100%; justify-content: center; margin-top: 6px; }

.hd-reg-terms {
    font-size: 12px;
    color: #8a917d;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
}
.hd-reg-terms a { color: #6b7260; }

.hd-reg-success-icon {
    text-align: center;
    margin-bottom: 8px;
}
.hd-reg-success-icon svg { display: inline-block; }

@media (max-width: 480px) {
    .hd-reg-plans { flex-direction: column; }
    .hd-reg-row   { flex-direction: column; gap: 0; }
}

/* ── HD Booking — AI quality-check widget ── */
.hdb-ai-check {
    margin-top: 24px;
    border-top: 1px solid #e6e3d7;
    padding-top: 20px;
}
.hdb-ai-check-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.hdb-ai-check-info { flex: 1; min-width: 180px; }
.hdb-ai-check-title {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #16280f;
    margin-bottom: 3px;
}
.hdb-ai-check-sub {
    font-size: 12px;
    color: #6b7260;
    margin: 0;
    line-height: 1.5;
}
.hdb-ai-check-btn {
    flex-shrink: 0;
    padding: 9px 18px;
    border: 1.5px solid #16280f;
    border-radius: 999px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #16280f;
    cursor: pointer;
    transition: background .14s, color .14s;
    white-space: nowrap;
}
.hdb-ai-check-btn:hover:not(:disabled) { background: #16280f; color: #bcda6d; }
.hdb-ai-check-btn:disabled { opacity: .6; cursor: default; }

.hdb-ai-result {
    margin-top: 14px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0ddd0;
}
.hdb-ai-result-header {
    padding: 14px 18px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hdb-ai-overall--good { background: #f0fdf4; border-bottom: 1px solid #bbf7d0; }
.hdb-ai-overall--fair { background: #fffbeb; border-bottom: 1px solid #fde68a; }
.hdb-ai-overall--poor { background: #fef2f2; border-bottom: 1px solid #fecaca; }
.hdb-ai-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    width: fit-content;
}
.hdb-ai-overall--good .hdb-ai-badge { background: #dcfce7; color: #166534; }
.hdb-ai-overall--fair .hdb-ai-badge { background: #fef9c3; color: #854d0e; }
.hdb-ai-overall--poor .hdb-ai-badge { background: #fee2e2; color: #991b1b; }
.hdb-ai-summary { font-size: 13px; color: #374151; margin: 0; line-height: 1.55; }
.hdb-ai-section {
    padding: 12px 18px;
    border-bottom: 1px solid #f0ede4;
    font-size: 13px;
    color: #1f2937;
}
.hdb-ai-section:last-of-type { border-bottom: none; }
.hdb-ai-list { margin: 7px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; }
.hdb-ai-list li { line-height: 1.5; }
.hdb-ai-disclaimer {
    padding: 9px 18px;
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
    background: #fafaf8;
    border-top: 1px solid #f0ede4;
}
.hdb-ai-result-warn,
.hdb-ai-result-error { padding: 11px 14px; font-size: 13px; border-radius: 10px; }
.hdb-ai-result-warn  { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.hdb-ai-result-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.hdb-ai-result-raw   { padding: 14px 18px; font-size: 13px; color: #374151; line-height: 1.6; }
