/* ============================================
   Da Pra Marcar - Design System
   Dark theme + Teal accent (#00b894)
   ============================================ */

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

:root {
    --teal: #00b894;
    --teal-light: #00d9a7;
    --teal-dark: #009b7d;
    --teal-glow: rgba(0, 184, 148, 0.15);
    --green: #00c853;
    --red: #ff4444;
    --blue: #00b4d8;
    --orange: #ff8800;
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-elevated: #1a1a1a;
    --bg-input: #151515;
    --border: #222222;
    --border-light: #333333;
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-teal: 0 4px 24px rgba(0, 184, 148, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-light); }

/* ============================================
   Typography
   ============================================ */

h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.15; }
h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green { color: var(--green); }
.text-center { text-align: center; }

.gradient-text {
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Layout
   ============================================ */

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 600px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-sm { padding: 40px 0; }

/* ============================================
   Navbar
   ============================================ */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.navbar-brand .brand-icon { font-size: 24px; }

.navbar-brand .brand-logo {
    height: 44px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

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

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

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: #fff;
    box-shadow: var(--shadow-teal);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(0, 184, 148, 0.3); }

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }

.btn-outline {
    background: transparent;
    color: var(--teal);
    border: 1px solid var(--teal);
}
.btn-outline:hover:not(:disabled) { background: var(--teal-glow); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}
.btn-ghost:hover { color: var(--text); }

.btn-danger {
    background: rgba(255, 68, 68, 0.15);
    color: var(--red);
    border: 1px solid rgba(255, 68, 68, 0.3);
}
.btn-danger:hover:not(:disabled) { background: rgba(255, 68, 68, 0.25); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { width: 100%; }

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-elevated {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-teal {
    background: var(--bg-card);
    border: 2px solid var(--teal);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-teal);
}

/* ============================================
   Forms
   ============================================ */

.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-select { appearance: none; cursor: pointer; }

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-glow);
}

.form-input::placeholder { color: var(--text-muted); }

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

/* ============================================
   Tabs
   ============================================ */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }

.tab-content { display: none; padding: 24px; }
.tab-content.active { display: block; }

/* ============================================
   Stats
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--teal);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ============================================
   Schedule Grid (Working Hours)
   ============================================ */

.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.schedule-day {
    font-weight: 600;
    min-width: 80px;
}

.schedule-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    appearance: none;
    background: var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    flex-shrink: 0;
}

.schedule-toggle:checked { background: var(--teal); }

.schedule-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.schedule-toggle:checked::after { transform: translateX(20px); }

.schedule-times {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.schedule-times input[type="time"] {
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
}

.schedule-times input[type="time"]:focus {
    outline: none;
    border-color: var(--teal);
}

/* ============================================
   Appointments List
   ============================================ */

.appointment-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

.appointment-card:hover { border-color: var(--border-light); }

.appointment-time {
    text-align: center;
    min-width: 60px;
}

.appointment-time .time { font-size: 18px; font-weight: 700; color: var(--teal); }
.appointment-time .duration { font-size: 12px; color: var(--text-muted); }

.appointment-info { flex: 1; }
.appointment-info .client-name { font-weight: 600; }
.appointment-info .service-name { font-size: 13px; color: var(--text-secondary); }

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

/* ============================================
   Modal
   ============================================ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-backdrop.active { display: flex; }

.modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}
.modal-close:hover { color: var(--text); }

/* ============================================
   Badge / Tag
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-teal { background: var(--teal-glow); color: var(--teal); }
.badge-green { background: rgba(0, 200, 83, 0.15); color: var(--green); }
.badge-blue { background: rgba(0, 180, 216, 0.15); color: var(--blue); }
.badge-orange { background: rgba(255, 136, 0, 0.15); color: var(--orange); }
.badge-red { background: rgba(255, 68, 68, 0.15); color: var(--red); }

/* Status badges for appointments */
.badge-confirmed { background: rgba(0, 200, 83, 0.15); color: var(--green); }
.badge-pending { background: rgba(255, 136, 0, 0.15); color: var(--orange); }
.badge-canceled { background: rgba(255, 68, 68, 0.15); color: var(--red); }
.badge-completed { background: rgba(0, 180, 216, 0.15); color: var(--blue); }
.badge-noshow { background: rgba(255, 68, 68, 0.15); color: var(--red); }

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state-text { font-size: 14px; margin-bottom: 24px; }

/* ============================================
   Toast
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--teal); }

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

/* ============================================
   Loading
   ============================================ */

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

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

.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s;
}

.loading-overlay.hidden { opacity: 0; pointer-events: none; }

/* ============================================
   Phone Input
   ============================================ */

.phone-input-wrapper {
    position: relative;
}

.phone-input-wrapper .phone-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.phone-input-wrapper .form-input {
    padding-left: 48px;
}

/* ============================================
   Table
   ============================================ */

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; }
th { background: var(--bg-input); font-size: 12px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
td { border-top: 1px solid var(--border); font-size: 14px; }
tr:hover td { background: rgba(0, 184, 148, 0.03); }

/* ============================================
   Onboarding Wizard
   ============================================ */

.wizard {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.wizard-step { display: none; }
.wizard-step.active { display: block; }

.wizard-progress {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.wizard-progress .step-dot {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    transition: background 0.3s;
}

.wizard-progress .step-dot.active { background: var(--teal); }
.wizard-progress .step-dot.done { background: var(--green); }

.wizard-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.wizard-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ============================================
   Service List (for booking)
   ============================================ */

.service-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.service-option:hover { border-color: var(--border-light); }
.service-option.selected { border-color: var(--teal); background: var(--teal-glow); }

.service-option .service-details { flex: 1; }
.service-option .service-name { font-weight: 600; }
.service-option .service-meta { font-size: 13px; color: var(--text-secondary); }
.service-option .service-price { font-weight: 700; color: var(--teal); font-size: 18px; }

/* ============================================
   Time Slots (for booking)
   ============================================ */

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}

.slot {
    padding: 10px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.slot:hover { border-color: var(--teal); color: var(--teal); }
.slot.selected { background: var(--teal); color: #fff; border-color: var(--teal); }
.slot.unavailable { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; }

/* ============================================
   Calendar Date Picker
   ============================================ */

.date-picker {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.date-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    min-width: 70px;
    transition: all 0.2s;
}

.date-option:hover { border-color: var(--teal); }
.date-option.selected { background: var(--teal); color: #fff; border-color: var(--teal); }
.date-option .day-name { font-size: 11px; text-transform: uppercase; color: var(--text-muted); }
.date-option .day-number { font-size: 20px; font-weight: 700; }
.date-option .month { font-size: 11px; color: var(--text-muted); }
.date-option.selected .day-name,
.date-option.selected .month { color: rgba(255, 255, 255, 0.8); }

/* ============================================
   FAQ Accordion
   ============================================ */

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    background: none;
    border: none;
    color: var(--text);
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.faq-question .faq-icon {
    transition: transform 0.3s;
    font-size: 20px;
    color: var(--teal);
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding-bottom: 20px;
}

/* ============================================
   Landing Page Specific
   ============================================ */

.hero-section {
    padding: 120px 20px 80px;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    max-width: 700px;
    margin: 0 auto 24px;
}

.hero-section .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 32px;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
    counter-reset: step;
}

.step-card {
    text-align: center;
    counter-increment: step;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--teal-glow);
    color: var(--teal);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 2px solid var(--teal);
}

/* ============================================
   Pricing Cards
   ============================================ */

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

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
}

.pricing-card.featured {
    border-color: var(--teal);
    box-shadow: var(--shadow-teal);
}

.pricing-card .popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--teal);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-card .plan-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.pricing-card .plan-price { font-size: 36px; font-weight: 800; color: var(--teal); }
.pricing-card .plan-price span { font-size: 14px; font-weight: 400; color: var(--text-muted); }

.pricing-features {
    list-style: none;
    margin: 24px 0;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-features li::before {
    content: '\2713';
    color: var(--teal);
    font-weight: 700;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .section { padding: 50px 0; }
    .navbar { padding: 12px 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .modal { padding: 24px; }
    .tabs { padding: 0 16px; }
    .tab { padding: 10px 14px; font-size: 13px; }
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section { padding: 100px 16px 60px; }
    .schedule-row { flex-wrap: wrap; }
    .schedule-times { width: 100%; }
}

@media (max-width: 414px) {
    h1 { font-size: 1.75rem; }
    .container { padding: 0 16px; }
    .btn-lg { padding: 14px 24px; font-size: 15px; }
    .slots-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    body { background: #fff; color: #000; }
    .navbar, .toast-container, .no-print { display: none !important; }
}
