:root {
    --primary-red: #E31E24;
    --primary-red-hover: #c41a20;
    --primary-red-light: rgba(227, 30, 36, 0.1);
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-tertiary: #999;
    --text-light: #b3b3b3;
    --bg-white: #ffffff;
    --bg-gray-50: #fafafa;
    --bg-gray-100: #f5f5f5;
    --border-light: #e8e8e8;
    --border-medium: #d1d1d1;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-system);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 280px 1fr 240px;
    min-height: 100vh;
    background: var(--bg-white);
}

/* LEFT SIDEBAR */
.sidebar {
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}

.logo-container {
    margin-bottom: 32px;
    text-align: center;
}

.logo {
    height: 48px;
    width: auto;
    max-width: 100%;
}

.meeting-title {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 24px;
    line-height: 1.4;
}

.meeting-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.meeting-type-selector,
.location-selector {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    background: var(--bg-white);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    width: 100%;
    transition: border-color 0.2s ease;
}

.meeting-type-selector:focus,
.location-selector:focus {
    outline: none;
    border-color: var(--primary-red);
}

.custom-location-input {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    background: var(--bg-white);
    font-size: 14px;
    color: var(--text-primary);
    width: 100%;
    margin-top: 8px;
    transition: border-color 0.2s ease;
}

.custom-location-input:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* MAIN CONTENT */
.main-content {
    padding: 32px 40px;
    overflow: auto;
}

.content-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-title {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

/* CALENDAR NAVIGATION */
.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    gap: 24px;
}

.nav-arrow {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background: var(--bg-gray-50);
    color: var(--text-primary);
}

.week-range {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    min-width: 200px;
    text-align: center;
}

/* WEEK VIEW */
.week-view {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.day-column {
    background: var(--bg-white);
    padding: 20px 16px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.day-header {
    text-align: center;
    margin-bottom: 16px;
}

.day-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.day-number {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-primary);
}

.day-number.today {
    color: var(--primary-red);
    font-weight: 400;
}

.day-number.past {
    color: var(--text-light);
}

.time-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.time-slot {
    background: var(--bg-gray-50);
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 10px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.time-slot:hover {
    background: var(--bg-gray-100);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.time-slot.selected {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.time-slot.unavailable {
    background: transparent;
    color: var(--text-light);
    cursor: not-allowed;
}

.no-slots {
    color: var(--text-light);
    font-size: 13px;
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

/* RIGHT SIDEBAR - MINI CALENDAR */
.right-sidebar {
    background: var(--bg-white);
    border-left: 1px solid var(--border-light);
    padding: 32px 24px;
}

.mini-calendar {
    background: var(--bg-white);
}

.mini-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mini-calendar-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.mini-nav-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

.mini-nav-btn:hover {
    color: var(--text-primary);
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.mini-day-header {
    text-align: center;
    padding: 6px 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.mini-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

.mini-day:hover {
    background: var(--bg-gray-50);
    color: var(--text-primary);
}

.mini-day.other-month {
    color: var(--text-light);
}

.mini-day.today {
    background: var(--primary-red);
    color: white;
}

.mini-day.selected {
    background: var(--bg-gray-100);
    color: var(--text-primary);
    font-weight: 500;
}

.mini-day.has-availability::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 50%;
}

.mini-day.today.has-availability::after {
    background: white;
}

/* BOOKING FORM - 2-COLUMN CARD LAYOUT */
.booking-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    margin-bottom: 24px;
    min-height: 420px;
}

.meeting-summary {
    background: var(--bg-gray-50);
    padding: 32px;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.meeting-title-small {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 16px;
    line-height: 1.4;
}

.meeting-topic {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

.meeting-details-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.summary-icon {
    font-size: 14px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.booking-form-panel {
    padding: 32px;
    background: var(--bg-white);
}

.form-panel-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.booking-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.btn-change-time,
.btn-book {
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    width: 100%;
    min-height: 48px;
}

.btn-change-time {
    background: var(--bg-gray-100);
    color: var(--text-secondary);
}

.btn-change-time:hover {
    background: var(--bg-gray-50);
    color: var(--text-primary);
}

.btn-book {
    background: var(--primary-red);
    color: white;
    font-weight: 500;
}

.btn-book:hover {
    background: var(--primary-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* BUTTONS */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
    box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
    background: var(--primary-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-gray-50);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* CONFIRMATION */
.confirmation-content {
    text-align: center;
    padding: 40px 20px;
    max-width: 400px;
    margin: 0 auto;
}

.success-checkmark {
    font-size: 48px;
    color: var(--primary-red);
    margin-bottom: 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.confirmation-content h2 {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.confirmation-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* LOADING & ERROR */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-light);
    border-top: 2px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.error-content {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    text-align: center;
    max-width: 400px;
    margin: 20px;
}

.error-content p {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .sidebar,
    .right-sidebar {
        border: none;
        border-bottom: 1px solid var(--border-light);
        padding: 24px 20px;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 24px;
        align-items: start;
    }
    
    .logo-container {
        margin-bottom: 0;
    }
    
    .meeting-title {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .meeting-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .main-content {
        padding: 24px 20px;
    }
    
    .week-view {
        grid-template-columns: 1fr;
        gap: 8px;
        background: transparent;
        box-shadow: none;
    }
    
    .day-column {
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-light);
        border: 1px solid var(--border-light);
        min-height: auto;
    }
    
    .time-slots {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .time-slot {
        flex: 1;
        min-width: 70px;
        border-radius: var(--radius-md);
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .booking-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .meeting-summary {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
        padding: 24px;
    }
    
    .booking-form-panel {
        padding: 24px;
    }
    
    .booking-actions {
        max-width: none;
    }
    
    .right-sidebar {
        order: -1;
    }
    
    .mini-calendar {
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .sidebar {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .meeting-details {
        grid-template-columns: 1fr;
    }
    
    .view-title {
        font-size: 20px;
    }
    
    .calendar-navigation {
        gap: 16px;
    }
    
    .week-range {
        min-width: 150px;
        font-size: 14px;
    }
    
    .day-column {
        padding: 16px 12px;
    }
    
    .day-number {
        font-size: 20px;
    }
    
    .time-slots {
        gap: 4px;
    }
    
    .time-slot {
        min-width: 60px;
        padding: 6px 8px;
        font-size: 11px;
    }
}