/* ═══════════════════════════════════════════════════════════
   StyleFlow SaaS - Design System
   Premium Light Theme | Electric Mint Palette | Aesthetics & Wellness
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Brand - StyleFlow */
    --primary: #00FFAB; /* Emerald 600 - High legibility on light background */
    --primary-hover: #047857; /* Emerald 700 */
    --primary-light: rgba(0, 255, 171, 0.1);
    --primary-50: rgba(0, 255, 171, 0.05);

    /* Light Neutral - Clean & Professional */
    --bg: #F8FAFC;      /* Slate 50 */
    --surface: #FFFFFF;  /* White */
    --surface-alt: #F1F5F9; /* Slate 100 */
    --border: #E2E8F0;    /* Slate 200 */
    --text-main: #0F172A;  /* Slate 900 */
    --text-muted: #64748B; /* Slate 500 */

    /* Sidebar - Light Theme */
    --bg-sidebar: #FFFFFF;
    --text-sidebar: #475569; /* Slate 600 */
    --sidebar-hover: rgba(0, 209, 160, 0.08);

    /* Semantic */
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.1);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.1);

    /* Motion - Fluid Flow */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadow - Soft & Deep for Light Mode */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

    /* Radius - StyleFlow Identity */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1 { font-family: 'Outfit', sans-serif; font-size: 2.5rem; font-weight: 800; line-height: 1.1; color: var(--text-main); letter-spacing: -0.02em; }
h2 { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.01em; }
h3 { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 600; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.05em; }
p  { color: var(--text-muted); line-height: 1.6; }

/* ── Links ── */
a { color: var(--text-main); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--primary-hover); }

/* ── Button System ── */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-main);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-light);
}

.btn-blue {
    background: var(--surface-alt);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-blue:hover { background: var(--border); }

.btn-red {
    background: var(--danger-light);
    color: var(--danger);
}
.btn-red:hover { background: var(--danger); color: var(--text-main); }

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: var(--primary-50);
}

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; font-weight: 700; }

/* ── Forms ── */
input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--text-main);
    box-shadow: 0 0 0 3px var(--primary-light);
}

input[type="checkbox"], input[type="radio"] {
    width: auto;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

input::placeholder { color: var(--text-muted); opacity: 0.6; }

.input-group { margin-bottom: 20px; }
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.badge.active    { background: var(--success-light); color: var(--success); }
.badge.inactive  { background: var(--danger-light);  color: var(--danger); }
.badge.pending   { background: var(--warning-light); color: var(--warning); }
.badge.primary   { background: var(--primary-light); color: var(--text-main); }

/* ── Card ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-padded { padding: 24px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
    background: var(--surface-alt);
    padding: 14px 20px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
td {
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    color: var(--text-main);
    font-size: 14px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--primary-50); }

.td-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state svg {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 16px;
}
.empty-state p {
    font-size: 14px;
    font-weight: 500;
}

/* ── Status dot ── */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
}
.status-dot.connected {
    background: var(--success);
    box-shadow: 0 0 8px var(--success-light);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Utility ── */
.hidden { display: none !important; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }

/* ── Onboarding Wizard ── */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.onboarding-overlay.active {
    display: flex;
}

.onboarding-card {
    background: white; /* Clean white */
    width: 95%;
    max-width: 680px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.onboarding-progress {
    height: 6px;
    background: var(--surface-alt);
    width: 100%;
    position: relative;
}

.onboarding-progress-inner {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.onboarding-header {
    padding: 32px 40px 16px;
    text-align: center;
}

.onboarding-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.onboarding-header p {
    font-size: 14px;
}

.onboarding-body {
    padding: 24px 40px 40px;
    flex: 1;
    overflow-y: auto;
    max-height: 70vh;
}

.onboarding-step {
    display: none;
    animation: fadeInStep 0.4s ease-out;
}

.onboarding-step.active {
    display: block;
}

/* ── Onboarding Enhancements (V2) ── */
.ob-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-main);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ob-item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.ob-item-list:empty::after {
    content: "Nenhum item adicionado ainda.";
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    padding: 12px;
    background: #f8fafc; /* Lighter background */
    border-radius: var(--radius-md);
    text-align: center;
}

.ob-item-card {
    background: white; /* Lighter background */
    border: 1px solid #e2e8f0; /* Lighter border */
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.ob-item-card:hover {
    border-color: var(--primary-300);
}

.ob-item-info {
    display: flex;
    flex-direction: column;
}

.ob-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.ob-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.ob-item-actions {
    display: flex;
    gap: 8px;
}

.ob-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ob-delete-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

.ob-form-container {
    background: #ffffff; /* Pure white */
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-top: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.ob-form-container {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    margin-top: 24px;
}

.ob-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Redesigning compact schedule */
.ob-schedule-compact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.ob-schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ob-schedule-row .day-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-main);
}

.ob-schedule-row .time-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ob-schedule-row .time-inputs input[type="time"] {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    width: 100px;
}

.ob-schedule-row .time-inputs .to-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Standardizing onboarding inputs to match global system */
.onboarding-card .input-group {
    margin-bottom: 20px;
}

.onboarding-card .input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.onboarding-card .input-group input, 
.onboarding-card .input-group textarea,
.onboarding-card .input-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
}

.onboarding-card .input-group input:focus {
    border-color: var(--text-main);
    box-shadow: 0 0 0 3px var(--primary-50);
    outline: none;
}

.ob-item-list {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ob-item-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.ob-item-card:hover {
    border-color: var(--text-main);
    background: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.05);
}

.ob-item-info {
    display: flex;
    flex-direction: column;
}

.ob-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
}

.ob-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.ob-item-delete {
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.ob-item-delete:hover {
    background: #fef2f2;
}


.onboarding-footer {
    padding: 24px 40px;
    background: #f8fafc; /* Lighter background */
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.onboarding-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onboarding-list-item {
    background: var(--primary-50);
    padding: 10px 16px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-hover);
    border: 1px solid var(--primary-light);
    animation: slideIn 0.3s ease-out;
}

.onboarding-success-view {
    text-align: center;
    padding: 60px 40px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.onboarding-success-view.active {
    display: flex;
}

.onboarding-icon-lg {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.onboarding-icon-lg svg {
    width: 40px;
    height: 40px;
}

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

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse-primary {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 171, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(0, 255, 171, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 171, 0); }
}

.btn-pulse {
    animation: pulse-primary 2s infinite;
}

/* ── Ajustes Onboarding ── */
.ob-section-title {
    font-size: 14px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-base);
    border-bottom: 1px solid var(--surface-alt);
    padding-bottom: 8px;
}

.ob-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.ob-day-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--surface-alt);
    border-radius: var(--radius);
}

.ob-day-row label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

.ob-day-times {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ob-day-row.active .ob-day-times {
    opacity: 1;
    pointer-events: all;
}

.ob-time-input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    width: 70px;
}

.ob-service-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ob-service-chip {
    padding: 6px 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.ob-service-chip.selected {
    background: var(--primary-light);
    color: var(--text-main);
    border-color: var(--text-main);
}

.ob-wa-status {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-weight: 600;
    margin-top: 16px;
    animation: fadeIn 0.3s ease-out;
}

.ob-wa-status.visible {
    display: flex;
}

/* Accordion Styles for Onboarding Professionals */
.ob-accordion {
    border: 1px solid var(--surface-alt);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--surface);
}

.ob-accordion-header {
    padding: 12px 16px;
    background: var(--surface-alt);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.2s;
    user-select: none;
}

.ob-accordion-header:hover {
    background: rgba(255,255,255,0.05);
}

.ob-accordion-content {
    padding: 16px;
    display: none;
    border-top: 1px solid var(--surface-alt);
}

.ob-accordion.active .ob-accordion-content {
    display: block;
}

.ob-accordion-header i {
    transition: transform 0.3s;
    font-size: 12px;
}

.ob-accordion.active .ob-accordion-header i {
    transform: rotate(180deg);
}

/* Delete Button Styles */
.ob-delete-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ob-delete-btn:hover {
    background: #ef4444;
    color: var(--text-main);
}

/* Service Checkbox Alignment Fix */
.ob-service-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.ob-service-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: var(--surface-alt);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.ob-service-checkbox-item:hover {
    border-color: var(--text-main);
}

.ob-service-checkbox-item input {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.ob-service-checkbox-item span {
    font-size: 13px;
    color: var(--text-base);
}
/* ── Onboarding Responsive Fixes ── */
@media (max-width: 600px) {
    .onboarding-header, .onboarding-body, .onboarding-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .onboarding-card {
        max-height: 98vh;
        border-radius: 0;
    }

    .onboarding-header h2 {
        font-size: 20px;
    }

    .ob-day-row {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
    }

    .ob-day-row label {
        min-width: 100px;
    }

    .ob-day-times {
        width: 100%;
        justify-content: flex-start;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid rgba(0,0,0,0.05);
    }

    .onboarding-footer {
        flex-direction: column-reverse;
        gap: 12px;
        padding: 20px;
    }

    .onboarding-footer .btn {
        width: 100%;
    }

    .onboarding-footer .btn-outline {
        border-color: transparent;
    }
}
/* ── Top Bar Actions ── */
.top-bar-actions {
    position: fixed;
    top: 16px;
    right: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-onboarding-trigger {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.btn-onboarding-trigger:hover {
    border-color: var(--text-main);
    background: var(--primary-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-onboarding-trigger svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .top-bar-actions {
        right: 16px;
        top: 14px;
        gap: 8px;
    }
    .btn-onboarding-trigger {
        width: 36px;
        height: 36px;
    }
}

/* ── Notifications System ── */
.notifications-wrapper {
    position: relative;
    display: inline-block;
}

.notifications-bell {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.notifications-bell:hover {
    background: var(--surface-alt);
    color: var(--text-main);
}

.notifications-bell svg {
    width: 20px;
    height: 20px;
}

.notif-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: var(--text-main);
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--surface);
}

.notifications-panel {
    position: fixed;
    width: 320px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    flex-direction: column;
    max-height: 480px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notifications-panel.visible {
    display: flex;
}

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

.notif-header h3 {
    margin: 0;
    font-size: 14px;
    color: var(--text-main);
    text-transform: none;
    letter-spacing: normal;
}

.notif-header button {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.notif-header button:hover {
    text-decoration: underline;
}

.notif-list {
    overflow-y: auto;
    flex: 1;
}

.notif-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.notif-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    text-align: left;
}

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

.notif-item:hover {
    background: var(--primary-50);
}

.notif-item.unread {
    background: var(--primary-50);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon.agendamento { background: var(--success-light); color: var(--success); }
.notif-icon.cancelamento { background: var(--danger-light); color: var(--danger); }

.notif-content {
    flex: 1;
}

.notif-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.notif-msg {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.7;
}

.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    right: 16px;
    top: 16px;
}

/* ── Switch Component ── */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-main);
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background-color: var(--text-main);
}

input:checked + .slider:before {
    transform: translateX(20px);
}
.completion-rocket {
    animation: rocketFloat 3s ease-in-out infinite;
}

@keyframes rocketFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.processing-bar {
    width: 240px;
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.processing-bar-inner {
    height: 100%;
    background: var(--primary);
    width: 0%;
    animation: processLoad 3s linear forwards;
}

@keyframes processLoad {
    0% { width: 0%; }
    10% { width: 5%; }
    30% { width: 45%; }
    100% { width: 100%; }
}

/* ── FullCalendar Events Override ── */
.fc-event {
    min-height: 40px !important;
    white-space: normal !important;
}

.fc-event-main {
    white-space: normal !important;
    overflow: hidden !important;
}

/* ── Global Mobile Responsiveness ── */
@media (max-width: 768px) {
    /* Inputs & Selects */
    .input-group input, 
    .input-group select, 
    .input-group textarea,
    .form-input {
        width: 100% !important;
        font-size: 16px !important; /* Previne zoom no iOS */
    }

    /* Buttons */
    .btn, .modal-btn {
        width: 100%;
        margin-bottom: 8px;
        justify-content: center;
        padding: 12px 16px;
        min-height: 44px; /* Acessibilidade Touch Target */
    }

    /* Modals */
    .custom-modal {
        width: 95% !important;
        max-height: 90vh;
        overflow-y: auto;
        padding: 16px;
        margin: auto;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer button {
        width: 100%;
        margin: 0;
    }

    /* Layout & Containers */
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 16px;
    }

    .page-header > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Tables */
    .table-container, 
    .content-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px; /* Força rolagem horizontal em telas pequenas */
    }

    /* Sidebars / Off-canvas */
    .sidebar {
        position: fixed;
        left: -100%;
        z-index: 9999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .sidebar.open {
        left: 0;
    }

    /* Calendar Toolbar */
    .fc-toolbar {
        flex-direction: column;
        gap: 12px;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }
}
