:root {
    --bg-color: #05050a;
    --bg-card: rgba(255, 255, 255, 0.035);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-main: #f0f0f5;
    --text-muted: #9ca3af;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #a855f7;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.14), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(168, 85, 247, 0.12), transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
}

body.is-embed {
    background-color: transparent;
    background-image: none;
    min-height: auto;
}

.bk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 2rem;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(5, 5, 10, 0.75);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.bk-topbar a.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.15rem;
}

.bk-topbar img {
    height: 36px;
    width: auto;
}

.bk-topbar .back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-glass);
    transition: all 0.2s;
}

.bk-topbar .back-link:hover {
    color: #fff;
    border-color: var(--primary);
}

.bk-container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3.5rem;
}

body.is-embed .bk-container {
    padding: 0.5rem 0.25rem 1.5rem;
}

.bk-header {
    text-align: center;
    margin-bottom: 2rem;
}

.bk-header h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.45rem;
}

.bk-header p {
    color: var(--text-muted);
    font-size: 1.02rem;
}

.bk-glass {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.bk-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: start;
}

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

.bk-panel {
    padding: 1.5rem;
}

.bk-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e0e7ff;
}

/* Duration pills */
.duration-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.4rem;
}

.duration-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 0.65rem 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-align: center;
}

.duration-pill:hover:not(:disabled) {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
}

.duration-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.duration-pill:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Client info summary for token links */
.client-badge-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
}

.client-badge-box .cb-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.92rem;
    padding: 0.25rem 0;
}

.client-badge-box .cb-label {
    color: var(--text-muted);
}

.client-badge-box .cb-val {
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.client-badge-box .cb-desc {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    color: #d1d5db;
}

/* Form fields */
.bk-field {
    margin-bottom: 0.95rem;
}

.bk-field label {
    display: block;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.bk-field input,
.bk-field textarea,
.bk-field select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.72rem 0.9rem;
    color: var(--text-main);
    font-size: 0.96rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.bk-field input:focus,
.bk-field textarea:focus,
.bk-field select:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.bk-field textarea {
    resize: vertical;
    min-height: 76px;
}

/* Calendar */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cal-month-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: capitalize;
}

.cal-nav-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.cal-nav-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.2);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

.cal-day {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.cal-day.empty {
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.cal-day.disabled {
    opacity: 0.28;
    cursor: not-allowed;
    background: transparent;
}

.cal-day.available {
    border-color: rgba(99, 102, 241, 0.32);
    background: rgba(99, 102, 241, 0.08);
}

.cal-day.available:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.22);
    transform: translateY(-1px);
}

.cal-day.selected {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.cal-day .slot-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--success);
    margin-top: 2px;
}

.cal-day.selected .slot-dot {
    background: #fff;
}

/* Time slots */
.slots-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-glass);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.slot-btn {
    padding: 0.62rem 0.5rem;
    border-radius: 11px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.94rem;
    cursor: pointer;
    transition: all 0.2s;
}

.slot-btn:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.16);
}

.slot-btn.selected {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.35);
}

/* Buttons */
.bk-btn-primary {
    width: 100%;
    padding: 0.9rem 1.4rem;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 10px 24px -8px rgba(99, 102, 241, 0.55);
}

.bk-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(99, 102, 241, 0.7);
}

.bk-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bk-btn-secondary {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bk-btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.14);
}

.bk-btn-danger {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bk-btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fff;
}

/* Status / Confirmation Cards */
.bk-status-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.bk-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--success);
}

.bk-summary-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    margin: 1.25rem 0;
    text-align: left;
}

.bk-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bk-summary-row:last-child {
    border-bottom: none;
}

.bk-summary-row span:first-child {
    color: var(--text-muted);
}

.bk-link-copy {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.bk-link-copy input {
    flex: 1;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    color: #c7d2fe;
    font-size: 0.88rem;
}

.bk-actions-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.bk-alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.92rem;
    display: none;
}

.bk-alert.error {
    display: block;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.bk-alert.info {
    display: block;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #e0e7ff;
}

.muted-note {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.hidden {
    display: none !important;
}
