:root {
    --app-bg: #f2f2f7;
    /* Apple System Gray 6 */
    --sidebar-bg: rgba(255, 255, 255, 0.75);
    /* Translucent */
    --chat-bg: rgba(255, 255, 255, 0.85);
    /* Translucent */

    /* Studio 25 Palette */
    --header-text: #94b0b7;
    /* Muted Blue */
    --accent-color: #d6c096;
    /* Gold */

    --text-primary: #1d1d1f;
    /* Apple Text */
    --text-secondary: #86868b;

    --bubble-sent: #94b0b7;
    --text-sent: #ffffff;

    --bubble-received: #e9e9eb;
    /* Apple System Gray 5 */
    --text-received: #000000;

    --border-color: rgba(0, 0, 0, 0.1);

    --calendar-bg: rgba(255, 255, 255, 0.9);
    --slot-available: #e9e9eb;
    --slot-booked: #d6c096;
    /* Gold for booked */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-image: url('https://images.unsplash.com/photo-1560066984-138dadb4c035?q=80&w=2574&auto=format&fit=crop');
    /* Abstract Salon/Texture Background */
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: var(--text-primary);
}

/* Glassmorphism Container */
.app-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    padding: 30px;
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.3);
    gap: 15px;
    /* Space between panels */
}

/* Chat Interface (Left) */
.chat-interface {
    flex: 2;
    max-width: 800px;
    height: 90%;
    display: flex;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
}

/* Calendar Panel (Center) */
.calendar-panel {
    flex: 1.2;
    max-width: 450px;
    height: 90%;
    background-color: var(--calendar-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

/* Catalog Panel (Right) */
.catalog-panel {
    flex: 0.8;
    max-width: 300px;
    height: 90%;
    background-color: var(--calendar-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.catalog-header,
.calendar-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.catalog-header h2,
.calendar-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--header-text);
}

/* Catalog Items */
.catalog-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.catalog-category {
    margin-bottom: 10px;
}

.category-title {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.service-item {
    background-color: rgba(255, 255, 255, 0.5);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.service-item:hover {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.service-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.service-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.service-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.service-price {
    color: var(--accent-color);
    font-weight: 600;
}

.service-duration {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Calendar Styles */
.day-selector {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.day-selector::-webkit-scrollbar {
    display: none;
}

.day-pill {
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.day-pill:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.day-pill.active {
    background-color: var(--header-text);
    color: white;
    box-shadow: 0 2px 8px rgba(148, 176, 183, 0.4);
}

.stylist-headers {
    display: flex;
    padding: 0 10px;
    margin-bottom: 10px;
}

.stylist-header {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-grid {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.row {
    display: flex;
    gap: 10px;
}

.time-slot {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    background-color: var(--slot-available);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
    min-height: 60px;
    text-align: center;
}

.time-slot.booked {
    background-color: var(--slot-booked);
    color: white;
    transform: scale(0.98);
}

.slot-time {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.slot-status {
    font-size: 11px;
    opacity: 0.8;
}

.time-slot.booked .slot-status {
    font-weight: 600;
}

/* Sidebar with Frosted Glass */
.sidebar {
    width: 250px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.sidebar .header {
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--header-text);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.search-bar {
    padding: 16px 20px;
}

.search-bar input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background-color: rgba(118, 118, 128, 0.12);
    /* Apple Search Field */
    font-size: 14px;
    outline: none;
    transition: background-color 0.2s;
}

.search-bar input:focus {
    background-color: rgba(118, 118, 128, 0.2);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
}

.chat-item {
    display: flex;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.chat-item.active {
    background-color: rgba(148, 176, 183, 0.15);
    /* Muted Blue tint */
    border-left: 3px solid var(--header-text);
}

.chat-info {
    margin-left: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}

.last-message {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Chat Window with lighter Frosted Glass */
.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--chat-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.chat-window .header {
    height: 70px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.5);
}

.chat-window .chat-name {
    font-size: 17px;
    font-weight: 600;
}

.status {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 500;
}

.messages-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Message Bubbles - iMessage Style */
.message {
    max-width: 70%;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: popIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes popIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.message.sent {
    align-self: flex-end;
    background-color: var(--bubble-sent);
    color: var(--text-sent);
    border-bottom-right-radius: 4px;
    background-image: linear-gradient(135deg, #94b0b7 0%, #829da4 100%);
    /* Subtle gradient */
}

.message.received {
    align-self: flex-start;
    background-color: var(--bubble-received);
    color: var(--text-received);
    border-bottom-left-radius: 4px;
}

.message.system {
    align-self: center;
    background-color: transparent;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    box-shadow: none;
    margin-bottom: 10px;
    font-weight: 500;
}

.input-area {
    height: 80px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    border-top: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.5);
}

.input-area input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 20px;
    border: 1px solid #d1d1d6;
    background-color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

.input-area input:focus {
    border-color: var(--header-text);
    box-shadow: 0 0 0 3px rgba(148, 176, 183, 0.2);
}

.send-icon {
    margin-left: 15px;
    color: var(--header-text);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.send-icon:hover {
    transform: scale(1.1);
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    /* Hidden by default */
    align-self: flex-start;
    background-color: var(--bubble-received);
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    margin-bottom: 12px;
    width: fit-content;
}

.typing-indicator span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #8e8e93;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
    margin: 0 2px;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}