/* Team Ritual Scheduler - Main Styles */

:root {
    --sidebar-width: 250px;
    --header-height: 60px;
}

/* Dark mode variables */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a2e;
    --bs-body-color: #e0e0e0;
    --sidebar-bg: #16213e;
    --card-bg: #1f3460;
    --card-border: #2d4a7c;
}

[data-bs-theme="light"] {
    --sidebar-bg: #f8f9fa;
    --card-bg: #ffffff;
    --card-border: transparent;
}

/* Login page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: var(--card-bg, #fff);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo i {
    font-size: 3rem;
    color: #667eea;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.sidebar .nav {
    padding: 0.5rem;
}

.sidebar .nav-link {
    padding: 0.75rem 1rem;
    color: var(--bs-body-color);
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.2s;
}

.sidebar .nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.sidebar .nav-link.active {
    background-color: #667eea;
    color: white;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar .nav-section {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    padding: 1rem 1rem 0.5rem;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem;
    margin-top: auto;
    border-top: 1px solid var(--bs-border-color);
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 1.5rem;
    background: var(--bs-body-bg);
}

/* Cards */
.card {
    border: 1px solid var(--card-border, transparent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    background: var(--card-bg);
}

[data-bs-theme="dark"] .card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--bs-border-color);
    font-weight: 600;
}

[data-bs-theme="dark"] .card-header {
    border-bottom-color: var(--card-border);
}

/* Stats cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card.clickable-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card.clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] .stat-card.clickable-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

/* Session cards */
.session-card {
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.session-card:hover {
    transform: translateY(-2px);
}

.session-card.one-on-one {
    border-left-color: #667eea;
}

.session-card.show-and-tell {
    border-left-color: #764ba2;
}

.session-date {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
}

.session-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.participant-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 1rem;
    font-size: 0.875rem;
}

.participant-badge.initiator,
.participant-badge.current-user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.participant-badge.current-user i {
    color: white;
}

.participant-badge i {
    margin-right: 0.25rem;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.status-scheduled {
    background: #e3f2fd;
    color: #1565c0;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-skipped {
    background: #fff3e0;
    color: #ef6c00;
}

.status-pending {
    background: #fff8e1;
    color: #f9a825;
}

.status-accepted {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-declined {
    background: #ffebee;
    color: #c62828;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
}

/* Forms */
.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* Mobile styles */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bs-primary);
    color: white;
    border-radius: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 4rem 1rem 1rem;
    }

    .mobile-hide {
        display: none !important;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Page header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--bs-secondary-color);
    margin-bottom: 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--bs-secondary-color);
}

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

/* Calendar view */
.calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.calendar-day {
    text-align: center;
    padding: 0.5rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    min-height: 80px;
}

.calendar-day.has-session {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* User avatar */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-avatar.large {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
}

/* Tab navigation scrolling for mobile */
.nav-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tabs .nav-link {
    white-space: nowrap;
}

/* Form switch styling */
.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Modal */
.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Action buttons group */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}
