/* Studio Owner Left-Nav Layout Styles */

.hidden {
    display: none !important;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #FFF8F0;
}

/* Header Styles */
.studio-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1005;
    background: #2C2C2C !important;
    background-color: #2C2C2C !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    height: 80px;
    pointer-events: auto;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 100%;
    max-width: none;
    position: relative;
    pointer-events: auto;
}

.header-content > * {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.header-left-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.persona-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #D2691E;
    border-radius: 8px;
}

.persona-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #D2691E 0%, #FFA500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.persona-text {
    display: flex;
    flex-direction: column;
}

.persona-label {
    font-size: 0.75rem;
    color: #707070;
    font-weight: 500;
}

.persona-name {
    color: #2C2C2C;
    font-weight: 700;
    font-size: 0.9375rem;
}

.powered-by-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2C2C2C;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: #FFF8F0;
    border-radius: 8px;
}

/* Notification Button */
.notification-btn {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer !important;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    z-index: 1000 !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(255, 248, 240, 0.2);
    touch-action: manipulation;
    flex-shrink: 0;
}

.notification-btn:hover {
    background: rgba(255, 248, 240, 0.1);
}

.notification-btn:active {
    background: rgba(255, 248, 240, 0.3);
    transform: translateY(-50%) scale(0.95);
}

.notification-btn svg {
    display: block;
    pointer-events: none !important;
}

.notification-btn svg path {
    pointer-events: none !important;
}

#notificationCount {
    display: none;
    position: absolute;
    top: 2px;
    right: 2px;
    background: #FF4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px;
    text-align: center;
    line-height: 14px;
    pointer-events: none !important;
}

/* Launch Class CTA Button */
.launch-class-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #FF8C00 0%, #D2691E 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.3);
    transition: all 0.2s;
    z-index: 1000 !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(210, 105, 30, 0.2);
    touch-action: manipulation;
    flex-shrink: 0;
    white-space: nowrap;
}

.launch-class-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(210, 105, 30, 0.4);
}

.launch-class-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(210, 105, 30, 0.5);
}

.launch-class-cta svg {
    pointer-events: none !important;
}

.launch-class-cta svg path,
.launch-class-cta svg polyline {
    pointer-events: none !important;
}

.launch-class-cta span {
    pointer-events: none !important;
}

.header-center {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    margin-left: auto;
}

.studio-switcher-btn {
    background: rgba(255, 248, 240, 0.1);
    border: 2px solid #FFF8F0;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #FFF8F0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.studio-switcher-btn:hover {
    background: rgba(210, 105, 30, 0.2);
    border-color: #D2691E;
    color: #D2691E;
    transform: translateY(-1px);
}

.studio-switcher-btn svg {
    transition: transform 0.3s ease;
}

.studio-switcher-btn.open svg {
    transform: rotate(180deg);
}

.studio-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 320px;
    max-width: 400px;
    z-index: 1000;
    animation: dropdownFadeIn 0.2s ease;
}

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

.studio-dropdown-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #E5E5E5;
}

.studio-dropdown-item:last-child {
    border-bottom: none;
}

.studio-dropdown-item:hover {
    background: rgba(210, 105, 30, 0.05);
}

.studio-dropdown-item.active {
    background: rgba(210, 105, 30, 0.1);
}

.studio-dropdown-name {
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.25rem;
}

.studio-dropdown-location {
    font-size: 0.875rem;
    color: #707070;
}

.studio-dropdown-status {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.back-link {
    color: #FFF8F0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.back-link:hover {
    color: #D2691E;
}

/* Main Layout */
.studio-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
}

/* Left Navigation */
.left-nav {
    width: 240px;
    background: white;
    border-right: 1px solid #E5E5E5;
    position: fixed;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 90;
}

.nav-menu {
    padding: 1.5rem 0;
}

.nav-menu-bottom {
    padding: 1rem 0;
    margin-top: auto;
    border-top: 2px solid #E5E5E5;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: #505050;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(210, 105, 30, 0.05);
    color: #D2691E;
}

.nav-link.active {
    background: rgba(210, 105, 30, 0.1);
    color: #D2691E;
    border-left-color: #D2691E;
}

.nav-link svg {
    flex-shrink: 0;
}

.nav-badge {
    position: relative;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-width: 1400px;
    margin: 0 auto;
    margin-left: 240px;
}

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

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

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

.section-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title-main {
    font-size: 2rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0;
}

.action-btn-primary,
.action-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.95rem;
}

.action-btn-primary {
    background: linear-gradient(135deg, #FF8C00, #D2691E);
    color: white;
}

.action-btn-primary:hover {
    background: linear-gradient(135deg, #FF7F00, #CD5C5C);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.3);
}

.action-btn-secondary {
    background: white;
    color: #D2691E;
    border: 2px solid #D2691E;
}

.action-btn-secondary:hover {
    background: rgba(210, 105, 30, 0.1);
}

/* Studios Grid - 40/60 Split Layout */
.studios-grid {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 200px);
}

.studios-list {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.studio-list-item {
    position: relative;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.studio-list-item:hover {
    border-color: #D2691E;
    box-shadow: 0 2px 12px rgba(210, 105, 30, 0.1);
}

.studio-list-item.active {
    border-color: #D2691E;
    background: #FFF8F0;
    box-shadow: 0 2px 12px rgba(210, 105, 30, 0.15);
}

.studio-list-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
}

.studio-location {
    color: #707070;
    font-size: 0.875rem;
}

.studio-list-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E0E0E0;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-mini .stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #D2691E;
}

.stat-mini .stat-label {
    font-size: 0.75rem;
    color: #707070;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.studio-detail-flyout {
    display: none; /* Hidden by default */
    width: 60%;
    background: white;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    padding: 2rem;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

.studio-detail-flyout.visible {
    display: block; /* Show when visible class is added */
    animation: slideInRight 0.3s ease;
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    70% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* My Students 40/60 Split Layout */
.students-layout {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 200px);
    overflow: hidden; /* Prevent double scrollbars */
}

.students-list {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden; /* Prevent overflow */
    min-height: 0; /* Allow flex child to shrink */
}

.students-filter {
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    padding-right: 0.5rem;
}

.students-filter input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.students-filter input:focus {
    outline: none;
    border-color: #D2691E;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

#studentsList, #classesList, #messagesList {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    padding-top: 5px;
    flex: 1; /* Take remaining space */
    min-height: 0; /* Allow flex child to shrink */
}

.student-list-item {
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.student-list-item:hover {
    border-color: #D2691E;
    box-shadow: 0 2px 12px rgba(210, 105, 30, 0.1);
}

.student-list-item.active,
.student-list-item.selected {
    border: 3px solid #B85A1A;
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE8D6 100%);
    box-shadow: 0 4px 16px rgba(210, 105, 30, 0.35);
    transform: translateY(-2px);
}

.student-list-item.unread {
    position: relative;
}

.student-list-item .unread-dot {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background: #3B82F6;
    border-radius: 50%;
}

/* Class list items with status colors - use vibrant colors when active */
#classesList .student-list-item.active {
    border-width: 3px !important;
    border-style: solid !important;
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.25);
    transform: translateY(-3px);
}

/* Active class with green status (confirmed/active) - change pastel #BBF7D0 to vibrant green */
#classesList .student-list-item.active[style*="#BBF7D0"],
#classesList .student-list-item.active[style*="#bbf7d0"] {
    border-color: #22C55E !important; /* Vibrant green */
    background: #F0FDF4 !important;
}

/* Active class with orange status (pending/soft-hold) - change pastel #FDCFA6 to vibrant orange */
#classesList .student-list-item.active[style*="#FDCFA6"],
#classesList .student-list-item.active[style*="#fdcfa6"] {
    border-color: #F97316 !important; /* Vibrant orange */
    background: #FFF8F0 !important;
}

/* Active class with blue status (competing) - change pastel #BFDBFE to vibrant blue */
#classesList .student-list-item.active[style*="#BFDBFE"],
#classesList .student-list-item.active[style*="#bfdbfe"] {
    border-color: #3B82F6 !important; /* Vibrant blue */
    background: #F0F9FF !important;
}

/* Active class with gray status (default) - change light gray to darker gray */
#classesList .student-list-item.active[style*="#E0E0E0"],
#classesList .student-list-item.active[style*="#e0e0e0"] {
    border-color: #71717A !important; /* Darker gray */
    background: #FAFAFA !important;
}

.student-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #D2691E;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.student-info {
    flex: 1;
    min-width: 0;
}

.student-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
}

/* Hide mobile back button on desktop */
.mobile-back-button {
    display: none !important;
}

.student-detail-flyout {
    width: 60%;
    background: white;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    padding: 2rem;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
    min-height: 0; /* Allow flex child to shrink */
    max-height: 100%; /* Constrain to parent height */
}

.student-detail-flyout.visible {
    animation: slideUp 0.4s ease-out;
}

.student-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #E0E0E0;
    margin-bottom: 1.5rem;
}

.student-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #D2691E;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.student-detail-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 0.5rem 0;
}

.registered-classes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.registered-class-item {
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 1rem;
}

.registered-class-item strong {
    font-size: 0.9375rem;
    color: #2C2C2C;
}

.attendance-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attendance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
}

.attendance-item strong {
    font-size: 0.875rem;
    color: #2C2C2C;
}

/* Class Detail View */
.class-detail-view .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #E0E0E0;
    margin-bottom: 1.5rem;
}

.class-detail-view .detail-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0;
}

.revenue-badge {
    background: #D2691E;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.students-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.student-preview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
}

.student-preview-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #D2691E;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.student-preview-info {
    flex: 1;
}

.student-preview-info strong {
    display: block;
    font-size: 0.9375rem;
    color: #2C2C2C;
    margin-bottom: 0.25rem;
}

.student-preview-info p {
    font-size: 0.8125rem;
    color: #707070;
    margin: 0;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.metric-card {
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #D2691E;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.8125rem;
    color: #707070;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Calendar Header Controls */
.calendar-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-month-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-nav-btn {
    background: white;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #505050;
}

.month-nav-btn:hover {
    border-color: #D2691E;
    color: #D2691E;
}

.current-month {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0;
    min-width: 200px;
    text-align: center;
}

.calendar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Calendar Styles */
.calendar-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.calendar-controls {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem;
    border-radius: 8px;
    border: 2px solid #E5E5E5;
}

.calendar-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: #707070;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-btn:hover {
    color: #D2691E;
}

.calendar-btn.active {
    background: #D2691E;
    color: white;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: white;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    color: #505050;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    border-color: #D2691E;
    color: #D2691E;
}

.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    position: relative;
    /* Dynamic height based on viewport - accounts for header (80px) + section header (~120px) + filters (~140px) + margins/padding (~80px) */
    height: calc(100vh - 420px);
    min-height: 500px;
    max-height: 800px;
}

/* Vertical Week Calendar */
.vertical-calendar-week {
    min-width: 900px;
    overflow-y: auto;
    /* Fill the container height minus padding */
    height: 100%;
}

.week-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 2px solid #E5E5E5;
    margin-bottom: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.time-gutter {
    background: #FAFAFA;
}

.day-column-header {
    text-align: center;
    padding: 1rem 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.day-column-header:hover {
    background: rgba(210, 105, 30, 0.05);
}

.day-column-header.today {
    background: rgba(210, 105, 30, 0.08);
}

.day-name {
    font-size: 0.875rem;
    color: #707070;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.day-date {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-date.today-circle {
    background: #D2691E;
    color: white;
}

.week-grid-container {
    display: grid;
    grid-template-columns: 80px 1fr;
    position: relative;
}

.time-column {
    background: #FAFAFA;
    border-right: 2px solid #E5E5E5;
}

.time-slot-label {
    height: 40px;
    padding: 0.5rem;
    text-align: right;
    font-size: 0.75rem;
    color: #707070;
    font-weight: 500;
    border-bottom: 1px solid #F0F0F0;
}

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

.day-column {
    position: relative;
    border-right: 1px solid #E5E5E5;
}

.day-column:last-child {
    border-right: none;
}

.day-column.today-column {
    background: rgba(210, 105, 30, 0.02);
}

.time-slot {
    height: 40px;
    border-bottom: 1px solid #F0F0F0;
    cursor: pointer;
    transition: background 0.1s ease;
}

.time-slot:hover {
    background: rgba(210, 105, 30, 0.05);
}

.bookings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
}

.calendar-booking {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.2s ease;
    border-left: 3px solid;
    overflow: hidden;
}

.calendar-booking.confirmed {
    background: linear-gradient(135deg, rgba(134, 239, 172, 0.9), rgba(134, 239, 172, 0.7));
    border-left-color: #10B981;
    color: #065F46;
}

.calendar-booking.soft-hold {
    background: linear-gradient(135deg, rgba(253, 224, 71, 0.9), rgba(253, 224, 71, 0.7));
    border-left-color: #F59E0B;
    color: #78350F;
}

.calendar-booking.requested {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.9), rgba(147, 197, 253, 0.7));
    border-left-color: #3B82F6;
    color: #1E3A8A;
}

.calendar-booking.competing {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.9), rgba(6, 182, 212, 0.7));
    border-left-color: #0891B2;
    color: #164E63;
}

.calendar-booking.won-slot {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.9), rgba(52, 211, 153, 0.7));
    border-left-color: #10B981;
    color: #065F46;
}

.calendar-booking.transitioning {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.9), rgba(156, 163, 175, 0.7));
    border-left-color: #6B7280;
    color: #374151;
}

.calendar-booking:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.calendar-booking.selected {
    box-shadow: 0 0 0 3px #D2691E;
    z-index: 11;
}

.day-booking {
    transition: all 0.2s ease;
}

.day-booking:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

.booking-title {
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.booking-time {
    font-size: 0.65rem;
    opacity: 0.9;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.booking-instructor {
    font-size: 0.65rem;
    opacity: 0.8;
    margin-bottom: 0.15rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booking-students {
    font-size: 0.6rem;
    opacity: 0.7;
    line-height: 1.2;
}

/* Single Day View */
.single-day-calendar {
    min-height: 600px;
}

.single-day-calendar.slide-in {
    animation: slideInFromRight 0.3s ease;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.single-day-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E5E5E5;
}

.back-to-week-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: white;
    border: 2px solid #D2691E;
    border-radius: 8px;
    color: #D2691E;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-to-week-btn:hover {
    background: rgba(210, 105, 30, 0.1);
}

.single-day-title h2 {
    margin: 0;
    font-size: 1.75rem;
    color: #2C2C2C;
}

.single-day-title p {
    margin: 0.25rem 0 0 0;
    color: #707070;
}

.single-day-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
}

.single-day-column {
    position: relative;
    min-height: 600px;
}

/* Class Detail Panel */
.class-detail-panel {
    position: fixed;
    right: 0;
    top: 80px;
    width: 40%;
    height: calc(100vh - 80px);
    background: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.class-detail-panel.visible {
    transform: translateX(0);
}

/* Mobile: Full-screen detail view with back button */
@media (max-width: 1023px) {
    .class-detail-panel {
        top: 56px; /* Below mobile header (updated to match mobile header height) */
        left: 0;
        right: 0;
        width: 100%;
        height: calc(100vh - 56px);
        transform: translateY(100%); /* Slide up from bottom */
        z-index: 200; /* Above everything */
        padding: 1.5rem;
    }

    .class-detail-panel.visible {
        transform: translateY(0);
    }

    /* Make close button look like a back button on mobile */
    .class-detail-panel .detail-close-btn {
        position: sticky;
        top: 0;
        left: auto;
        right: auto;
        margin: -1.5rem -1.5rem 1rem -1.5rem; /* Negative margins to extend beyond panel padding */
        padding: 1rem 1.5rem;
        background: white;
        border: none;
        border-bottom: 1px solid #E5E5E5; /* Straight line like other detail views */
        border-radius: 0; /* Force straight edges */
        display: flex;
        align-items: center;
        justify-content: flex-start; /* Left-align content */
        gap: 0.5rem;
        z-index: 10;
        cursor: pointer;
        font-weight: 600;
        color: #D2691E; /* Orange text */
        font-size: 1rem;
        white-space: nowrap; /* Prevent wrapping */
        width: calc(100% + 3rem); /* Extend full width accounting for negative margins */
    }

    .class-detail-panel .detail-close-btn::before {
        content: '← Back to Calendar';
        font-weight: 600;
        color: #D2691E; /* Orange text */
        font-size: 1rem;
        white-space: nowrap; /* Prevent wrapping */
    }

    .class-detail-panel .detail-close-btn svg {
        display: none;
    }
}

/* Class Detail Tabs */
.class-detail-tabs {
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.875rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #707070;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: #D2691E;
    background: rgba(210, 105, 30, 0.05);
}

.tab-btn.active {
    color: #D2691E;
    border-bottom-color: #D2691E;
}

.tab-btn svg {
    width: 16px;
    height: 16px;
}

/* Roster Styles */
.roster-list {
    margin-top: 1rem;
}

.roster-item {
    transition: all 0.2s ease;
}

.roster-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-icon:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Mobile Roster Adjustments */
@media (max-width: 768px) {
    .roster-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    
    .roster-item > div:last-child {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Calendar responsive width */
.calendar-container {
    transition: width 0.3s ease, margin-right 0.3s ease;
    width: 100%;
}

.calendar-container.shrunk {
    width: calc(100% - 420px);
    margin-right: 420px;
}

.detail-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F0F0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-close-btn:hover {
    background: #E5E5E5;
}

.class-detail-content h2 {
    margin: 0 0 2rem 0;
    font-size: 1.75rem;
    color: #2C2C2C;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #707070;
    text-transform: uppercase;
    font-weight: 600;
}

.detail-section p {
    margin: 0;
    font-size: 1.125rem;
    color: #2C2C2C;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* Week View Calendar */
.calendar-week-view {
    min-width: 900px;
}

.calendar-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 2px solid #E5E5E5;
    margin-bottom: 1rem;
}

.calendar-time-col {
    background: #FAFAFA;
}

.calendar-day-header {
    text-align: center;
    padding: 1rem 0.5rem;
}

.calendar-day-header.today {
    background: rgba(210, 105, 30, 0.05);
    border-radius: 8px 8px 0 0;
}

.day-name {
    font-size: 0.875rem;
    color: #707070;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.day-date {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2C2C2C;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-date.today-badge {
    background: #D2691E;
    color: white;
}

.calendar-grid {
    position: relative;
}

.calendar-row {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    border-bottom: 1px solid #F0F0F0;
    min-height: 60px;
}

.calendar-time-label {
    padding: 0.5rem;
    font-size: 0.875rem;
    color: #707070;
    text-align: right;
    padding-right: 1rem;
}

.calendar-cell {
    border-left: 1px solid #F0F0F0;
    padding: 0.25rem;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.calendar-cell:hover {
    background: rgba(210, 105, 30, 0.02);
}

.calendar-event {
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid;
    position: relative;
    overflow: hidden;
}

.calendar-event.confirmed {
    background: linear-gradient(135deg, rgba(134, 239, 172, 0.3), rgba(134, 239, 172, 0.15));
    border-left-color: #10B981;
}

.calendar-event.soft-hold {
    background: linear-gradient(135deg, rgba(253, 224, 71, 0.3), rgba(253, 224, 71, 0.15));
    border-left-color: #F59E0B;
}

.calendar-event.requested {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.3), rgba(147, 197, 253, 0.15));
    border-left-color: #3B82F6;
}

.calendar-event:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.event-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #2C2C2C;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-time {
    font-size: 0.75rem;
    color: #707070;
    margin-bottom: 0.25rem;
}

.event-instructor {
    font-size: 0.75rem;
    color: #505050;
}

.class-booking {
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.class-booking.confirmed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-left: 3px solid #10B981;
}

.class-booking.soft-hold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    border-left: 3px solid #F59E0B;
}

.class-booking.requested {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border-left: 3px solid #3B82F6;
}

.class-booking:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.class-booking-title {
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.25rem;
}

.class-booking-time {
    font-size: 0.875rem;
    color: #707070;
}

/* Detail Panel (Right Side) */
.detail-panel {
    width: 400px;
    background: white;
    border-left: 1px solid #E5E5E5;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.detail-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #E5E5E5;
}

.detail-panel-content {
    padding: 1.5rem;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #707070;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #2C2C2C;
}

/* Compliance Content */
.compliance-content {
    display: grid;
    gap: 1.5rem;
}

.compliance-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Settings Section */
.settings-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
}

.settings-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item.full-width {
    grid-column: 1 / -1;
}

.setting-item label {
    font-weight: 600;
    color: #2C2C2C;
    font-size: 0.875rem;
}

.form-input {
    padding: 0.75rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #D2691E;
}

/* Community Posts */
.community-posts {
    display: grid;
    gap: 1.5rem;
}

.community-threads {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.thread-card {
    background: white;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.thread-card:hover {
    border-color: #D2691E;
}

.thread-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    background: #FAFAFA;
}

.thread-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.thread-info {
    flex: 1;
}

.thread-info h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
}

.thread-meta {
    font-size: 0.875rem;
    color: #707070;
}

.btn-expand {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thread-posts {
    padding: 0;
}

.community-post {
    background: white;
    border-top: 1px solid #E0E0E0;
    padding: 1.25rem;
}

.post-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF8C00, #D2691E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.post-author {
    font-weight: 600;
    color: #2C2C2C;
    font-size: 0.9375rem;
}

.post-time {
    font-size: 0.8125rem;
    color: #707070;
}

.post-body {
    color: #505050;
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* Marketing Tools */
.marketing-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(210, 105, 30, 0.15);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #2C2C2C;
}

.tool-card p {
    margin: 0 0 1.5rem 0;
    color: #707070;
    line-height: 1.5;
}

.featured-preview {
    padding: 1.5rem;
    background: #F9F9F9;
    border-radius: 8px;
    position: relative;
}

.preview-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #FF8C00, #D2691E);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.preview-description {
    margin: 1rem 0;
    color: #505050;
    line-height: 1.6;
}

.preview-meta {
    display: flex;
    gap: 1.5rem;
    color: #707070;
    font-size: 0.95rem;
}

/* Message Threads */
.message-threads {
    display: grid;
    gap: 1rem;
}

.message-thread {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.message-thread:hover {
    border-left-color: #D2691E;
    box-shadow: 0 4px 16px rgba(210, 105, 30, 0.15);
}

.message-thread.unread {
    background: rgba(210, 105, 30, 0.05);
    border-left-color: #D2691E;
}

.message-thread-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.message-sender {
    font-weight: 600;
    color: #2C2C2C;
}

.message-time {
    font-size: 0.875rem;
    color: #707070;
}

.message-preview {
    color: #505050;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsive KPI grid - always one line until minimum */
@media (max-width: 1400px) {
    .kpi-grid {
        gap: 1rem !important;
    }
}

@media (max-width: 1200px) {
    .kpi-grid {
        gap: 0.75rem !important;
    }
}

@media (max-width: 1000px) {
    .kpi-grid {
        gap: 0.5rem !important;
    }
    .kpi-card {
        padding: 1rem !important;
    }
}

/* Minimum width before horizontal scroll */
@media (max-width: 800px) {
    .kpi-grid {
        min-width: 800px;
    }
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 4px solid #D2691E;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(210, 105, 30, 0.15);
}

.kpi-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
}

.kpi-label {
    font-size: 0.95rem;
    color: #707070;
    margin-bottom: 0.5rem;
}

.kpi-trend {
    font-size: 0.875rem;
    color: #707070;
}

/* Responsive KPI card text sizing */
@media (max-width: 1200px) {
    .kpi-value {
        font-size: 1.75rem !important;
    }
    .kpi-label {
        font-size: 0.85rem !important;
    }
    .kpi-trend {
        font-size: 0.8rem !important;
    }
    .kpi-icon {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 1000px) {
    .kpi-value {
        font-size: 1.5rem !important;
    }
    .kpi-label {
        font-size: 0.8rem !important;
    }
    .kpi-trend {
        font-size: 0.75rem !important;
    }
    .kpi-icon {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 900px) {
    .kpi-value {
        font-size: 1.25rem !important;
    }
    .kpi-label {
        font-size: 0.75rem !important;
    }
    .kpi-icon {
        font-size: 1.25rem !important;
    }
}

.kpi-trend.positive {
    color: #10B981;
}

.kpi-trend.negative {
    color: #EF4444;
}

.analytics-charts {
    display: grid;
    gap: 1.5rem;
}

/* Section Card */
.section-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.section-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 1rem 0;
}

/* Chart Container */
.chart-container {
    background: #F9F9F9;
    padding: 2rem;
    border-radius: 8px;
    min-height: 240px;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.bar {
    flex: 1;
    background: linear-gradient(180deg, #FF8C00, #D2691E);
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bar:hover {
    opacity: 0.8;
}

/* My Classes Section */
.classes-list {
    display: grid;
    gap: 1.5rem;
}

.class-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 4px solid #D2691E;
}

.class-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(210, 105, 30, 0.15);
}

.class-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.class-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #2C2C2C;
}

.class-revenue {
    font-size: 1.125rem;
    font-weight: 700;
    color: #10B981;
}

.class-details {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.class-detail-item {
    display: flex;
    gap: 0.5rem;
}

.class-detail-item .label {
    font-weight: 600;
    color: #707070;
    min-width: 100px;
}

.class-card-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E5E5;
}

.class-card-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
    white-space: nowrap;
    padding: 0.75rem 1rem;
}

/* Class Registration Tools - Compact Layout */
.class-registration-tools {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: #F9F9F9;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid #E0E0E0;
}

.qr-code-compact {
    flex-shrink: 0;
    cursor: pointer;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 2px solid #E0E0E0;
    transition: all 0.2s ease;
}

.qr-code-compact:hover {
    border-color: #D2691E;
    transform: scale(1.05);
}

.registration-link-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.registration-link-compact label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #707070;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.link-input-group {
    display: flex;
    gap: 0.5rem;
}

.link-input-group input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #2C2C2C;
    background: white;
}

.link-input-group input:focus {
    outline: none;
    border-color: #D2691E;
}

.btn-copy {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    background: #D2691E;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy:hover {
    background: #B85A1A;
    transform: translateY(-1px);
}

/* My Students Section */
.students-table-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.students-table {
    width: 100%;
    border-collapse: collapse;
}

.students-table thead {
    background: #F9F9F9;
}

.students-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: #707070;
    border-bottom: 2px solid #E5E5E5;
}

.students-table td {
    padding: 1rem;
    border-bottom: 1px solid #F0F0F0;
    color: #2C2C2C;
}

.students-table tbody tr:hover {
    background: rgba(210, 105, 30, 0.05);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.status-badge.vip {
    background: rgba(210, 105, 30, 0.1);
    color: #D2691E;
}

.status-badge.confirmed {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.status-badge.soft-hold {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.status-badge.requested {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

.btn-link {
    background: none;
    border: none;
    color: #D2691E;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: #CD5C5C;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .left-nav {
        width: 200px;
    }
    
    .detail-panel {
        width: 340px;
    }
}

/* ========================================
   MOBILE NAVIGATION - HAMBURGER MENU
   ======================================== */

/* Hamburger Button */
.mobile-hamburger {
    display: none;
    position: relative;
    background: none;
    border: none;
    cursor: pointer !important;
    padding: 0.5rem;
    z-index: 1001 !important;
    border-radius: 8px;
    transition: background 0.2s ease;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(255, 248, 240, 0.2);
    touch-action: manipulation;
}

.mobile-hamburger.active {
    z-index: 1002 !important;
    background: rgba(255, 248, 240, 0.2);
}

.mobile-hamburger:hover {
    background: rgba(255, 248, 240, 0.15);
}

.mobile-hamburger.active:hover {
    background: rgba(255, 248, 240, 0.25);
}

.mobile-hamburger:focus {
    outline: 2px solid rgba(255, 248, 240, 0.5);
    outline-offset: 2px;
}

.mobile-hamburger:active {
    transform: scale(0.92);
    background: rgba(255, 248, 240, 0.25);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    pointer-events: none !important;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #FFF8F0;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none !important;
}

/* Transform to X when active */
.mobile-hamburger.active .hamburger-icon span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    background: #FFF8F0 !important;
}

.mobile-hamburger.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-hamburger.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    background: #FFF8F0 !important;
}

/* Mobile Navigation Drawer */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 56px;
    left: -100%;
    width: 280px;
    max-width: 85vw;
    height: calc(100vh - 56px);
    background: white;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.mobile-nav-drawer.active {
    left: 0;
}

.mobile-nav-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
    color: white;
    border-bottom: 1px solid #E5E5E5;
}

.mobile-nav-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #FFF8F0;
}

.mobile-nav-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #D2691E;
    font-weight: 500;
}

/* Desktop nav hidden on mobile */
@media (max-width: 1023px) {
    .left-nav {
        display: none;
    }
    
    .mobile-hamburger {
        display: block !important;
    }
    
    /* Overlay and drawer should only be visible when active */
    .mobile-nav-overlay.active {
        display: block !important;
    }
    
    .mobile-nav-drawer.active {
        display: block !important;
    }
    
    .studio-layout {
        flex-direction: column;
        max-width: 100vw;
        overflow-x: hidden;
        margin-top: 56px; /* Mobile header height, not 80px */
    }
    
    .main-content {
        width: 100%;
        max-width: 100vw;
        padding: 1rem;
        /* padding-top: 36px; /* Header height minus 20px buffer */
        overflow-x: hidden;
        margin-left: 0 !important; /* Reset desktop margin-left */
    }
    
    /* Lifecycle notifications centered on mobile */
    .lifecycle-notification {
        left: 1rem !important;
        right: 1rem !important;
        top: 70px !important;
        max-width: calc(100vw - 2rem) !important;
    }
    
    /* Ensure welcome banner is visible below fixed header */
    .welcome-banner {
        margin-top: calc(0.5rem + 8px) !important; /* Extra 8px spacing */
        padding-top: 2rem !important; /* Extra top padding to show title */
        scroll-margin-top: 72px;
    }
    
    /* Mobile Header Optimizations */
    .studio-header {
        position: fixed; /* Stay at top when scrolling */
        top: 0;
        left: 0;
        right: 0;
        height: 56px; /* Compact single-row header */
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        z-index: 100; /* Above detail flyout */
    }
    
    .header-content {
        flex-wrap: nowrap; /* Keep single row */
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        position: relative;
        max-width: 100%;
        height: 100%;
        align-items: center;
        justify-content: space-between;
    }
    
    /* Hamburger button positioning */
    .mobile-hamburger {
        order: 0;
    }
    
    /* Container for persona badge area - move to right with notification */
    .header-left-section {
        order: 2;
        flex: 0 0 auto;
        gap: 0.375rem;
        margin-left: auto;
        display: flex;
        align-items: center;
    }
    
    /* Hide "Powered by" badge on tablet/mobile */
    .powered-by-badge {
        display: none !important;
    }
    
    /* Make persona badge compact - hide text, show only avatar */
    .persona-badge {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        gap: 0 !important;
    }
    
    .persona-avatar {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.9375rem !important;
    }
    
    /* Hide "Teaching as" text completely on tablet */
    .persona-text {
        display: none !important;
    }
    
    /* Move notification button next to MR avatar on mobile */
    .header-left-section {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        order: 1;
    }
    
    .notification-btn {
        position: static !important;
        transform: none !important;
        padding: 0.375rem !important;
        order: 2; /* Place after persona badge */
    }
    
    .notification-btn:active {
        transform: scale(0.95) !important;
    }
    
    /* Reorder header-right-section items on mobile */
    .header-right-section {
        display: flex !important;
    }
    
    .launch-class-cta {
        order: 1;
    }
    
    .notification-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Ensure notification count stays centered on mobile */
    #notificationCount {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 16px !important;
        height: 16px !important;
        font-size: 0.625rem !important;
        line-height: 1 !important;
        padding: 2px !important;
    }
    
    /* Right side buttons - Launch Class CTA */
    .header-right-section {
        order: 1;
        gap: 0.375rem;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
    
    /* Launch Class button - keep prominent but smaller on tablet */
    .launch-class-cta {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
        gap: 0.375rem !important;
    }
    
    .launch-class-cta svg {
        width: 16px;
        height: 16px;
    }
    
    /* Hide "Switch Persona" from header - it's in hamburger menu */
    .header-nav {
        display: none !important;
    }
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #2C2C2C;
    margin-right: 1rem;
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-nav-drawer {
    position: fixed;
    top: 56px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 56px);
    background: white;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-drawer.active {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #E5E5E5;
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2C2C2C;
}

.mobile-nav-close {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #707070;
}

.mobile-nav-menu {
    padding: 1rem 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #707070;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.mobile-nav-link:hover {
    background: #F9F9F9;
    color: #2C2C2C;
}

.mobile-nav-link.active {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE8D6 100%);
    color: #D2691E;
    border-left-color: #D2691E;
    font-weight: 600;
}

.mobile-nav-link svg {
    flex-shrink: 0;
}

.mobile-nav-link .badge {
    margin-left: auto;
    background: #ffc107;
    color: #2C2C2C;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    /* Show mobile hamburger menu */
    .mobile-menu-toggle {
        display: block !important;
    }
    
    /* Hide desktop left navigation */
    .left-nav {
        display: none !important;
    }
    
    /* Adjust header for mobile */
    .studio-header {
        height: 56px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1005;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .logo img {
        height: 40px !important;
        max-width: 200px !important;
    }
    
    /* Hide "Switch Persona" link on mobile */
    .header-nav {
        display: none !important;
    }
    
    .studio-layout {
        flex-direction: column;
        margin-top: 56px; /* Mobile header height */
    }
    
    .main-content {
        padding: 1rem;
        margin-left: 0 !important;
    }
    
    /* Content section spacing */
    .content-section {
        padding: 0.5rem !important;
        overflow-x: hidden;
    }
    
    /* Analytics section specific */
    #analyticsSection {
        overflow-x: hidden;
    }
    
    #analyticsSection .section-card {
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Force all grids to single column on mobile */
    [class*="grid"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Reduce minmax constraints that cause overflow */
    .tool-card,
    .marketing-tools-grid,
    [style*="minmax"] {
        grid-template-columns: 1fr !important;
    }
    
    .section-title-main {
        font-size: 1.5rem;
    }
    
    .section-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem !important; /* Reduce whitespace on mobile */
    }
    
    /* Hide Export List button on mobile in My Students section */
    #studentsSection .section-header-bar .action-btn-secondary {
        display: none;
    }
    
    /* Hide Download Report button on mobile in Analytics section */
    #analyticsSection .section-header-bar .action-btn-secondary {
        display: none;
    }
    
    /* Make CTA buttons full width on mobile */
    .section-header-bar > div,
    .section-header-bar button,
    .section-header-bar .action-btn-primary,
    .section-header-bar .action-btn-secondary {
        width: 100%;
    }
    
    .detail-panel {
        position: fixed;
        width: 100%;
        height: 100vh;
        top: 0;
        z-index: 1000;
    }
    
    .studios-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        padding: 0.5rem 0.75rem !important;
        gap: 0.5rem !important;
    }
    
    .header-center {
        position: static;
    }
    
    .studio-dropdown {
        left: 1rem;
        right: 1rem;
        transform: none;
        min-width: auto;
    }
    
    /* Keep Launch Class CTA in single row, make it compact */
    .header-right-section {
        order: 1;
        flex: 0 0 auto;
    }
    
    .launch-class-cta {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.875rem !important;
        white-space: nowrap;
        gap: 0.375rem !important;
    }
    
    .launch-class-cta span {
        display: inline; /* Show text */
    }
    
    .launch-class-cta svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Keep only avatar circle on small screens - no text */
    .persona-badge {
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }
    
    .persona-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.875rem !important;
    }
    
    /* Prevent any element from causing horizontal scroll */
    * {
        max-width: 100vw;
    }
    
    /* Ensure tables don't overflow */
    table {
        width: 100% !important;
        display: block;
        overflow-x: auto;
    }
    
    /* Analytics section cards and tables */
    .section-card {
        overflow-x: auto;
        max-width: 100%;
    }
    
    .analytics-charts {
        overflow-x: hidden;
    }
    
    /* Make analytics tables scrollable on mobile */
    #revenueTable,
    #instructorsTable {
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    #revenueTable table,
    #instructorsTable table {
        min-width: 100%;
        white-space: nowrap;
    }
    
    /* Fix any fixed-width elements */
    [style*="width: 400px"],
    [style*="min-width: 350px"] {
        width: 100% !important;
        min-width: auto !important;
    }
    
    /* Notification icon smaller on mobile */
    .notification-btn {
        padding: 0.25rem !important;
    }
    
    .notification-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ========================================
   MOBILE SUMMARY/DETAIL LAYOUT
   ======================================== */

@media (max-width: 1023px) {
    /* Ensure content sections have top padding for fixed header */
    .content-section {
        padding-top: 0.5rem !important; /* Minimal spacing */
    }
    
    /* Students Section - Mobile Drill-in */
    .students-layout {
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        min-height: 100vh;
    }
    
    .students-list {
        width: 100%;
        display: block !important;
        position: relative;
        z-index: 1;
        background: white;
        padding: 0.5rem; /* Reduced padding for more space */
    }
    
    /* Wider search bar on mobile */
    .students-filter {
        padding: 0 !important;
        margin-bottom: 0.75rem;
    }
    
    .students-filter input {
        width: 100%;
    }
    
    /* Mobile action buttons */
    .students-actions {
        display: block !important;
        width: 100%;
        padding: 0 0 0.75rem 0;
    }
    
    .export-list-btn {
        display: none !important; /* Hide export on mobile */
    }
    
    .message-all-btn {
        width: 100% !important; /* Full width on mobile */
        margin: 0 !important;
    }
    
    /* Communication section - full width compose button */
    .compose-message-btn {
        width: 100% !important; /* Full width on mobile */
        margin: 0 !important;
    }
    
    /* Reduce table container padding on mobile */
    .students-table-container {
        padding: 1rem !important;
    }
    
    /* Remove extra padding on list container */
    #studentsList, #classesList, #messagesList {
        padding-right: 0 !important;
        padding-left: 0 !important;
        padding-top: 5px !important; /* Keep top padding for border visibility */
        gap: 0.5rem; /* Tighter spacing */
    }
    
    /* Full-width student cards on mobile */
    .student-list-item {
        width: 100%;
        margin-bottom: 0;
        padding: 1rem;
    }
    
    .student-list-item.active {
        border-color: #E0E0E0; /* Don't highlight active on mobile */
        background: white;
    }
    
    .student-detail-flyout {
        position: fixed;
        top: 56px; /* Below compact mobile header */
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100vh - 56px);
        transform: translateX(100%); /* Hidden off-screen by default */
        transition: transform 0.3s ease; /* Smooth slide animation */
        z-index: 99; /* Below header (z-index: 100) */
        background: white;
        box-shadow: none;
        overflow-y: auto;
        padding: 0; /* Remove all default padding on mobile */
        border-radius: 0; /* No rounded corners on mobile */
        border: none; /* No border on mobile */
        display: none; /* Hidden until activated */
    }
    
    .student-detail-flyout.mobile-active {
        transform: translateX(0); /* Slide in from right */
        display: block; /* Show when active */
        top: 56px !important; /* Ensure it stays below header */
        height: calc(100vh - 56px) !important;
    }
    
    .student-detail-flyout .mobile-back-button {
        display: flex !important; /* Show on mobile */
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem; /* Tighter vertical padding */
        background: #F8F9FA; /* Lighter background */
        border: none;
        cursor: pointer;
        font-weight: 600;
        color: #D2691E;
        width: 100%;
        text-align: left;
        position: sticky;
        top: 0; /* Stick to top of scrollable container */
        z-index: 50; /* High enough to stay above content but below header */
        border-bottom: 1px solid #E0E0E0;
        margin: 0; /* Remove any margin */
        font-size: 0.9375rem; /* Slightly smaller */
        box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow when scrolling */
    }
    
    .student-detail-flyout .mobile-back-button:focus {
        outline: 2px solid #D2691E;
        outline-offset: -2px;
    }
    
    /* Adjust detail content to sit flush against back button */
    .student-detail-flyout .student-detail-header {
        margin: 0;
        padding: 1rem 1rem 1rem 1rem;
    }
    
    /* Add padding to all detail sections on mobile */
    .student-detail-flyout .detail-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .student-detail-flyout .detail-actions {
        padding: 1rem;
    }
    
    /* Communication/Messages Section - Mobile Drill-in */
    #messageDetailFlyout {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        background: white;
    }
    
    #messageDetailFlyout.mobile-active {
        transform: translateX(0);
    }
    
    #messageDetailFlyout .mobile-back-button {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
        background: #F5F5F5;
        border: none;
        cursor: pointer;
        font-weight: 600;
        color: #D2691E;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #E5E5E5;
    }
    
    #messageDetailFlyout .mobile-back-button:focus {
        outline: 2px solid #D2691E;
        outline-offset: -2px;
    }
    
    /* Hide detail views by default on mobile */
    .students-layout .students-list {
        display: block;
    }

    .students-layout.detail-active .students-list {
        display: none;
    }

    /* ========================================
       MOBILE CALENDAR OPTIMIZATIONS
       ======================================== */

    /* Remove fixed min-width for mobile */
    .vertical-calendar-week {
        min-width: 100%;
        width: 100%;
        overflow-x: hidden;
        display: block !important;
    }

    /* Adjust calendar container for mobile */
    .calendar-container {
        max-width: 100vw;
        overflow-x: hidden;
        border-radius: 8px;
    }

    /* Make calendar header controls stack better */
    .calendar-header-controls {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .calendar-month-nav {
        width: 100%;
        justify-content: center;
    }

    .current-month {
        font-size: 1.25rem;
        min-width: auto;
    }

    .month-nav-btn {
        width: 36px;
        height: 36px;
    }

    /* Single-day view optimizations for mobile */
    .single-day-calendar {
        padding: 0;
        min-height: auto;
    }

    .single-day-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .single-day-grid {
        grid-template-columns: 60px 1fr; /* Time column wide enough for "10 AM" */
    }

    .back-to-week-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .single-day-title h2 {
        font-size: 1.375rem;
    }

    /* Adjust time labels to be visible and LEFT-ALIGNED */
    .time-slot-label {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.375rem !important;
        text-align: left !important;
        height: 40px !important;
        display: block !important;
        line-height: 1.5 !important;
    }

    .time-column {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        display: block !important;
        flex-shrink: 0 !important;
    }

    /* Hide the single-day header on mobile (keep week view header behavior as-is) */
    .vertical-calendar-week .week-header.single-day-header-row {
        display: none !important;
    }

    /* Make calendar bookings more touch-friendly */
    .calendar-booking {
        min-height: 44px; /* iOS touch target guideline */
        font-size: 0.8125rem;
        padding: 0.625rem 0.5rem;
        left: 2px;
        right: 2px;
    }

    .booking-title {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }

    .booking-time {
        font-size: 0.6875rem;
    }

    .booking-instructor {
        font-size: 0.6875rem;
    }

    .booking-students {
        font-size: 0.625rem;
    }

    /* Week grid container - ensure proper grid layout */
    .week-grid-container {
        display: grid !important;
        grid-template-columns: 60px 1fr !important;
        width: 100% !important;
        overflow: visible !important;
    }

    /* Single-day column for mobile - CRITICAL: must be single column */
    .days-grid {
        display: block !important; /* Changed from grid to block */
        grid-template-columns: none !important;
        width: 100% !important;
        min-width: auto !important;
    }

    .day-column {
        position: relative !important;
        width: 100% !important;
        min-height: 1360px !important; /* 17 hours * 2 slots * 40px */
        display: block !important;
    }

    /* Time slot containers must be visible and non-interfering */
    .time-slot {
        height: 40px !important;
        border-bottom: 1px solid #F0F0F0 !important;
        position: relative !important;
        display: block !important;
    }

    /* Ensure bookings overlay is positioned absolutely WITHIN day-column */
    .bookings-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        pointer-events: none !important;
        z-index: 10 !important;
    }

    /* Calendar bookings must be absolutely positioned with explicit properties */
    .calendar-booking {
        position: absolute !important;
        pointer-events: all !important;
        display: block !important;
        cursor: pointer !important;
        z-index: 20 !important; /* Above time slots and overlay */
    }

    .day-column-header {
        padding: 0.75rem 0.25rem;
    }

    .day-name {
        font-size: 0.75rem;
        margin-bottom: 0.375rem;
    }

    .day-date {
        font-size: 1.25rem;
        width: 40px;
        height: 40px;
    }

    /* Remove scroll indicator on mobile since we use single-day view */
    .vertical-calendar-week::after {
        display: none;
    }

    /* Mobile day selector - add this for better navigation */
    .mobile-day-selector {
        display: flex;
        gap: 0.5rem;
        padding: 0.75rem;
        background: #F9F9F9;
        border-radius: 8px;
        margin-bottom: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

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

    .mobile-day-btn {
        flex-shrink: 0;
        min-width: 60px;
        padding: 0.625rem 0.75rem;
        background: white;
        border: 2px solid #E0E0E0;
        border-radius: 6px;
        font-weight: 600;
        font-size: 0.75rem;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-day-btn.active {
        background: linear-gradient(135deg, #FF8C00, #D2691E);
        color: white;
        border-color: #D2691E;
    }

    .mobile-day-btn .day-name {
        display: block;
        font-size: 0.625rem;
        opacity: 0.8;
        margin-bottom: 0.25rem;
    }

    .mobile-day-btn .day-number {
        display: block;
        font-size: 0.875rem;
        font-weight: 700;
    }
}

/* Desktop - side by side layout */
@media (min-width: 1024px) {
    .mobile-back-button {
        display: none !important;
    }
    
    .students-layout {
        display: flex;
        gap: 1.5rem;
        height: calc(100vh - 200px);
        overflow: hidden;
    }
    
    .students-list {
        width: 40%;
        display: flex;
        flex-direction: column;
        gap: 0;
        overflow: hidden;
        min-height: 0;
        padding: 0;
        background: transparent;
    }
    
    .students-filter {
        padding: 0;
        padding-right: 0.5rem;
    }
    
    #studentsList, #classesList {
        padding-right: 0.5rem;
        padding-left: 0;
        gap: 0.75rem;
        flex: 1;
        min-height: 0;
    }
    
    .student-detail-flyout,
    #messageDetailFlyout {
        width: 60%;
        position: static;
        transform: none;
        display: block;
        padding: 2rem;
        border-radius: 12px;
        border: 2px solid #E0E0E0;
        box-shadow: none;
        max-height: 100%;
        overflow-y: auto;
        animation: slideUp 0.4s ease-out;
    }
    
    .student-detail-flyout.visible,
    #messageDetailFlyout.visible {
        animation: slideUp 0.4s ease-out;
    }
}

/* Studio Detail Tabs */
.studio-detail-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 1rem;
}

.studio-detail-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    margin-bottom: 0.25rem;
}

.studio-detail-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #E0E0E0;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #707070;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #D2691E;
}

.tab-btn.active {
    color: #D2691E;
    border-bottom-color: #D2691E;
}

.studio-tab-content {
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Metric Boxes */
.metric-box {
    background: #F9F9F9;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #D2691E;
    margin-bottom: 0.25rem;
}

.metric-label {
    color: #707070;
    font-size: 0.875rem;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1rem 0 1.5rem 0;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #707070;
    letter-spacing: 0.5px;
}

.info-item p {
    color: #2C2C2C;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0;
}

/* Access Methods */
.access-methods-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0 1.5rem 0;
}

.access-method-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #F9F9F9;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.access-method-item:not(.inactive) {
    border-color: #D2691E;
}

.access-method-item.inactive {
    opacity: 0.5;
}

.access-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.access-details {
    flex: 1;
}

.access-details h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
}

.access-details p {
    font-size: 0.875rem;
    color: #707070;
    margin: 0 0 0.5rem 0;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #E0E0E0;
    color: #707070;
}

.status-badge.active {
    background: #D1FAE5;
    color: #059669;
}

/* Document List */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0 1.5rem 0;
}

.document-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #F9F9F9;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
    transition: all 0.2s ease;
}

.document-item.verified {
    border-color: #10B981;
}

.doc-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
}

.doc-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
}

.doc-info p {
    font-size: 0.875rem;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
}

.doc-info small {
    font-size: 0.75rem;
    color: #707070;
}

.btn-link {
    background: none;
    border: none;
    color: #D2691E;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.btn-link:hover {
    text-decoration: underline;
}

/* My Spaces Section */
/* My Spaces 40/60 Split Layout */
.spaces-layout {
    display: flex;
    gap: 1.5rem;
    height: calc(100vh - 200px);
}

.spaces-list {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.space-list-item {
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.space-list-item:hover {
    border-color: #D2691E;
    box-shadow: 0 2px 12px rgba(210, 105, 30, 0.1);
}

.space-list-item.active {
    border-color: #D2691E;
    background: #FFF8F0;
    box-shadow: 0 2px 12px rgba(210, 105, 30, 0.15);
}

.space-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.space-list-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0;
}

.space-rate {
    font-size: 1rem;
    font-weight: 700;
    color: #D2691E;
}

.space-list-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #E0E0E0;
    font-size: 0.875rem;
    color: #707070;
}

.space-access-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #FFF8F0;
    border-radius: 6px;
    font-size: 0.8125rem;
    color: #2C2C2C;
}

.space-detail-flyout {
    width: 60%;
    background: white;
    border-radius: 12px;
    border: 2px solid #E0E0E0;
    padding: 2rem;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

.space-detail-flyout.visible {
    animation: slideInRight 0.3s ease;
}

.space-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #E0E0E0;
    margin-bottom: 1.5rem;
}

.space-detail-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0;
}

.access-info-card {
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.access-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.equipment-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.booking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
}

.pricing-card {
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 1.5rem;
}

.pricing-rule {
    padding: 1rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.forecast-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.forecast-metric {
    background: #FFF8F0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.forecast-metric .metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #D2691E;
    margin-bottom: 0.5rem;
}

.forecast-metric .metric-label {
    font-size: 0.875rem;
    color: #707070;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spaces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.space-card {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.space-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.space-card-header {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #FFF8F0 0%, #F0E5D8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #E0E0E0;
}

.space-photo-placeholder {
    text-align: center;
}

.photo-count {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #707070;
}

.space-card-body {
    padding: 1.5rem;
}

.space-card-body h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 0.25rem 0;
}

.space-type {
    color: #707070;
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.space-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.space-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.space-detail-item .label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #707070;
    letter-spacing: 0.5px;
}

.space-detail-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: #2C2C2C;
}

.space-equipment {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E0E0E0;
}

.equipment-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #707070;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.equipment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.equipment-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #F0F7FF;
    color: #2C2C2C;
    font-size: 0.75rem;
    border-radius: 12px;
    border: 1px solid #D2691E;
}

.space-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #E0E0E0;
    background: #F9F9F9;
}

.space-card-actions button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Space Form Sections */
.form-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E0E0E0;
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input[type="date"] {
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.6);
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: opacity(1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #D2691E;
    box-shadow: 0 0 0 3px rgba(210, 105, 30, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #707070;
}

.checkbox-grid label {
    font-weight: normal;
    cursor: pointer;
    transition: color 0.2s ease;
}

.checkbox-grid label:hover {
    color: #D2691E;
}

.checkbox-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.upload-area {
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: #D2691E;
    background: #FFF8F0;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
}

/* Instructor-Specific Styles */
.marketing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.marketing-tool {
    text-align: center;
    padding: 2rem 1.5rem;
}

.marketing-tool h3 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
}

.marketing-tool p {
    color: #707070;
    margin: 0 0 1.5rem 0;
}

.compliance-status {
    padding: 1.5rem;
    background: #FFF8F0;
    border-radius: 8px;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-badge.status-success {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-warning {
    background: #fff3cd;
    color: #856404;
}

.compliance-details {
    margin: 1rem 0;
}

.compliance-details p {
    margin: 0.5rem 0;
    color: #2C2C2C;
}

.certifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.certification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #FFF8F0;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
}

.certification-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.community-post {
    padding: 1.5rem;
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.post-header h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
}

.post-meta {
    font-size: 0.875rem;
    color: #707070;
    margin: 0;
}

.post-content {
    color: #2C2C2C;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.post-footer {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E0E0E0;
}

.btn-link {
    background: none;
    border: none;
    color: #D2691E;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.message-subject {
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
    color: #2C2C2C;
}

.message-preview {
    font-size: 0.875rem;
    color: #707070;
    margin: 0.25rem 0;
}

.list-item.unread {
    background: #FFF8F0;
    border-left: 4px solid #D2691E;
}

.message-detail {
    padding: 1.5rem;
}

.message-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #E0E0E0;
}

.message-header h3 {
    margin: 0 0 0.75rem 0;
}

.message-from,
.message-date {
    font-size: 0.875rem;
    color: #707070;
    margin: 0.25rem 0;
}

.message-body {
    line-height: 1.6;
    color: #2C2C2C;
}

.message-body p {
    margin: 0 0 1rem 0;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.progress-bar {
    position: relative;
    background: #E0E0E0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar > div {
    height: 100%;
    background: #28a745;
    transition: width 0.3s ease;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-primary {
    background: rgba(210, 105, 30, 0.15);
    color: #D2691E;
}

.badge-high {
    background: #d4edda;
    color: #155724;
}

.badge-medium {
    background: #fff3cd;
    color: #856404;
}

.badge-low {
    background: #f8d7da;
    color: #721c24;
}

.calendar-week-view {
    font-size: 0.875rem;
}

.promotion-preview {
    margin-top: 1rem;
}

.btn-toggle {
    background: white;
    border: 2px solid #E0E0E0;
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: #707070;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:first-child {
    border-radius: 6px 0 0 6px;
}

.btn-toggle:last-child {
    border-radius: 0 6px 6px 0;
}

.btn-toggle:not(:last-child) {
    border-right: none;
}

.btn-toggle.active {
    background: #D2691E;
    color: white;
    border-color: #D2691E;
}

.btn-toggle:hover:not(.active) {
    background: #F8F8F8;
}

.calendar-controls {
    margin-bottom: 1.5rem;
}

.calendar-nav-buttons {
    display: flex;
    gap: 0.5rem;
}

.instructor-name-display {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.list-item-stats {
    font-size: 0.875rem;
    color: #707070;
    margin-top: 0.5rem;
}

.form-row {
    margin-bottom: 1rem;
}

/* Settings Styles */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.form-group label {
    font-weight: 600;
    color: #2C2C2C;
    font-size: 0.875rem;
    pointer-events: none;
}

.form-input {
    padding: 0.75rem;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background: white;
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
}

.form-input:focus {
    outline: none;
    border-color: #D2691E;
}

.form-input:disabled,
.form-input:read-only {
    background: #F5F5F5;
    color: #707070;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    padding-right: 2.5rem;
}

select.form-input::-ms-expand {
    display: none;
}

/* Modal Styles */
.modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    position: relative;
    /* animation: modalSlideIn 0.3s ease; - Removed to fix dropdown clipping */
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #E5E5E5;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    color: #2C2C2C;
    font-size: 1.5rem;
}

.modal-close-btn {
    background: #F0F0F0;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #E0E0E0;
    transform: rotate(90deg);
}

/* Detail content animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-content-animate {
    animation: fadeSlideIn 0.4s ease;
}

/* Notification Dropdown */
.notification-dropdown {
    position: fixed;
    top: 90px;
    right: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    width: 400px;
    max-width: 90vw;
    max-height: 500px;
    z-index: 1001;
    animation: dropdownFadeIn 0.2s ease;
    display: flex;
    flex-direction: column;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E5E5E5;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #2C2C2C;
}

.mark-all-read {
    background: none;
    border: none;
    color: #D2691E;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notification-list {
    overflow-y: auto;
    max-height: 420px;
}

.notification-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #F0F0F0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #FFF8F0;
}

.notification-item.unread {
    background: rgba(210, 105, 30, 0.05);
    border-left: 3px solid #D2691E;
}

.notification-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9375rem;
    color: #2C2C2C;
}

.notification-item p {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #707070;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
}

/* Launch Class Calendar Modal */
.launch-calendar-modal {
    max-width: 1200px;
    width: 95vw;
}

.launch-calendar-modal .modal-body {
    max-height: 75vh;
}

.launch-calendar-week-view {
    min-width: 900px;
}

.launch-calendar-list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.booking-card {
    position: relative;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.booking-card:hover {
    border-color: #D2691E;
    box-shadow: 0 4px 16px rgba(210, 105, 30, 0.15);
}

.booking-card.confirmed {
    border-left: 4px solid #10B981;
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), white);
}

.booking-card.soft-hold {
    border-left: 4px solid #F59E0B;
    background: linear-gradient(to right, rgba(245, 158, 11, 0.05), white);
}

.booking-card.awaiting {
    border-left: 4px solid #9CA3AF;
    background: linear-gradient(to right, rgba(156, 163, 175, 0.05), white);
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.booking-card-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #2C2C2C;
}

.booking-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.booking-status-indicator.confirmed {
    background: #D1FAE5;
    color: #065F46;
}

.booking-status-indicator.soft-hold {
    background: #FEF3C7;
    color: #92400E;
}

.booking-status-indicator.awaiting {
    background: #F3F4F6;
    color: #374151;
}

.booking-card-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.booking-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.booking-detail-label {
    font-size: 0.75rem;
    color: #707070;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.booking-detail-value {
    font-size: 1rem;
    color: #2C2C2C;
    font-weight: 600;
}

.booking-card-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E5E5;
}

.booking-quick-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.booking-card:hover .booking-quick-actions {
    opacity: 1;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid #E0E0E0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    border-color: #D2691E;
    background: #FFF8F0;
    transform: scale(1.1);
}

.empty-state-box {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed #E0E0E0;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state-box h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    color: #2C2C2C;
}

.empty-state-box p {
    margin: 0 0 1.5rem 0;
    color: #707070;
    font-size: 1rem;
    line-height: 1.6;
}

/* Class Wizard Modal */
.class-wizard-modal {
    max-width: 800px;
    width: 90vw;
}

.class-wizard-modal .modal-body {
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    flex: 1;
    min-height: 0;
}

.wizard-step-content {
    /* animation: fadeSlideIn 0.4s ease; - Temporarily disabled to fix click issue */
    position: relative;
    overflow: visible;
}

/* LaunchPad calculator progressive disclosure */
#launchpadKeyNumbers details[open] summary span {
    transform: rotate(90deg);
}

#launchpadKeyNumbers summary:hover {
    opacity: 0.8;
}

.wizard-progress {
    margin-top: 1.5rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #E0E0E0;
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    background: white;
    padding: 0 0.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E0E0E0;
    color: #707070;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #D2691E;
    color: white;
    box-shadow: 0 0 0 4px rgba(210, 105, 30, 0.2);
}

.progress-step.completed .step-number {
    background: #10B981;
    color: white;
}

.step-label {
    font-size: 0.75rem;
    color: #707070;
    font-weight: 600;
    text-align: center;
}

.progress-step.active .step-label {
    color: #D2691E;
}

.progress-step.completed .step-label {
    color: #10B981;
}

.wizard-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C2C2C;
    margin: 0 0 1rem 0;
}

.wizard-step-subtitle {
    font-size: 1rem;
    color: #707070;
    margin: 0 0 2rem 0;
    line-height: 1.6;
}

/* Recurrence Availability Overlay */
.recurrence-calendar-overlay {
    position: relative;
    margin: 2rem 0;
}

.recurrence-summary-panel {
    background: #FFF8F0;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.recurrence-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recurrence-summary-header h4 {
    margin: 0;
    font-size: 1.125rem;
    color: #2C2C2C;
}

.recurrence-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.recurrence-stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.recurrence-stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.recurrence-stat-value.confirmed {
    color: #10B981;
}

.recurrence-stat-value.pending {
    color: #F59E0B;
}

.recurrence-stat-value.conflict {
    color: #EF4444;
}

.recurrence-stat-label {
    font-size: 0.875rem;
    color: #707070;
}

.conflict-resolution-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.conflict-item {
    background: white;
    border: 2px solid #FEE2E2;
    border-radius: 8px;
    padding: 1rem;
}

.conflict-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.conflict-date {
    font-weight: 600;
    color: #EF4444;
}

.conflict-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Supportive Messaging */
.supportive-message {
    background: linear-gradient(135deg, #FFF8F0, #FFE8D6);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    align-items: start;
}

.supportive-message-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.supportive-message-content h4 {
    margin: 0 0 0.5rem 0;
    color: #92400E;
    font-size: 1.125rem;
}

.supportive-message-content p {
    margin: 0;
    color: #78350F;
    line-height: 1.6;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #E0E0E0;
    border-top-color: #D2691E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 100;
}

.loading-text {
    color: #707070;
    font-weight: 600;
}

/* Post-Action Banners */
.success-banner {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    border: 2px solid #10B981;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-banner-icon {
    font-size: 1.5rem;
}

.success-banner-content h4 {
    margin: 0 0 0.25rem 0;
    color: #065F46;
}

.success-banner-content p {
    margin: 0;
    color: #059669;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .launch-calendar-modal,
    .class-wizard-modal {
        width: 100vw;
        max-width: 100vw;
        min-height: auto; /* Let content determine height */
        max-height: 100vh; /* Don't exceed viewport */
        border-radius: 0;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    
    .class-wizard-modal .modal-content {
        padding: 0;
        margin: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .modal-header {
        padding: 0.75rem 1rem; /* Reduce vertical padding */
    }

    .modal-body {
        padding: 0.75rem 1rem;
        flex: 1; /* Take up available space */
        overflow-y: auto; /* Enable scrolling if content overflows */
        min-height: 0; /* Allow flex to shrink */
    }

    .wizard-step-content {
        padding: 0;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .progress-step {
        min-width: 60px;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .booking-card-details {
        grid-template-columns: 1fr !important;
    }

    .recurrence-stats {
        grid-template-columns: 1fr !important;
    }

    .notification-dropdown {
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    
    .students-layout {
        flex-direction: column;
        height: auto;
    }
    
    .students-list,
    .student-detail-flyout {
        width: 100%;
    }

    /* Force single column layouts on mobile */
    [style*="grid-template-columns: repeat(2, 1fr)"],
    [style*="grid-template-columns: repeat(3, 1fr)"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Adjust grid gaps for mobile */
    [style*="gap: 1.5rem"] {
        gap: 1rem !important;
    }
    
    /* Specifically target date input grid in step 1 */
    .wizard-step-content [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Stack buttons vertically on mobile */
    [style*="display: flex"][style*="gap"] > button {
        width: 100%;
    }

    /* Make modal buttons responsive on mobile */
    .modal-footer {
        padding: 0.75rem 1rem !important;
        gap: 0.5rem !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    /* Unwrap the nested div container */
    .modal-footer > div {
        display: contents !important;
    }

    /* Default: all buttons take full width (stacked vertically) */
    .modal-footer button {
        flex: 1 1 100% !important;
        font-size: 0.875rem !important;
        padding: 0.75rem 0.5rem !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        min-height: 48px !important;
        text-align: center !important;
    }
    
    /* When there are 3+ buttons (Previous visible), secondary buttons share first row */
    .modal-footer button#btnWizardPrev:not([style*="display: none"]) ~ div .action-btn-secondary,
    .modal-footer button#btnWizardPrev:not([style*="display: none"]) {
        flex: 1 1 calc(50% - 0.25rem) !important;
    }
    
    /* Primary button always full width and slightly larger */
    .modal-footer .action-btn-primary {
        flex: 1 1 100% !important;
        font-size: 0.9375rem !important;
        padding: 0.875rem 1rem !important;
    }

    /* Reduce font sizes */
    .wizard-step-title {
        font-size: 1.5rem;
    }

    .wizard-step-subtitle {
        font-size: 0.875rem;
    }

    /* Compact form inputs */
    .form-input,
    input[type="text"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 1rem;
        padding: 0.75rem;
    }

    /* Make space cards more compact */
    .space-availability-card {
        padding: 1rem !important;
    }

    /* Stack space detail stats */
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* LaunchPad calculator on mobile */
    #launchpadKeyNumbers {
        padding: 1rem !important;
    }

    /* Success screen optimizations */
    [style*="max-width: 600px"] {
        padding: 1rem !important;
    }

    /* Share buttons grid */
    [style*="grid-template-columns: repeat(3, 1fr)"] button {
        font-size: 0.8125rem !important;
        padding: 0.75rem 0.5rem !important;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.25rem;
    }

    .progress-steps {
        gap: 0.5rem;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }

    .step-label {
        font-size: 0.6875rem;
    }

    /* Very compact inputs */
    .form-group {
        margin-bottom: 1rem;
    }

    label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    /* Day pills more compact */
    [class*="day-pill"] {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
    }

    /* Radio cards stack */
    [class*="radio-card"] {
        min-width: 100%;
        padding: 0.875rem !important;
    }

    /* Reduce modal padding further */
    .modal-body {
        padding: 0.75rem;
    }

    /* Compact key metrics */
    #launchpadKeyNumbers [style*="font-size: 1.5rem"] {
        font-size: 1.25rem !important;
    }

    /* Share buttons text only */
    [style*="grid-template-columns: repeat(3, 1fr)"] button {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Image heights */
    [style*="height: 280px"] {
        height: 180px !important;
    }

    [style*="height: 80px"] {
        height: 60px !important;
    }

    [style*="width: 80px"] {
        width: 60px !important;
    }
}

/* Responsive Grid Utilities */
.responsive-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.responsive-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .responsive-grid-3,
    .responsive-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar Styling for Better UX */
#studentsList::-webkit-scrollbar,
#classesList::-webkit-scrollbar,
.student-detail-flyout::-webkit-scrollbar {
    width: 8px;
}

#studentsList::-webkit-scrollbar-track,
#classesList::-webkit-scrollbar-track,
.student-detail-flyout::-webkit-scrollbar-track {
    background: #F5F5F5;
    border-radius: 4px;
}

#studentsList::-webkit-scrollbar-thumb,
#classesList::-webkit-scrollbar-thumb,
.student-detail-flyout::-webkit-scrollbar-thumb {
    background: #D2691E;
    border-radius: 4px;
    transition: background 0.2s ease;
}

#studentsList::-webkit-scrollbar-thumb:hover,
#classesList::-webkit-scrollbar-thumb:hover,
.student-detail-flyout::-webkit-scrollbar-thumb:hover {
    background: #B85A1A;
}

/* Smooth scrolling */
#studentsList,
#classesList,
.student-detail-flyout {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #D2691E #F5F5F5;
}
