/* ShiftOnCall - Material Design 3 Styles */

:root {
    /* Material Design 3 Color Tokens */
    --md-sys-color-primary: #6750a4;
    --md-sys-color-primary-container: #eaddff;
    --md-sys-color-secondary: #625b71;
    --md-sys-color-secondary-container: #e8def8;
    --md-sys-color-surface: #fffbfe;
    --md-sys-color-surface-variant: #e7e0ec;
    --md-sys-color-background: #fffbfe;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-error-container: #ffdad6;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-on-surface: #1c1b1f;
    --md-sys-color-on-background: #1c1b1f;
    --md-sys-color-outline: #79747e;
    --md-sys-color-outline-variant: #cac4d0;
    
    /* Typography */
    --md-sys-typescale-display-large-font: 'Roboto', sans-serif;
    --md-sys-typescale-display-large-size: 57px;
    --md-sys-typescale-display-large-weight: 400;
    --md-sys-typescale-headline-large-size: 32px;
    --md-sys-typescale-headline-large-weight: 400;
    --md-sys-typescale-body-large-size: 16px;
    --md-sys-typescale-body-large-weight: 400;
    
    /* Elevation */
    --md-sys-elevation-level1: 0px 1px 2px 0px rgba(0, 0, 0, 0.30), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-level2: 0px 1px 2px 0px rgba(0, 0, 0, 0.30), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-level3: 0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: var(--md-sys-typescale-display-large-font);
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    line-height: 1.6;
}

/* Material Design 3 Components */

/* Buttons */
.md-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 40px;
    padding: 0 24px;
    border: none;
    border-radius: 20px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.md-button-filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.md-button-filled:hover {
    box-shadow: var(--md-sys-elevation-level1);
    transform: translateY(-1px);
}

.md-button-outlined {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}

.md-button-outlined:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

.md-button-text {
    background-color: transparent;
    color: var(--md-sys-color-primary);
}

.md-button-text:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

/* Cards */
.md-card {
    background-color: var(--md-sys-color-surface);
    border-radius: 12px;
    box-shadow: var(--md-sys-elevation-level1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.md-card:hover {
    box-shadow: var(--md-sys-elevation-level2);
    transform: translateY(-2px);
}

.md-card-header {
    padding: 24px 24px 0;
}

.md-card-content {
    padding: 16px 24px;
}

.md-card-actions {
    padding: 8px 16px 16px;
    display: flex;
    gap: 8px;
}

/* Input Fields - Using Material Design Floating Labels */
.md-textfield {
    position: relative;
    margin-bottom: 24px;
    display: inline-flex;
    flex-direction: column;
    width: 100%;
}

.md-textfield input,
.md-textfield select {
    width: 100%;
    padding: 16px 16px 8px 16px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 4px 4px 0 0;
    background-color: var(--md-sys-color-surface);
    font-family: inherit;
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
    transition: all 0.2s ease;
    border-bottom-width: 2px;
}

.md-textfield input:focus,
.md-textfield select:focus {
    outline: none;
    border-bottom-color: var(--md-sys-color-primary);
}

.md-textfield label {
    position: absolute;
    top: 16px;
    left: 16px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 16px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.2s ease;
    transform-origin: left top;
    background-color: transparent;
    padding: 0 4px;
}

.md-textfield input:focus + label,
.md-textfield input:not(:placeholder-shown) + label,
.md-textfield select:focus + label,
.md-textfield select:not([value=""]) + label {
    top: 0;
    left: 12px;
    font-size: 12px;
    color: var(--md-sys-color-primary);
    transform: translateY(-50%) scale(0.85);
    background-color: var(--md-sys-color-surface);
}

/* Navigation */
.navbar {
    background-color: var(--md-sys-color-surface);
    box-shadow: var(--md-sys-elevation-level2);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    font-size: 22px;
    font-weight: 500;
    color: var(--md-sys-color-primary);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
}

.navbar-nav a {
    color: var(--md-sys-color-on-surface);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

.navbar-nav a:hover {
    background-color: rgba(103, 80, 164, 0.08);
}

.navbar-nav a.active {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-weight: 500;
}

/* Hide menu toggle on desktop */
.menu-toggle {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--md-sys-color-primary-container) 0%, var(--md-sys-color-secondary-container) 100%);
    padding: 80px 24px;
    text-align: center;
}

.hero h1 {
    font-size: var(--md-sys-typescale-display-large-size);
    font-weight: var(--md-sys-typescale-display-large-weight);
    color: var(--md-sys-color-on-surface);
    margin-bottom: 24px;
}

.hero p {
    font-size: 20px;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 80px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: var(--md-sys-typescale-headline-large-size);
    margin-bottom: 48px;
    color: var(--md-sys-color-on-background);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background-color: var(--md-sys-color-primary-container);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: var(--md-sys-color-primary);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--md-sys-color-on-surface);
}

.feature-card p {
    color: var(--md-sys-color-on-surface);
    opacity: 0.8;
}

/* Pricing Section */
.pricing {
    background-color: var(--md-sys-color-surface-variant);
    padding: 80px 24px;
}

.pricing h2 {
    text-align: center;
    font-size: var(--md-sys-typescale-headline-large-size);
    margin-bottom: 48px;
    color: var(--md-sys-color-on-background);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    padding: 32px 24px;
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--md-sys-color-primary);
    transform: scale(1.05);
}

.pricing-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--md-sys-color-on-surface);
}

.pricing-price {
    font-size: 48px;
    font-weight: bold;
    color: var(--md-sys-color-primary);
    margin-bottom: 8px;
}

.pricing-period {
    color: var(--md-sys-color-outline);
    margin-bottom: 24px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--md-sys-color-on-surface);
}

.pricing-features li:before {
    content: "✓";
    color: var(--md-sys-color-primary);
    font-weight: bold;
    margin-right: 8px;
}

/* Dashboard */
.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: var(--md-sys-typescale-headline-large-size);
    margin-bottom: 8px;
    color: var(--md-sys-color-on-background);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--md-sys-color-primary);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--md-sys-color-outline);
    font-size: 14px;
}

/* Shifts */
.shift-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shift-item {
    padding: 20px;
    border-left: 4px solid var(--md-sys-color-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shift-info h3 {
    margin-bottom: 8px;
    color: var(--md-sys-color-on-surface);
}

.shift-time {
    color: var(--md-sys-color-outline);
    font-size: 14px;
}

.shift-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.shift-status.open {
    background-color: #e3f2fd;
    color: #1976d2;
}

.shift-status.filled {
    background-color: #e8f5e8;
    color: #388e3c;
}

.shift-status.completed {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Mobile Menu Styles */
    .navbar-nav {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 64px);
        background: var(--md-sys-color-surface-container, #FFFFFF);
        box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
        display: flex !important;
        flex-direction: column;
        padding: 24px 0;
        transition: right 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
        gap: 0;
    }

    .navbar-nav.active {
        right: 0;
    }

    .navbar-nav li {
        margin: 0;
        display: block;
        width: 100%;
    }

    .navbar-nav a,
    .navbar-nav button {
        display: flex !important;
        padding: 16px 24px;
        border-radius: 0;
        justify-content: flex-start;
        width: 100%;
        text-align: left;
        align-items: center;
        gap: 12px;
    }

    .menu-toggle {
        display: flex !important;
    }

    /* Mobile menu backdrop */
    body::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        z-index: 998;
    }

    body.menu-open::before {
        opacity: 1;
        pointer-events: auto;
    }

    body.menu-open {
        overflow: hidden;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 32px;
}

.mt-4 {
    margin-top: 32px;
}

.hidden {
    display: none;
}

.error-message {
    background-color: var(--md-sys-color-error-container);
    color: var(--md-sys-color-error);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Form Validation Styles */
.field-valid {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.field-invalid {
    border-color: var(--md-sys-color-error) !important;
    box-shadow: 0 0 0 2px rgba(186, 26, 26, 0.2);
}

.field-error {
    color: var(--md-sys-color-error);
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeInError 0.2s ease-in;
}

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

/* Notification Styles */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: var(--md-sys-elevation-level3);
    animation: slideInRight 0.3s ease-out;
}

.notification-success {
    background-color: #4caf50;
    color: white;
}

.notification-error {
    background-color: var(--md-sys-color-error);
    color: white;
}

.notification-info {
    background-color: var(--md-sys-color-primary);
    color: white;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: 12px;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--md-sys-motion-duration-medium4, 0.3s) ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    background-color: var(--md-sys-color-surface);
    border-radius: 12px;
    box-shadow: var(--md-sys-elevation-level3);
    max-width: 500px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    transform: scale(0.7);
    transition: transform var(--md-sys-motion-duration-medium4, 0.3s) ease;
    z-index: 1001;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--md-sys-color-on-surface);
    font-size: 20px;
    font-weight: 500;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 20px;
    color: var(--md-sys-color-on-surface-variant);
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

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

.modal-actions {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.large-modal .modal-content {
    max-width: 800px;
}

/* Modal responsive design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
    }

    .modal-header {
        padding: 16px 16px 0;
    }

    .modal-body {
        padding: 0 16px 16px;
    }

    .modal-actions {
        padding: 12px 16px 16px;
        flex-direction: column-reverse;
    }

    .modal-actions .md-button {
        width: 100%;
        justify-content: center;
    }
}