/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color palette */
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --success: 142 76% 36%;
    --warning: 38 92% 50%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --info: 217 91% 60%;
    --radius: 6px;
    
    /* Calendar specific colors */
    --calendar-primary: 240 5.9% 10%;
    --calendar-secondary: 240 4.8% 95.9%;
    --calendar-today: 217 91% 60%;
    --calendar-selected: 142 76% 36%;
    --calendar-hover: 240 4.8% 95.9%;
    --calendar-weekend: 240 3.8% 46.1%;
    
    /* Status colors */
    --status-scheduled: 217 91% 60%;
    --status-ongoing: 38 92% 50%;
    --status-completed: 142 76% 36%;
    --status-cancelled: 0 84.2% 60.2%;
    --status-makeup: 271 81% 56%;
}

body {
    font-family: 'TikTok Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: hsl(var(--muted));
    color: hsl(var(--foreground));
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px;
}

/* Landing page styles */
.landing-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: hsl(var(--background));
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-image: radial-gradient(circle at 10% 20%, hsl(var(--muted)) 0%, hsl(var(--background)) 50%);
}

.landing-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.landing-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

.landing-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    margin-bottom: 12px;
    line-height: 1.5;
    max-width: 380px;
}

.landing-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.feature-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
    color: hsl(var(--primary));
}

.contact-info {
    margin-top: 24px;
}

.contact-info a {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
}

.contact-info a:hover {
    color: hsl(var(--primary));
    text-decoration: underline;
}

/* Authentication card styles */
.auth-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.05), 0 1px 2px rgb(0 0 0 / 0.05);
}

.auth-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 20px;
    text-align: center;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.auth-switch a {
    color: hsl(var(--primary));
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Form styles */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 400;
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
}

.form-group input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-group input::placeholder {
    color: hsl(var(--muted-foreground));
    font-weight: 400;
}

/* Role selection styles */
.role-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.role-option {
    position: relative;
}

.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.role-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: hsl(var(--background));
    border: 2px solid hsl(var(--border));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.role-label:hover {
    border-color: hsl(var(--primary) / 0.5);
    background-color: hsl(var(--muted) / 0.5);
}

.role-option input[type="radio"]:checked + .role-label {
    border-color: hsl(var(--primary));
    background-color: hsl(var(--primary) / 0.05);
}

.role-icon {
    font-size: 2rem;
    line-height: 1;
}

.role-info {
    flex: 1;
    text-align: left;
}

.role-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 2px;
}

.role-desc {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

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

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.btn-primary:hover:not(:disabled) {
    background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border-color: hsl(var(--border));
}

.btn-secondary:hover:not(:disabled) {
    background-color: hsl(var(--secondary) / 0.8);
}

.btn-success {
    background-color: hsl(var(--success));
    color: white;
    border-color: hsl(var(--success));
}

.btn-success:hover:not(:disabled) {
    background-color: hsl(var(--success) / 0.9);
}

.btn-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    border-color: hsl(var(--destructive));
}

.btn-destructive:hover:not(:disabled) {
    background-color: hsl(var(--destructive) / 0.9);
}

.btn-warning {
    background-color: hsl(var(--warning));
    color: hsl(var(--foreground));
    border-color: hsl(var(--warning));
}

.btn-warning:hover:not(:disabled) {
    background-color: hsl(var(--warning) / 0.9);
}

.btn-ghost {
    background-color: transparent;
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}

.btn-ghost:hover:not(:disabled) {
    background-color: hsl(var(--secondary));
}

.btn-full {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Spinner styles */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loading screen styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsl(var(--background));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    max-width: 300px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid hsl(var(--muted));
    border-top: 4px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
}

.loading-subtitle {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

/* Error display styles */
.error-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsl(var(--background));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 8px;
}

.error-message {
    font-size: 1rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Dashboard common styles */
.dashboard-container {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.dashboard-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 4px;
}

.dashboard-subtitle {
    color: hsl(var(--muted-foreground));
    font-size: 1rem;
}

.dashboard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    text-decoration: none;
    color: hsl(var(--muted-foreground));
    border-radius: var(--radius);
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-link:hover {
    background-color: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.nav-link.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.user-role {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Card styles */
.card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}

.card-header {
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 4px;
}

.card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-content {
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid hsl(var(--border));
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stat-change {
    font-size: 0.75rem;
    margin-top: 4px;
}

.stat-change.positive {
    color: hsl(var(--success));
}

.stat-change.negative {
    color: hsl(var(--destructive));
}

/* Calendar styles */
.calendar-container {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--muted) / 0.5);
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    padding: 6px 8px;
    background: none;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    cursor: pointer;
    color: hsl(var(--foreground));
    transition: all 0.2s ease-in-out;
}

.calendar-nav button:hover {
    background-color: hsl(var(--muted));
}

.calendar-view-toggle {
    display: flex;
    gap: 4px;
    background-color: hsl(var(--muted));
    border-radius: var(--radius);
    padding: 4px;
}

.view-toggle-btn {
    padding: 6px 12px;
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    transition: all 0.2s ease-in-out;
}

.view-toggle-btn.active {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

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

.calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    background-color: hsl(var(--muted) / 0.3);
    border-bottom: 1px solid hsl(var(--border));
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid hsl(var(--border));
    border-bottom: 1px solid hsl(var(--border));
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.calendar-day:hover {
    background-color: hsl(var(--calendar-hover));
}

.calendar-day.today {
    background-color: hsl(var(--calendar-today) / 0.1);
    border-color: hsl(var(--calendar-today));
}

.calendar-day.other-month {
    background-color: hsl(var(--muted) / 0.3);
    color: hsl(var(--muted-foreground));
}

.calendar-day.weekend {
    background-color: hsl(var(--muted) / 0.2);
}

.day-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 4px;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-event {
    font-size: 0.625rem;
    padding: 2px 4px;
    border-radius: 2px;
    color: white;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-scheduled {
    background-color: hsl(var(--status-scheduled));
}

.event-ongoing {
    background-color: hsl(var(--status-ongoing));
}

.event-completed {
    background-color: hsl(var(--status-completed));
}

.event-cancelled {
    background-color: hsl(var(--status-cancelled));
}

.event-makeup {
    background-color: hsl(var(--status-makeup));
}

/* Alert styles */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid;
    margin: 12px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert-success {
    background-color: hsl(var(--success) / 0.1);
    border-color: hsl(var(--success) / 0.2);
    color: hsl(var(--success));
}

.alert-warning {
    background-color: hsl(var(--warning) / 0.1);
    border-color: hsl(var(--warning) / 0.2);
    color: hsl(142 76% 20%);
}

.alert-destructive {
    background-color: hsl(var(--destructive) / 0.1);
    border-color: hsl(var(--destructive) / 0.2);
    color: hsl(var(--destructive));
}

.alert-info {
    background-color: hsl(var(--info) / 0.1);
    border-color: hsl(var(--info) / 0.2);
    color: hsl(var(--info));
}

.alert-text {
    font-weight: 500;
    font-size: 0.875rem;
    flex: 1;
}

.alert-icon {
    font-size: 1rem;
    margin-top: 1px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    margin: 20px;
    position: relative;
    z-index: 1001;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid hsl(var(--border));
}

.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: hsl(var(--foreground));
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid hsl(var(--border));
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .landing-title {
        font-size: 2.75rem;
    }

    .landing-subtitle {
        font-size: 1rem;
    }

    .landing-features {
        gap: 16px;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 0 20px;
    }
    
    .auth-card {
        padding: 20px;
        max-width: 100%;
    }
    
    .dashboard-container {
        padding: 12px;
    }
    
    .dashboard-nav {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .nav-links {
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 6px;
    }
    
    .modal-content {
        margin: 16px;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .role-selection {
        gap: 8px;
    }

    .role-label {
        padding: 12px;
    }

    .role-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .landing-title {
        font-size: 2.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        font-size: 0.75rem;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .day-number {
        font-size: 0.75rem;
    }
    
    .calendar-event {
        font-size: 0.5rem;
        padding: 1px 2px;
    }
}