/**
 * Escala de Culto - Styles
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 */

/* CSS Variables - Premium SaaS Palette */
:root {
    /* User-selected palette colors */
    --primary-color: #4F46E5; /* Indigo */
    --secondary-color: #EF4444; /* Red - for alerts */
    --accent-color: #8B5CF6; /* Violet */
    --surface-color: #10B981; /* Emerald */
    --text-color: #FFFFFF;
    
    /* Automatic variations */
    --primary-hover: color-mix(in srgb, var(--primary-color) 85%, black);
    --primary-light: color-mix(in srgb, var(--primary-color) 10%, var(--bg-color));
    --secondary-hover: color-mix(in srgb, var(--secondary-color) 85%, black);
    --accent-hover: color-mix(in srgb, var(--accent-color) 85%, black);
    
    /* Background and text */
    --bg-color: #F8FAFC; /* Slate 50 */
    --bg-secondary: #FFFFFF; /* White */
    --text-primary: #0F172A; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94A3B8; /* Slate 400 */
    
    /* Layout */
    --border-radius: 16px;
    --border-radius-small: 10px;
    --spacing-unit: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows - Premium Soft */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-large: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.05);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    
    /* Interactive Elements */
    --neu-shadow-light: 0 6px 16px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02);
    --neu-shadow-pressed: inset 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-color: #0F172A; /* Slate 900 */
    --bg-secondary: #1E293B; /* Slate 800 */
    --text-primary: #F8FAFC; /* Slate 50 */
    --text-secondary: #CBD5E1; /* Slate 300 */
    --text-muted: #64748B; /* Slate 500 */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-large: 0 20px 40px rgba(0, 0, 0, 0.6);
    --neu-shadow-light: 0 6px 16px rgba(0, 0, 0, 0.5);
    --neu-shadow-pressed: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #0F172A;
        --bg-secondary: #1E293B;
        --text-primary: #F8FAFC;
        --text-secondary: #CBD5E1;
        --text-muted: #64748B;
        --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
        --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.5);
        --shadow-large: 0 20px 40px rgba(0, 0, 0, 0.6);
        --neu-shadow-light: 0 6px 16px rgba(0, 0, 0, 0.5);
        --neu-shadow-pressed: inset 0 2px 6px rgba(0, 0, 0, 0.6);
    }
}

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

input, select, textarea, button, img {
    max-width: 100%;
}

html {
    font-size: clamp(14px, 2.5vw, 18px);
    scroll-behavior: smooth;
    width: 100%;
    overscroll-behavior-x: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-color);
    padding-top: 60px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    overscroll-behavior-x: none;
}

@media (max-width: 899px) {
    body {
        padding-bottom: calc(95px + env(safe-area-inset-bottom, 0px));
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: calc(var(--spacing-unit) * 2);
}

/* Fixed Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 calc(var(--spacing-unit) * 2);
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-logo h1 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
}

.header-logo i {
    font-size: 1.5rem;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    gap: calc(var(--spacing-unit));
}

.desktop-nav .nav-link {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
    padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.desktop-nav .nav-link:hover,
.desktop-nav .nav-link.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

@media (min-width: 900px) {
    .desktop-nav {
        display: flex;
    }
    .bottom-nav {
        display: none !important;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--neu-shadow-light);
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.btn-icon:active {
    transform: scale(0.95);
    box-shadow: var(--neu-shadow-pressed);
}

/* Bottom Navigation Premium */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(70px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.2), transparent);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 65px;
    height: 56px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.nav-item i {
    font-size: 22px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.nav-item span {
    z-index: 2;
}

.nav-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transform: scale(0.5) translateY(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    z-index: 1;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    transform: translateY(-2px);
}

.nav-item.active::after {
    opacity: 0.08;
    transform: scale(1) translateY(0);
}

.nav-item:hover {
    color: var(--primary-color);
}
.nav-item:hover::after {
    opacity: 0.04;
    transform: scale(1) translateY(0);
}

/* Container */
.container {
    max-width: 100%;
    padding: calc(var(--spacing-unit) * 2);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: calc(var(--spacing-unit) * 3);
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
}

/* Sections */
.section {
    display: none;
    min-height: calc(100vh - 60px);
    animation: fadeIn 0.3s ease-in-out;
}

.section.active {
    display: block;
}

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

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: calc(var(--spacing-unit) * 3);
    padding-bottom: calc(var(--spacing-unit) * 2);
    border-bottom: 2px solid var(--bg-secondary);
}

.btn-back {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--neu-shadow-light);
}

.btn-back:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.btn-back:active {
    transform: scale(0.95);
    box-shadow: var(--neu-shadow-pressed);
}

.page-header h2 {
    flex: 1 1 200px;
    margin: 0;
    font-size: 1.5rem;
    min-width: 200px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
    padding: calc(var(--spacing-unit) * 1.2) calc(var(--spacing-unit) * 2);
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    box-shadow: var(--neu-shadow-light);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--neu-shadow-pressed);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: var(--secondary-color);
    color: white;
}

.btn-danger:hover {
    background: var(--secondary-hover);
}

/* Hero Section */
.hero-section {
    position: relative;
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 4);
    padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 2);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), var(--shadow-medium);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.hero-content, .hero-stats {
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 2.8rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: calc(var(--spacing-unit) * 4);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: calc(var(--spacing-unit) * 5);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
    max-width: 500px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

[data-theme="dark"] .stat-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: calc(var(--spacing-unit) / 2);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;

}

/* Cards */
.card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: calc(var(--spacing-unit) * 3);
    box-shadow: var(--neu-shadow-light);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

/* Chips Selection Group */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 1.5);
    margin-top: calc(var(--spacing-unit));
}

.chip-label {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.chip-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
    user-select: none;
    box-shadow: var(--neu-shadow-light);
}

[data-theme="dark"] .chip-text {
    border-color: rgba(255, 255, 255, 0.05);
}

.chip-label:hover .chip-text {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.15);
}

.chip-label input[type="checkbox"]:checked + .chip-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

/* Forms */
.form-group {
    margin-bottom: calc(var(--spacing-unit) * 3);
}

.form-group label {
    display: block;
    margin-bottom: calc(var(--spacing-unit));
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea,
.schedule-form > input,
.schedule-form > select {
    width: 100%;
    padding: calc(var(--spacing-unit) * 1.5);
    border: 2px solid var(--bg-secondary);
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: var(--transition);
    box-shadow: var(--shadow-inset);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.schedule-form > input:focus,
.schedule-form > select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

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

.form-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: center;
    margin-top: calc(var(--spacing-unit) * 4);
}

/* Schedule List */
.schedule-list {
    display: grid;
    gap: calc(var(--spacing-unit) * 2);
}

.schedule-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: calc(var(--spacing-unit) * 3);
    padding: calc(var(--spacing-unit) * 2.5);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .schedule-item {
    border-color: rgba(255, 255, 255, 0.03);
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.schedule-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    padding: calc(var(--spacing-unit));
    background: var(--primary-light);
    border-radius: var(--border-radius-small);
}

.schedule-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.schedule-weekday {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.schedule-details {
    flex: 1;
}

.schedule-roles {
    display: grid;
    gap: calc(var(--spacing-unit) / 2);
}

.schedule-role {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
    font-size: 0.9rem;
}

.role-label {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 60px;
}

.role-name {
    color: var(--text-primary);
    font-weight: 500;
}

.role-name.empty {
    color: var(--text-muted);
    font-style: italic;
}

.schedule-note {
    margin-top: calc(var(--spacing-unit));
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.schedule-actions {
    display: flex;
    gap: calc(var(--spacing-unit));
}

.btn-edit {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--neu-shadow-light);
}

.btn-edit:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.btn-edit:active {
    transform: scale(0.95);
    box-shadow: var(--neu-shadow-pressed);
}

/* History */
.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: calc(var(--spacing-unit) * 3);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    transition: var(--transition);
    opacity: 0;
}

.history-item:hover {
    transform: translateY(-4px) translateX(2px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(79, 70, 229, 0.2);
}

.history-item:hover::before {
    width: 6px;
    opacity: 1;
}

.history-info h4 {
    margin: 0 0 calc(var(--spacing-unit) / 2) 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.history-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.history-actions {
    display: flex;
    gap: calc(var(--spacing-unit));
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: calc(var(--spacing-unit) * 2);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-large);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-20px) scale(0.95); }
    to { transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(var(--spacing-unit) * 3);
    border-bottom: 1px solid var(--bg-secondary);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--secondary-color);
    color: white;
}

.modal-form {
    padding: calc(var(--spacing-unit) * 3);
}

.modal-actions {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
    justify-content: flex-end;
    margin-top: calc(var(--spacing-unit) * 3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: calc(var(--spacing-unit) * 6);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    color: var(--text-muted);
}

.empty-state h4 {
    margin-bottom: calc(var(--spacing-unit));
    color: var(--text-primary);
}

.empty-state p {
    margin-bottom: calc(var(--spacing-unit) * 3);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ & Help Section */
.help-intro {
    text-align: center;
    margin-bottom: calc(var(--spacing-unit) * 5);
    padding: calc(var(--spacing-unit) * 4);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.help-intro h3 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.faq-container {
    display: grid;
    gap: calc(var(--spacing-unit) * 2);
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .faq-item {
    border-color: rgba(255, 255, 255, 0.05);
}

.faq-item:hover {
    box-shadow: var(--shadow-medium);
    border-color: rgba(79, 70, 229, 0.3);
}

.faq-question {
    width: 100%;
    padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 3);
    border: none;
    background: transparent;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
}

.faq-question[aria-expanded="true"] {
    background: rgba(79, 70, 229, 0.02);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    background: var(--primary-color);
    color: white;
}

.faq-answer {
    padding: 0 calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 3);
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    background: rgba(79, 70, 229, 0.02);
}

.faq-answer[hidden] {
    display: none;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-color);
    padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3000;
    max-width: 90vw;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit));
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success {
    background: var(--surface-color);
}

.toast.error {
    background: var(--secondary-color);
}

.toast.warning {
    background: var(--accent-color);
    color: var(--text-primary);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 6);
    border-top: 1px solid var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.app-footer p {
    margin-bottom: calc(var(--spacing-unit));
}

.b20-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.b20-link:hover {
    text-decoration: underline;
    transform: scale(1.05);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--border-radius-small);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 767px) {
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .schedule-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: calc(var(--spacing-unit) * 1.5);
    }
    
    .schedule-date {
        align-self: center;
    }
    
    .modal-content {
        margin: calc(var(--spacing-unit) * 2);
        max-height: calc(100vh - calc(var(--spacing-unit) * 4));
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .schedule-item {
        grid-template-columns: auto 1fr auto;
    }
    
    .hero-actions {
        flex-direction: row;
    }
}

/* Inline Edit Cards for Table Layout */
.inline-edit-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: calc(var(--spacing-unit) * 2);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .inline-edit-card {
    border-color: rgba(255,255,255,0.05);
}

.schedule-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.schedule-inputs .input-group {
    display: flex;
    flex-direction: column;
}

.schedule-inputs label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.schedule-inputs input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius-small);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.schedule-inputs input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

[data-theme="dark"] .schedule-inputs input {
    border-color: rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
    .inline-edit-card {
        flex-direction: row;
        align-items: center;
    }
    .schedule-inputs {
        flex-direction: row;
        align-items: center;
        flex: 1;
    }
    .schedule-inputs .input-group {
        flex: 1;
    }
}

/* Print Styles */
@media print {
    :root {
        --bg-color: #ffffff;
        --text-primary: #000000;
        --text-secondary: #333333;
    }

    body {
        padding: 0;
        background: white;
        color: black;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .app-header,
    .bottom-nav,
    .btn,
    .modal,
    .btn-back,
    .header-actions {
        display: none !important;
    }
    
    .section:not(.active) {
        display: none !important;
    }
    
    .hide-on-print {
        display: none !important;
    }

    #schedule-title {
        text-align: center;
        font-size: 24pt;
        margin-top: 0;
        margin-bottom: 20px;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        color: #000;
        width: 100%;
        display: block;
    }
    
    .page-header {
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .schedule-item {
        break-inside: avoid;
        margin-bottom: 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        padding: 0;
        overflow: hidden;
    }

    .schedule-date {
        flex: 0 0 70px;
        background: #f0f0f0 !important;
        border-right: 1px solid #ccc;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 5px;
    }

    .schedule-day {
        font-size: 1.4rem;
        font-weight: bold;
        color: #000;
    }

    .schedule-weekday {
        font-size: 0.75rem;
        text-transform: uppercase;
        color: #555;
    }
    
    .schedule-inputs {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 10px 15px;
    }
    
    .schedule-inputs .input-group {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        flex: 1;
    }

    .schedule-inputs label {
        font-weight: bold;
        font-size: 0.9rem;
        color: #000;
        min-width: max-content;
        text-transform: uppercase;
    }

    .schedule-inputs input {
        border: none !important;
        border-bottom: 1px dotted #999 !important;
        background: transparent !important;
        padding: 2px 5px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: #000 !important;
        font-size: 1rem;
        width: 100%;
        flex: 1;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.nav-item:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* App Global Footer */
.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spacing-unit) * 4) calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 5);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
    color: var(--text-muted);
}

[data-theme="dark"] .site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-brand {
    font-size: 0.85rem;
    margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.footer-brand a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.footer-brand a:hover {
    color: var(--accent-color);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links .separator {
    color: var(--border-color);
    font-size: 0.7rem;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
