/* ─── MATI ADMIN v7.0 — BRAND COLORS ──────────── */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --mati-blue: #0722BC;
    --mati-blue-light: #2B4FDB;
    --mati-blue-dark: #041680;
    --mati-orange: #FF6E40;
    --mati-orange-light: #FF8E6A;
    --mati-teal: #00BFA5;
    --mati-teal-light: #33CFB8;
    --mati-bg: #F5F7FA;
    --mati-surface: #FFFFFF;
    --mati-text: #1E293B;
    --mati-text-dim: #64748B;
    --mati-border: #E2E8F0;
    --mati-radius: 1.25rem;
    --mati-shadow: 0 4px 24px rgba(48,79,254,0.06);
    --mati-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mati-wrap { max-width: 1400px; margin: 2rem auto; padding: 0 1.5rem; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--mati-text); }
.mati-wrap h1 { font-size: 2rem; font-weight: 900; margin: 0 0 1.5rem; letter-spacing: -0.02em; }
.mati-wrap h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 1rem; }
.mati-wrap h3 { font-size: 1rem; font-weight: 800; margin: 0 0 0.75rem; }
.mati-wrap p { color: var(--mati-text-dim); line-height: 1.6; }

/* ─── EXIT TRANSITION ───────────────────────────── */
.mati-exit { animation: matiExit 0.4s ease-in forwards; }
@keyframes matiExit { 0%{opacity:1;transform:scale(1);filter:blur(0)} 100%{opacity:0;transform:scale(0.96);filter:blur(4px)} }

/* ─── SETUP WIZARD ──────────────────────────────── */
.mati-setup { max-width: 720px; margin: 0 auto; padding: 1.5rem 0 4rem; animation: matiFadeInUp 0.8s ease-out; }
@keyframes matiFadeInUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
.mati-setup-container { position: relative; }
.mati-setup-hero { text-align: center; margin-bottom: 2rem; position: relative; }

/* ─── ORB ────────────────────────────────────────── */
.mati-orb { width: 100px; height: 100px; margin: 0 auto 1.5rem; position: relative; }
.mati-orb-core { width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, var(--mati-blue), #00BFA5); background-size: 200% 200%; display: flex; align-items: center; justify-content: center; animation: matiOrbFloat 4s ease-in-out infinite, matiOrbGlow 2.5s ease-in-out infinite, matiOrbGradient 6s ease-in-out infinite; box-shadow: 0 0 60px rgba(48,79,254,0.3); position: relative; z-index: 2; }
@keyframes matiOrbFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes matiOrbGlow { 0%,100%{box-shadow:0 0 60px rgba(48,79,254,0.3)} 50%{box-shadow:0 0 100px rgba(48,79,254,0.5)} }
@keyframes matiOrbGradient { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.mati-orb-ring { position: absolute; inset: -18px; border-radius: 50%; border: 2px solid rgba(48,79,254,0.15); animation: matiRingPulse 3.5s ease-in-out infinite; }
.mati-orb-ring:nth-child(2) { inset: -36px; animation-delay: 0.6s; opacity: 0.55; }
.mati-orb-ring:nth-child(3) { inset: -54px; animation-delay: 1.2s; opacity: 0.25; }
@keyframes matiRingPulse { 0%,100%{transform:scale(1);opacity:0.3} 50%{transform:scale(1.06);opacity:0.6} }
.mati-orb-icon { width: 44px; height: 44px; color: white; animation: matiOrbSpin 10s linear infinite; }
@keyframes matiOrbSpin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

.mati-hero-title { font-size: 2.2rem !important; font-weight: 900 !important; letter-spacing: -0.03em !important; line-height: 1.15 !important; margin-bottom: 0.5rem !important; }
.mati-hero-title span { background: linear-gradient(135deg, var(--mati-blue), #00BFA5); background-size: 200% 200%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: matiGradient 3.5s ease-in-out infinite; }
@keyframes matiGradient { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.mati-hero-sub { font-size: 1.05rem !important; opacity: 0.6; max-width: 480px; margin: 0 auto !important; }

/* ─── PARTICLES ──────────────────────────────────── */
.mati-particles { position: fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:0; overflow:hidden; }
.mati-particle { position:absolute; border-radius:50%; animation:matiParticleFall linear infinite; opacity:0; }
@keyframes matiParticleFall { 0%{transform:translateY(-120px) rotate(0deg) scale(0);opacity:0} 10%{transform:scale(1);opacity:1} 90%{opacity:0.8} 100%{transform:translateY(100vh) rotate(720deg) scale(0.3);opacity:0} }

/* ─── INFO BAR ───────────────────────────────────── */
.mati-info-bar { padding: 0.6rem 1.75rem; background: linear-gradient(135deg, #EFF6FF, #F0F9FF); border-bottom: 1px solid #BFDBFE; color: var(--mati-blue); font-size: 0.72rem; text-align: center; animation: matiFadeInUp 0.5s ease-out; }

/* ─── BACK BUTTON ────────────────────────────────── */
.mati-back-row { padding: 0 0 0.5rem 0; text-align: left; }
.mati-back-btn { background: none; border: 1px solid var(--mati-border); border-radius: 0.75rem; padding: 0.35rem 0.85rem; font-size: 0.75rem; font-weight: 700; color: var(--mati-text-dim); cursor: pointer; transition: all 0.3s ease; font-family: inherit; }
.mati-back-btn:hover { border-color: var(--mati-blue); color: var(--mati-blue); background: #EEF0FF; }

/* ─── AGENT CARD ─────────────────────────────────── */
.mati-agent-card { background: var(--mati-surface); border: 2px solid var(--mati-border); border-radius: 1.75rem; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,0.08); transition: all 0.4s ease; position: relative; z-index: 1; }
.mati-agent-card:hover { box-shadow: 0 12px 60px rgba(48,79,254,0.15); border-color: var(--mati-blue-light); }
.mati-agent-header { display: flex; align-items: center; gap: 0.85rem; padding: 1.25rem 1.75rem; background: linear-gradient(135deg, #041680, #0722BC, #00BFA5); background-size: 200% 200%; animation: matiHeaderGradient 5s ease-in-out infinite; color: white; position: relative; overflow: hidden; }
@keyframes matiHeaderGradient { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
.mati-agent-header::after { content:''; position:absolute; top:-50%; left:-50%; width:200%; height:200%; background:radial-gradient(circle at 70% 50%, rgba(255,255,255,0.1) 0%, transparent 60%); animation:matiHeaderShine 7s ease-in-out infinite; }
@keyframes matiHeaderShine { 0%,100%{transform:translateX(-30%)} 50%{transform:translateX(10%)} }
.mati-agent-avatar { width: 46px; height: 46px; background: rgba(255,255,255,0.18); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; z-index: 1; backdrop-filter: blur(4px); }
.mati-agent-pulse { animation: matiAvatarPulse 2s infinite; }
@keyframes matiAvatarPulse { 0%,100%{box-shadow:0 0 0 0 rgba(255,255,255,0.3)} 50%{box-shadow:0 0 0 18px rgba(255,255,255,0)} }
.mati-agent-header strong { font-size: 1rem; position: relative; z-index: 1; }
.mati-agent-status { display: block; font-size: 0.72rem; opacity: 0.8; margin-top: 2px; position: relative; z-index: 1; }
.mati-agent-body { padding: 1.5rem 1.75rem; min-height: 200px; max-height: 480px; overflow-y: auto; position: relative; }
.mati-typing { display: none; padding: 0.75rem 1rem; align-items: center; gap: 6px; margin-bottom: 1rem; }
.mati-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--mati-blue); animation: matiTypingBounce 1.4s ease-in-out infinite; }
.mati-typing span:nth-child(2) { animation-delay: 0.15s; }
.mati-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes matiTypingBounce { 0%,60%,100%{transform:translateY(0);opacity:0.4} 30%{transform:translateY(-8px);opacity:1} }

/* ─── MESSAGES ────────────────────────────────────── */
.mati-message { margin-bottom: 1rem; }
.mati-message-inner { padding: 1rem 1.25rem; border-radius: 1.25rem; font-size: 0.92rem; line-height: 1.65; opacity: 0; transform: translateY(12px); transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); max-width: 85%; }
.mati-message-visible .mati-message-inner { opacity: 1; transform: translateY(0); }
.mati-message-agent .mati-message-inner { background: linear-gradient(135deg, #F0F5FF, #F5F7FA); border: 1px solid #D0DEFF; color: var(--mati-text); border-bottom-left-radius: 4px; }
.mati-message-user .mati-message-inner { background: linear-gradient(135deg, var(--mati-blue), var(--mati-blue-light)); color: white; margin-left: auto; border-bottom-right-radius: 4px; }
.mati-message p { margin: 0 0 0.4rem; color: inherit; }
.mati-message p:last-child { margin-bottom: 0; }
.mati-inline-color { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; margin: 0 4px; border: 2px solid rgba(255,255,255,0.3); }

/* ─── AGENT FOOTER ────────────────────────────────── */
.mati-agent-footer { padding: 1rem 1.75rem 1.5rem; border-top: 1px solid var(--mati-border); background: rgba(245,247,250,0.5); position: relative; z-index: 1; min-height: 50px; transition: all 0.3s ease; }

/* ─── PILLS ───────────────────────────────────────── */
.mati-quick-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.mati-pill { padding: 0.65rem 1.3rem; border-radius: 2rem; border: 2px solid var(--mati-border); background: var(--mati-surface); color: var(--mati-text); font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); white-space: nowrap; font-family: inherit; opacity: 0; animation: matiPillIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes matiPillIn { from{opacity:0;transform:translateY(10px) scale(0.95)} to{opacity:1;transform:translateY(0) scale(1)} }
.mati-pill:hover { border-color: var(--mati-blue); background: var(--mati-blue); color: white; transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 24px rgba(48,79,254,0.3); }
.mati-pill.selected { border-color: var(--mati-blue); background: var(--mati-blue); color: white; opacity: 0.5; pointer-events: none; }

/* ─── CHAT INPUT ─────────────────────────────────── */
.mati-chat-input-wrap { display: flex; flex-direction: column; gap: 0.65rem; }
.mati-input-enter { animation: matiFooterIn 0.35s ease-out; }
@keyframes matiFooterIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.mati-chat-input-row { display: flex; gap: 0.5rem; }
.mati-chat-input { flex: 1; padding: 0.75rem 1.1rem; border: 2px solid var(--mati-border); border-radius: 1rem; font-size: 0.92rem; transition: all 0.3s ease; background: var(--mati-surface); color: var(--mati-text); font-family: inherit; }
.mati-chat-input:focus { outline: none; border-color: var(--mati-blue); box-shadow: 0 0 0 4px rgba(48,79,254,0.07); }
.mati-chat-input::placeholder { color: #94A3B8; }
.mati-send-btn { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--mati-blue), var(--mati-blue-light)); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; flex-shrink: 0; }
.mati-send-btn:hover { transform: scale(1.1); box-shadow: 0 4px 16px rgba(48,79,254,0.4); }
.mati-send-btn:disabled { opacity: 0.4; transform: scale(1); }
.mati-chat-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.mati-chat-pill { padding: 0.4rem 0.85rem; border-radius: 1.25rem; border: 1.5px solid var(--mati-border); background: var(--mati-surface); color: var(--mati-text-dim); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.25s ease; font-family: inherit; opacity: 0; animation: matiPillIn 0.4s ease-out forwards; }
.mati-chat-pill:hover { border-color: var(--mati-blue); color: var(--mati-blue); background: #F0F5FF; transform: translateY(-1px); }

/* ─── CHOICE CARDS ───────────────────────────────── */
.mati-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.mati-choice-card { padding: 0.9rem; border: 2px solid var(--mati-border); border-radius: 1rem; background: var(--mati-surface); cursor: pointer; transition: all 0.3s var(--mati-spring); text-align: left; display: flex; flex-direction: column; gap: 0.15rem; font-family: inherit; color: var(--mati-text); opacity: 0; animation: matiPillIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.mati-choice-card:hover { border-color: var(--mati-blue); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(48,79,254,0.12); background: #F0F5FF; }
.mati-choice-card.selected { border-color: var(--mati-blue); background: #F0F5FF; opacity: 0.55; pointer-events: none; }
.mati-choice-icon { font-size: 1.5rem; }
.mati-choice-label { font-weight: 800; font-size: 0.88rem; }
.mati-choice-desc { font-size: 0.72rem; color: var(--mati-text-dim); }

/* ─── COLOR PICKER ────────────────────────────────── */
.mati-color-section { display: flex; flex-direction: column; gap: 0.75rem; }
.mati-color-palette { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.mati-color-dot { width: 42px; height: 42px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; transition: all 0.3s var(--mati-spring); box-shadow: 0 2px 8px rgba(0,0,0,0.1); opacity: 0; animation: matiPillIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.mati-color-dot:hover { transform: scale(1.25); border-color: white; box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.mati-color-custom { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; background: #F5F7FA; border-radius: 1rem; border: 1px solid var(--mati-border); }
.mati-color-custom-preview { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; border: 2px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: background 0.3s ease; }
.mati-color-input { flex: 1; padding: 0.5rem 0.65rem; border: 1px solid var(--mati-border); border-radius: 0.65rem; font-size: 0.9rem; font-family: monospace; background: white; color: var(--mati-text); min-width: 80px; }
.mati-color-input:focus { outline: none; border-color: var(--mati-blue); box-shadow: 0 0 0 3px rgba(48,79,254,0.08); }

/* ─── TIME CARDS ──────────────────────────────────── */
.mati-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.mati-time-card { padding: 0.85rem; border: 2px solid var(--mati-border); border-radius: 1rem; background: var(--mati-surface); cursor: pointer; transition: all 0.3s var(--mati-spring); text-align: left; display: flex; flex-direction: column; gap: 0.2rem; font-family: inherit; color: var(--mati-text); opacity: 0; animation: matiPillIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.mati-time-card:hover { border-color: var(--mati-blue); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(48,79,254,0.12); background: #F0F5FF; }
.mati-time-card.selected { border-color: var(--mati-blue); background: #F0F5FF; opacity: 0.55; pointer-events: none; }
.mati-time-icon { font-size: 1.2rem; }
.mati-time-label { font-weight: 800; font-size: 0.9rem; }
.mati-time-desc { font-size: 0.72rem; color: var(--mati-text-dim); }

/* ─── DAYS PICKER ─────────────────────────────────── */
.mati-days-picker { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mati-day-chip { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--mati-border); background: var(--mati-surface); cursor: pointer; font-weight: 800; font-size: 0.8rem; transition: all 0.3s var(--mati-spring); color: var(--mati-text); font-family: inherit; display: flex; align-items: center; justify-content: center; opacity: 0; animation: matiPillIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.mati-day-chip:hover { border-color: var(--mati-blue); transform: translateY(-2px); }
.mati-day-chip.active { background: var(--mati-blue); color: white; border-color: var(--mati-blue); transform: scale(1.1); box-shadow: 0 4px 12px rgba(48,79,254,0.3); }

/* ─── CELEBRATION ─────────────────────────────────── */
.mati-celebration { text-align: center; padding: 0.5rem 0; }
.mati-celebration-orb { width: 80px; height: 80px; margin: 0 auto 1rem; position: relative; }
.mati-celebration-orb-core { width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #FF6E40, #FF8E6A, #FFB347); display: flex; align-items: center; justify-content: center; font-size: 2rem; animation: matiCelebratePop 0.7s var(--mati-spring); box-shadow: 0 0 40px rgba(255,110,64,0.3); position: relative; z-index: 2; }
@keyframes matiCelebratePop { 0%{transform:scale(0) rotate(-20deg)} 60%{transform:scale(1.2) rotate(5deg)} 100%{transform:scale(1) rotate(0deg)} }
.mati-celebration-orb-ring { position: absolute; inset: -12px; border-radius: 50%; border: 2px solid rgba(255,110,64,0.2); animation: matiRingPulse 2.5s ease-in-out infinite; }
.mati-celebration-orb-ring:nth-child(2) { inset: -24px; animation-delay: 0.4s; opacity: 0.5; }
.mati-celebration-orb-ring:nth-child(3) { inset: -36px; animation-delay: 0.8s; opacity: 0.25; }
.mati-celebration-title { font-size: 1.35rem; font-weight: 900; margin-bottom: 0.4rem; }
.mati-celebration-detail { color: var(--mati-text-dim); font-size: 0.85rem; margin-bottom: 1rem; }
.mati-celebration-stats { display: flex; justify-content: center; gap: 1.5rem; margin-top: 0.75rem; }
.mati-celebration-stat { text-align: center; }
.mati-celebration-stat-value { display: block; font-size: 1.5rem; font-weight: 900; color: var(--mati-blue); }
.mati-celebration-stat-label { display: block; font-size: 0.68rem; color: var(--mati-text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ─── SUMMARY ─────────────────────────────────────── */
.mati-summary { background: linear-gradient(135deg, #F0F5FF, #F5F7FA); border: 1px solid #D0DEFF; border-radius: 1.25rem; padding: 1.25rem; margin-top: 0.5rem; }
.mati-summary h3 { margin-bottom: 0.75rem; }
.mati-summary p { margin: 0.25rem 0; }
.mati-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.mati-summary-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; }
.mati-summary-icon { font-size: 1.1rem; }

/* ─── BUTTONS ─────────────────────────────────────── */
.mati-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.5rem; border-radius: 1rem; font-weight: 800; font-size: 0.88rem; text-decoration: none; cursor: pointer; transition: all 0.3s ease; border: none; font-family: inherit; }
.mati-btn-primary { background: linear-gradient(135deg, var(--mati-blue), var(--mati-blue-light)); color: white; box-shadow: 0 4px 16px rgba(48,79,254,0.2); }
.mati-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(48,79,254,0.35); }
.mati-btn-lg { padding: 0.9rem 2.2rem; font-size: 1rem; border-radius: 1.25rem; }
.mati-btn-glow { animation: matiBtnGlow 2s ease-in-out infinite; }
@keyframes matiBtnGlow { 0%,100%{box-shadow:0 4px 16px rgba(48,79,254,0.2)} 50%{box-shadow:0 8px 36px rgba(48,79,254,0.45),0 0 60px rgba(0,191,165,0.2)} }
.mati-btn-loading { opacity: 0.7; pointer-events: none; animation: matiBtnPulse 1.5s ease-in-out infinite; }
@keyframes matiBtnPulse { 0%,100%{opacity:1} 50%{opacity:0.65} }

/* ─── DASHBOARD ───────────────────────────────────── */
.mati-dashboard { margin: 2rem 0; animation: matiFadeInUp 0.6s ease-out; }
.mati-db-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; flex-wrap: wrap; gap: 1rem; }
.mati-db-header-left { display: flex; align-items: center; gap: 0.85rem; }
.mati-db-header-left h1 { margin: 0; }
.mati-db-badge { padding: 0.3rem 0.85rem; border-radius: 2rem; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.mati-db-badge-free { background: #E2E8F0; color: #475569; }
.mati-db-badge-starter { background: #DBEAFE; color: #1D4ED8; }
.mati-db-badge-professional { background: #FEF3C7; color: #B45309; }
.mati-db-badge-business { background: #DCFCE7; color: #166534; }
.mati-db-specialty { padding: 0.3rem 0.85rem; border-radius: 2rem; font-size: 0.7rem; font-weight: 800; background: linear-gradient(135deg, #EFF6FF, #DBEAFE); color: #1E40AF; border: 1px solid #BFDBFE; }
.mati-db-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; margin-bottom: 2.5rem; }
.mati-db-grid-align-start { align-items: start; }
/* 2-column layout for widget config */
.mati-db-grid-2col { grid-template-columns: 1.5fr 1fr; }
@media (max-width: 1200px) {
    .mati-db-grid-2col { grid-template-columns: 1.25fr 1fr; }
}
@media (max-width: 960px) {
    .mati-db-grid-2col { grid-template-columns: 1fr; }
}

/* ─── PAGE HEADER ────────────────────────────────── */
.mati-page-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:2rem; flex-wrap:wrap; gap:1rem; }
.mati-page-header h1 { font-size:2rem; font-weight:900; margin:0 0 0.35rem; letter-spacing:-0.02em; }
.mati-page-header p { color:var(--mati-text-dim); margin:0; max-width:600px; }

/* ─── PLAN BADGE ─────────────────────────────────── */
.mati-plan-badge { display:inline-block; padding:0.2rem 0.7rem; border-radius:2rem; font-size:0.6rem; font-weight:900; color:white; vertical-align:middle; margin-left:0.5rem; letter-spacing:0.05em; }

/* ─── STATS ROW ──────────────────────────────────── */
.mati-stats-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:0.85rem; margin-bottom:1.5rem; }
.mati-stat-card { background:var(--mati-surface); border:1px solid var(--mati-border); border-radius:1.25rem; padding:1.25rem; text-align:center; box-shadow:var(--mati-shadow); transition:all 0.3s ease; }
.mati-stat-card:hover { transform:translateY(-3px); box-shadow:0 12px 32px rgba(0,0,0,0.1); }
.mati-stat-icon { font-size:1.8rem; margin-bottom:0.35rem; }
.mati-stat-num { font-size:1.6rem; font-weight:900; color:var(--mati-blue); }
.mati-stat-label { font-size:0.72rem; font-weight:800; color:var(--mati-text-dim); text-transform:uppercase; letter-spacing:0.06em; }

/* ─── CARDS ───────────────────────────────────────── */
.mati-card { background: var(--mati-surface); border: 1px solid var(--mati-border); border-radius: 1.5rem; padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--mati-shadow); transition: all 0.3s ease; opacity: 0; animation: matiCardIn 0.5s ease-out forwards; }
@keyframes matiCardIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.mati-card:nth-child(1){animation-delay:0.05s}.mati-card:nth-child(2){animation-delay:0.1s}.mati-card:nth-child(3){animation-delay:0.15s}.mati-card:nth-child(4){animation-delay:0.2s}.mati-card:nth-child(5){animation-delay:0.25s}.mati-card:nth-child(6){animation-delay:0.3s}
.mati-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.08); transform: translateY(-2px); }
.mati-card-gradient { background: linear-gradient(135deg, #F0F5FF, #F5F7FA); border-color: #D0DEFF; }
.mati-card-icon { width: 48px; height: 48px; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; font-size: 1.5rem; }
.mati-icon-check{background:#DCFCE7;color:#16A34A}.mati-icon-globe{background:#DBEAFE;color:var(--mati-blue)}.mati-icon-sparkle{background:#FEF3C7;color:#D97706}.mati-icon-link{background:#FCE7F3;color:#DB2777}
.mati-card-label { display: block; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mati-text-dim); margin-bottom: 0.2rem; }
.mati-card-value { display: block; font-size: 1.1rem; font-weight: 800; margin-bottom: 0.2rem; }
.mati-card-desc { font-size: 0.82rem; margin: 0; }
.mati-card code { background: #F1F5F9; padding: 0.12rem 0.45rem; border-radius: 0.3rem; font-size: 0.82rem; font-weight: 600; }
.mati-section { margin-bottom: 2.5rem; }
.mati-quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.85rem; }
.mati-quick-card { background: var(--mati-surface); border: 1px solid var(--mati-border); border-radius: 1.25rem; padding: 1.5rem; text-decoration: none; color: var(--mati-text); font-weight: 800; font-size: 0.88rem; display: flex; align-items: center; gap: 0.85rem; transition: all 0.3s ease; box-shadow: var(--mati-shadow); }
.mati-quick-card:hover { border-color: var(--mati-blue); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(48,79,254,0.18); }
.mati-quick-icon { font-size: 1.8rem; }
.mati-iframe-card, .mati-iframe-wrap { background: var(--mati-surface); border: 1px solid var(--mati-border); border-radius: 1.5rem; overflow: hidden; box-shadow: var(--mati-shadow); }
.mati-status-bar { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: 1.25rem 1.5rem; background: var(--mati-surface); border: 1px solid var(--mati-border); border-radius: 1.25rem; margin-top: 1.5rem; }
.mati-status-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; }
.mati-status-dot { width: 8px; height: 8px; border-radius: 50%; }
.mati-status-dot-green { background: #16A34A; animation: matiAvatarPulse 2s infinite; }
.mati-status-item code { background: #F1F5F9; padding: 0.1rem 0.4rem; border-radius: 0.3rem; font-size: 0.8rem; }
.mati-code-block { background: #0F172A; color: #E2E8F0; padding: 1.5rem; border-radius: 1rem; font-size: 0.85rem; line-height: 1.7; overflow-x: auto; font-family: 'SF Mono', 'Fira Code', monospace; }

/* ─── DATA TABLE ────────────────────────────────── */
.mati-table { width:100%; border-collapse:collapse; font-size:0.85rem; }
.mati-table th { background:#F5F7FA; padding:0.75rem 1rem; text-align:left; font-weight:800; font-size:0.7rem; text-transform:uppercase; letter-spacing:.05em; color:var(--mati-text-dim); border-bottom:2px solid var(--mati-border); }
.mati-table td { padding:0.65rem 1rem; border-bottom:1px solid var(--mati-border); color:var(--mati-text); }
.mati-table tr:hover td { background:#F5F7FA; }
.mati-badge-status { display:inline-block; padding:0.2rem 0.65rem; border-radius:1rem; font-size:0.68rem; font-weight:800; }
.mati-status-confirmed { background:#DCFCE7; color:#16A34A; }
.mati-status-cancelled { background:#FEE2E2; color:#EF4444; }
.mati-status-pending { background:#FEF3C7; color:#D97706; }

/* ─── SERVICES EDITOR ────────────────────────────── */
.mati-services-editor { display: flex; flex-direction: column; gap: 0.5rem; max-height: 300px; overflow-y: auto; }
.mati-services-edit-list { display: flex; flex-direction: column; gap: 0.4rem; }
.mati-svc-row { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.5rem; background: white; border: 1px solid var(--mati-border); border-radius: 0.65rem; animation: matiFadeInUp 0.4s ease-out; }
.mati-svc-num { width: 24px; height: 24px; border-radius: 50%; background: var(--mati-blue); color: white; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 800; flex-shrink: 0; }
.mati-svc-name { flex: 1; padding: 0.4rem 0.5rem; border: 1px solid var(--mati-border); border-radius: 0.4rem; font-size: 0.8rem; font-family: inherit; min-width: 100px; }
.mati-svc-name:focus { outline: none; border-color: var(--mati-blue); }
.mati-svc-dur { padding: 0.4rem 0.3rem; border: 1px solid var(--mati-border); border-radius: 0.4rem; font-size: 0.8rem; font-family: inherit; text-align: center; }
.mati-svc-dur:focus { outline: none; border-color: var(--mati-blue); }
.mati-svc-unit { font-size: 0.7rem; color: var(--mati-text-dim); flex-shrink: 0; }
.mati-svc-remove { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #fecaca; background: #fef2f2; color: #ef4444; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.mati-svc-remove:hover { background: #ef4444; color: white; }
.mati-svc-add { width: 100%; padding: 0.45rem; border: 2px dashed var(--mati-border); border-radius: 0.65rem; background: transparent; color: var(--mati-blue); font-weight: 700; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.mati-svc-add:hover { border-color: var(--mati-blue); background: #F0F5FF; }

/* ─── SERVICES ADMIN ─────────────────────────────── */
.mati-services-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.mati-service-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; background: #F5F7FA; border: 1px solid var(--mati-border); border-radius: 0.75rem; flex-wrap: wrap; }
.mati-service-input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid var(--mati-border); border-radius: 0.5rem; font-size: 0.85rem; font-family: inherit; }
.mati-service-input:focus { outline: none; border-color: var(--mati-blue); }
.mati-service-duration { padding: 0.5rem 0.5rem; border: 1px solid var(--mati-border); border-radius: 0.5rem; font-size: 0.85rem; font-family: inherit; }
.mati-service-unit { font-size: 0.75rem; color: var(--mati-text-dim); }
.mati-service-remove { width: 28px; height: 28px; border-radius: 50%; border: 1px solid #fecaca; background: #fef2f2; color: #ef4444; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.mati-service-remove:hover { background: #ef4444; color: white; }
.mati-services-empty { text-align: center; padding: 2rem; color: var(--mati-text-dim); }

/* ─── PROVIDERS ──────────────────────────────────── */
.mati-providers-list { display:flex; flex-direction:column; gap:0.5rem; margin-bottom:1rem; }
.mati-provider-row { background:#F5F7FA; border:1px solid var(--mati-border); border-radius:0.85rem; padding:0.6rem 0.75rem; }
.mati-provider-fields { display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; }
.mati-provider-name, .mati-provider-email, .mati-provider-role { padding:0.5rem 0.65rem; border:1px solid var(--mati-border); border-radius:0.5rem; font-size:0.85rem; font-family:inherit; }
.mati-provider-name { flex:1; min-width:120px; }
.mati-provider-email { flex:1; min-width:150px; max-width:250px; }
.mati-provider-role { width:auto; min-width:80px; max-width:140px; }
.mati-provider-name:focus, .mati-provider-email:focus, .mati-provider-role:focus { outline:none; border-color:var(--mati-blue); }

/* ─── SCHEDULE ───────────────────────────────────── */
.mati-schedule-grid { display:flex; flex-direction:column; gap:0.5rem; }
.mati-schedule-day { display:flex; align-items:center; gap:1rem; padding:0.6rem 0.85rem; background:#F5F7FA; border:1px solid var(--mati-border); border-radius:0.75rem; flex-wrap:wrap; }
.mati-schedule-toggle { display:flex; align-items:center; gap:0.5rem; font-weight:700; font-size:0.9rem; cursor:pointer; min-width:60px; }
.mati-schedule-toggle input[type="checkbox"] { width:18px; height:18px; cursor:pointer; accent-color:var(--mati-blue); }
.mati-schedule-times { display:flex; align-items:center; gap:0.5rem; }
.mati-schedule-times input[type="time"] { padding:0.4rem 0.6rem; border:1px solid var(--mati-border); border-radius:0.5rem; font-size:0.85rem; font-family:inherit; }
.mati-schedule-times input[type="time"]:focus { outline:none; border-color:var(--mati-blue); }
.mati-schedule-times span { font-size:0.8rem; color:var(--mati-text-dim); }

/* ─── INFO DL ────────────────────────────────────── */
.mati-info-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; }
.mati-info-dl dt { font-weight: 700; color: var(--mati-text-dim); font-size: 0.8rem; }
.mati-info-dl dd { font-size: 0.85rem; margin: 0; }

/* ─── SERVICE LIST ──────────────────────────────── */
.mati-service-list { display: flex; flex-direction: column; gap: 0.35rem; }
.mati-service-item { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0.6rem; background: #F5F7FA; border-radius: 0.5rem; font-size: 0.82rem; }
.mati-service-name { font-weight: 700; }
.mati-service-meta { font-size: 0.72rem; color: var(--mati-text-dim); background: #E2E8F0; padding: 0.15rem 0.5rem; border-radius: 0.35rem; }

/* ─── BENEFITS ────────────────────────────────────── */
.mati-benefits { animation: matiFadeInUp 0.6s ease-out; }
.mati-benefits-hero { text-align: center; margin-bottom: 3rem; }
.mati-benefits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.mati-benefit-card { background: var(--mati-surface); border: 1px solid var(--mati-border); border-radius: 1.5rem; padding: 1.75rem; box-shadow: var(--mati-shadow); transition: all 0.3s ease; }
.mati-benefit-card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,0.1); }
.mati-benefit-icon { font-size: 2.2rem; display: block; margin-bottom: 0.85rem; }
.mati-benefit-card h3 { margin-bottom: 0.5rem; }
.mati-badge { display: inline-block; padding: 0.25rem 0.85rem; border-radius: 1rem; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.5rem; }
.mati-benefit-premium { border-left: 4px solid var(--mati-blue); }
.mati-benefit-premium .mati-badge { background: var(--mati-blue); color: white; }
.mati-benefit-free { border-left: 4px solid #94A3B8; }
.mati-benefit-free .mati-badge { background: #E2E8F0; color: #475569; }
.mati-settings-form .form-table th { width: auto; min-width: 160px; padding: 1rem 0; }
.mati-settings-form input[type="text"], .mati-settings-form select { width: 100%; max-width: 400px; min-width: auto; padding: 0.6rem 0.85rem; border: 2px solid var(--mati-border); border-radius: 0.75rem; font-size: 0.9rem; transition: all 0.3s; background: var(--mati-surface); color: var(--mati-text); }
.mati-settings-form input[type="text"]:focus, .mati-settings-form select:focus { outline: none; border-color: var(--mati-blue); box-shadow: 0 0 0 4px rgba(48,79,254,0.08); }

/* ─── NOTIFICATIONS ──────────────────────────────── */
#mati-notifications-app .form-table th { width:220px; padding:1rem 0; }
#mati-notifications-app select { min-width:280px; padding:0.5rem 0.75rem; border:2px solid var(--mati-border); border-radius:0.75rem; font-size:0.9rem; }

/* ─── WIDGET CONFIG: TEMPLATE CARDS ───────────────── */
.mati-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.75rem; }
.mati-template-card { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1rem 0.5rem; border: 2px solid var(--mati-border); border-radius: 1rem; background: var(--mati-surface); cursor: pointer; transition: all 0.3s var(--mati-spring); font-family: inherit; color: var(--mati-text); }
.mati-template-card:hover { border-color: var(--mati-blue); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(48,79,254,0.12); }
.mati-template-card.active { border-color: var(--mati-blue); background: #F0F5FF; box-shadow: 0 4px 16px rgba(48,79,254,0.15); }
.mati-template-swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.mati-template-name { font-size: 0.78rem; font-weight: 700; }

/* ─── WIDGET CONFIG: PANEL TOGGLES ────────────────── */
.mati-panel-toggles { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.mati-toggle-switch { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.9rem; }
.mati-toggle-switch input { display: none; }
.mati-toggle-slider { width: 44px; height: 24px; background: #cbd5e1; border-radius: 24px; position: relative; transition: background 0.3s ease; flex-shrink: 0; }
.mati-toggle-slider::after { content: ''; position: absolute; width: 18px; height: 18px; background: white; border-radius: 50%; top: 3px; left: 3px; transition: transform 0.3s var(--mati-spring); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.mati-toggle-switch input:checked + .mati-toggle-slider { background: var(--mati-blue); }
.mati-toggle-switch input:checked + .mati-toggle-slider::after { transform: translateX(20px); }
.mati-toggle-label { font-weight: 600; }

/* ─── WIDGET CONFIG: COLOR PICKER ─────────────────── */
.mati-color-wrap { display: flex; align-items: center; gap: 0.75rem; }
.mati-color-wrap input[type="color"] { width: 48px; height: 48px; border: 2px solid var(--mati-border); border-radius: 50%; padding: 2px; background: white; cursor: pointer; transition: transform 0.2s ease; }
.mati-color-wrap input[type="color"]:hover { transform: scale(1.1); }
.mati-color-input-inline { flex: 1; padding: 0.5rem 0.75rem; border: 2px solid var(--mati-border); border-radius: 0.75rem; font-family: monospace; font-size: 0.9rem; max-width: 140px; }
.mati-color-input-inline:focus { outline: none; border-color: var(--mati-blue); box-shadow: 0 0 0 4px rgba(48,79,254,0.08); }

/* ─── WIDGET CONFIG: PREVIEW ──────────────────────── */
.mati-preview-col { position: sticky; top: 2rem; }
.mati-preview-tabs { display: flex; gap: 0.25rem; margin-bottom: 0.75rem; background: #f1f5f9; border-radius: 0.75rem; padding: 0.25rem; flex-wrap: wrap; }
.mati-preview-tab { flex: 1; padding: 0.55rem 0.25rem; border: none; border-radius: 0.6rem; background: transparent; font-size: 0.8rem; font-weight: 700; color: #64748b; cursor: pointer; transition: all 0.2s ease; font-family: inherit; }
.mati-preview-tab:hover { color: var(--mati-text); }
.mati-preview-tab.active { background: white; color: var(--mati-blue); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.mati-preview-frame-wrap { border-radius: 1rem; overflow: hidden; border: 1px solid var(--mati-border); max-width: 100%; }
.mati-wrap iframe, .mati-dashboard iframe, #mati-dashboard-widget iframe { max-width: 100%; }

/* ─── WIDGET CONFIG: SHORTCODES ───────────────────── */
.mati-shortcode-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mati-shortcode-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; background: #f8fafc; border-radius: 0.75rem; border: 1px solid var(--mati-border); flex-wrap: wrap; }
.mati-shortcode-code { background: #0F172A; color: #E2E8F0; padding: 0.35rem 0.65rem; border-radius: 0.4rem; font-size: 0.78rem; font-family: 'SF Mono', monospace; white-space: nowrap; }
.mati-shortcode-desc { flex: 1; font-size: 0.82rem; color: var(--mati-text-dim); }
.mati-shortcode-copy { padding: 0.35rem 0.65rem; border: 1px solid var(--mati-border); border-radius: 0.5rem; background: white; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; }
.mati-shortcode-copy:hover { background: var(--mati-blue); color: white; border-color: var(--mati-blue); }

/* ─── WIDGET CONFIG: EMBED ────────────────────────── */
.mati-embed-wrap { position: relative; }

@media (max-width: 960px) {
    .mati-provider-fields { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .mati-provider-name, .mati-provider-email, .mati-provider-role { width: 100%; max-width: none; }
    .mati-settings-form .form-table tr { display: flex; flex-direction: column; }
    .mati-settings-form .form-table th { width: 100%; padding-bottom: 0.25rem; }
    .mati-settings-form .form-table td { padding-top: 0; }
    .mati-schedule-day { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .mati-shortcode-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .mati-preview-tabs { justify-content: center; }
    .mati-preview-tab { font-size: 0.75rem; padding: 0.45rem 0.2rem; }
}
@media (max-width: 768px) {
    .mati-setup { padding: 1rem 0 2rem; }
    .mati-hero-title { font-size: clamp(1.4rem, 5vw, 1.6rem) !important; }
    .mati-orb { width: 80px; height: 80px; }
    .mati-agent-body { padding: 1rem; max-height: 380px; }
    .mati-choice-grid { grid-template-columns: 1fr; }
    .mati-time-grid { grid-template-columns: 1fr; }
    .mati-message-inner { max-width: 92%; }
    .mati-summary-grid { grid-template-columns: 1fr; }
    .mati-db-grid { grid-template-columns: 1fr; }
    .mati-celebration-stats { gap: 1rem; }
    .mati-quick-actions { gap: 0.4rem; }
    .mati-pill { padding: 0.55rem 1rem; font-size: 0.8rem; }
    .mati-page-header { flex-direction: column; }
    .mati-stats-row { grid-template-columns: 1fr 1fr; }
    .mati-preview-col { position: static; }
    .mati-template-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ─── RESPONSIVE UTILITIES & FIXES v6.2 ───────────── */
html { -webkit-text-size-adjust: 100%; }

/* Layout utilities */
.mati-w-full { width: 100%; }
.mati-h-500 { height: 500px; }
.mati-border-0 { border: 0; }
.mati-rounded-1 { border-radius: 1rem; }
.mati-bg-slate-50 { background: #f8fafc; }
.mati-overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mati-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Typography utilities */
.mati-text-center { text-align: center; }
.mati-text-dim { color: var(--mati-text-dim); }
.mati-text-muted { color: #94a3b8; }
.mati-text-sm { font-size: 0.85rem; }
.mati-text-xs { font-size: 0.78rem; }
.mati-text-base { font-size: 0.95rem; }
.mati-text-3xl { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 1rem; display: block; line-height: 1; }
.mati-font-mono { font-family: monospace; }
.mati-break-all { word-break: break-all; }

/* Spacing utilities */
.mati-p-0 { padding: 0; }
.mati-p-1 { padding: 1rem; }
.mati-p-2 { padding: 2rem; }
.mati-p-xl { padding: 4rem 2rem; }
.mati-p-lg { padding: 3rem 2rem; }
.mati-m-0 { margin: 0; }
.mati-mb-35 { margin-bottom: 0.35rem; }
.mati-mb-50 { margin-bottom: 0.5rem; }
.mati-mb-1 { margin-bottom: 1rem; }
.mati-mb-1-5 { margin-bottom: 1.5rem; }
.mati-mb-2 { margin-bottom: 2rem; }
.mati-mt-1 { margin-top: 1rem; }
.mati-mt-2 { margin-top: 2rem; }
.mati-mt-50 { margin-top: 0.5rem; }
.mati-mt-75 { margin-top: 0.75rem; }
.mati-ml-50 { margin-left: 0.5rem; }
.mati-ml-1 { margin-left: 1rem; }
.mati-my-2 { margin-top: 2rem; margin-bottom: 2rem; }
.mati-my-3 { margin-top: 3rem; margin-bottom: 3rem; }
.mati-mx-auto { margin-left: auto; margin-right: auto; }
.mati-mw-500 { max-width: 500px; }
.mati-mw-420 { max-width: 420px; }

/* Flex utilities */
.mati-flex { display: flex; }
.mati-flex-between { justify-content: space-between; }
.mati-flex-start { align-items: flex-start; }
.mati-flex-1 { flex: 1; }
.mati-gap-1 { gap: 1rem; }
.mati-gap-75 { gap: 0.75rem; }
.mati-gap-50 { gap: 0.5rem; }

/* Component: label */
.mati-label { display: block; font-weight: 800; margin-bottom: 0.5rem; font-size: 0.9rem; }

/* Component: service duration */
.mati-service-duration { width: 75px; }

/* Component: notices */
.mati-notice { border-left: 4px solid #1A5D4A; padding: 1rem; }
.mati-notice-info { background: #f0fdf4; }

/* Component: dashboard widget */
.mati-db-widget-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.mati-db-widget-stat { text-align: center; padding: 1rem; border-radius: 0.75rem; }
.mati-db-widget-stat-green { background: #f0fdf4; }
.mati-db-widget-stat-blue { background: #eff6ff; }
.mati-db-widget-stat-amber { background: #fef3c7; }
.mati-db-widget-stat-num { font-size: clamp(1.2rem, 4vw, 1.5rem); font-weight: 900; }
.mati-db-widget-stat-label { font-size: 0.7rem; font-weight: 700; color: #64748b; }
.mati-db-widget-preview { margin-bottom: 1rem; padding: 0.75rem; background: #f8fafc; border-radius: 0.75rem; border: 1px solid #e2e8f0; }
.mati-db-widget-preview-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.mati-db-widget-preview-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.mati-db-widget-preview-label { font-size: 0.75rem; font-weight: 700; color: #475569; }
.mati-db-widget-footer { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mati-db-widget-footer a { font-size: 0.8rem; color: #1A5D4A; font-weight: 700; text-decoration: none; }
.mati-db-widget-sep { color: #e2e8f0; }

/* Component: copilot */
.mati-copilot-btn { width: 52px; height: 52px; border-radius: 50%; border: none; background: linear-gradient(135deg,#1A5D4A,#0D9488,#2D8A6E); background-size: 200% 200%; color: white; cursor: pointer; box-shadow: 0 4px 24px rgba(26,93,74,0.35); display: flex; align-items: center; justify-content: center; transition: all .3s; position: relative; animation: matiOrbGlow 2.5s ease-in-out infinite; }
.mati-copilot-btn:hover { transform: scale(1.1); box-shadow: 0 8px 32px rgba(26,93,74,0.5); }
.mati-copilot-panel { display: none; position: absolute; bottom: 62px; right: 0; width: 370px; max-width: calc(100vw - 2rem); max-height: 500px; background: white; border-radius: 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; border: 2px solid #e2e8f0; }
.mati-copilot-header { background: linear-gradient(135deg,#0D3B2E,#1A5D4A,#0D9488); background-size: 200% 200%; animation: matiGradient 5s ease-in-out infinite; padding: 0.85rem 1.1rem; color: white; display: flex; align-items: center; gap: 0.65rem; }
.mati-copilot-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; animation: matiPulse 2s infinite; backdrop-filter: blur(4px); }
.mati-copilot-title { flex: 1; }
.mati-copilot-title strong { font-size: 0.9rem; }
.mati-copilot-title span { display: block; font-size: 0.65rem; opacity: .8; }
.mati-copilot-close { background: none; border: none; color: white; cursor: pointer; font-size: 1.1rem; opacity: .6; padding: 0; transition: opacity .2s; }
.mati-copilot-close:hover { opacity: 1; }
.mati-copilot-messages { padding: 1rem 1.1rem; height: 260px; overflow-y: auto; font-size: 0.82rem; line-height: 1.65; }
.mati-copilot-footer { padding: .65rem 1.1rem; border-top: 1px solid #e2e8f0; display: flex; flex-wrap: wrap; gap: .35rem; }
.mati-copilot-pill { padding: .35rem .7rem; border-radius: 1rem; border: 1px solid #e2e8f0; font-size: .7rem; font-weight: 700; text-decoration: none; color: #1e293b; background: white; transition: all .2s; display: inline-flex; align-items: center; }
.mati-copilot-pill:hover { border-color: #1A5D4A; background: #f0fdf4; }
.mati-copilot-empty { text-align: center; padding: 1.5rem 1rem; }
.mati-copilot-empty-orb { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg,#1A5D4A,#0D9488); margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(26,93,74,.3); }
.mati-copilot-empty-title { font-weight: 800; margin-bottom: .3rem; }
.mati-copilot-empty-text { color: #64748b; font-size: .75rem; margin-bottom: 1rem; }
.mati-copilot-empty-btn { display: inline-block; padding: .55rem 1.2rem; background: #1A5D4A; color: white; border-radius: .75rem; text-decoration: none; font-weight: 700; font-size: .8rem; }
.mati-copilot-empty-btn:hover { background: #0D3B2E; }
.mati-copilot-msg { margin-bottom: .65rem; }
.mati-copilot-msg span { background: #f0fdf4; border: 1px solid #dcfce7; padding: .55rem .8rem; border-radius: .85rem; display: inline-block; max-width: 85%; }

/* Component: integration cards */
.mati-integ-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.mati-integ-title { margin: 0 0 0.35rem; }
.mati-integ-desc { font-size: 0.85rem; color: var(--mati-text-dim); margin: 0; }
.mati-integ-actions { margin-top: 1rem; }
.mati-integ-btn { font-size: 0.8rem; }

/* Form table fixes */
.mati-settings-form .form-table { width: 100%; }
.mati-settings-form .form-table th,
.mati-settings-form .form-table td { padding: 0.75rem 0; vertical-align: top; }
.mati-settings-form .form-table th { width: auto; min-width: 140px; max-width: 200px; }
.mati-settings-form textarea.regular-text,
.mati-settings-form input.regular-text,
.mati-settings-form select { width: 100%; max-width: 100%; }
.mati-wrap input,
.mati-wrap select,
.mati-wrap textarea { max-width: 100%; }

/* Iframe global safety */
.mati-wrap iframe,
.mati-dashboard iframe,
.mati-preview-frame-wrap iframe,
.mati-db-widget-preview iframe,
#mati-dashboard-widget iframe { max-width: 100%; width: 100%; }

/* Responsive clamp for hero title */
.mati-hero-title { font-size: clamp(1.5rem, 4vw, 2.2rem) !important; }

/* ─── MEDIA QUERIES ENHANCED ──────────────────────── */
@media (max-width: 960px) {
    .mati-provider-fields { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .mati-provider-name, .mati-provider-email, .mati-provider-role { width: 100%; max-width: none; }
    .mati-settings-form .form-table tr { display: flex; flex-direction: column; }
    .mati-settings-form .form-table th { width: 100%; padding-bottom: 0.25rem; }
    .mati-settings-form .form-table td { padding-top: 0; }
    .mati-schedule-day { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .mati-shortcode-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .mati-preview-tabs { justify-content: center; }
    .mati-preview-tab { font-size: 0.75rem; padding: 0.45rem 0.2rem; }
    .mati-copilot-panel { right: -20px; }
}

@media (max-width: 768px) {
    .mati-setup { padding: 1rem 0 2rem; }
    .mati-hero-title { font-size: clamp(1.4rem, 5vw, 1.6rem) !important; }
    .mati-orb { width: 80px; height: 80px; }
    .mati-agent-body { padding: 1rem; max-height: 380px; }
    .mati-choice-grid { grid-template-columns: 1fr; }
    .mati-time-grid { grid-template-columns: 1fr; }
    .mati-message-inner { max-width: 92%; }
    .mati-summary-grid { grid-template-columns: 1fr; }
    .mati-db-grid { grid-template-columns: 1fr; }
    .mati-celebration-stats { gap: 1rem; }
    .mati-quick-actions { gap: 0.4rem; }
    .mati-pill { padding: 0.55rem 1rem; font-size: 0.8rem; }
    .mati-page-header { flex-direction: column; }
    .mati-stats-row { grid-template-columns: 1fr 1fr; }
    .mati-preview-col { position: static; }
    .mati-template-grid { grid-template-columns: repeat(2, 1fr); }
    .mati-copilot-panel { width: calc(100vw - 2rem); right: -10px; bottom: 70px; }
    .mati-copilot-btn { width: 48px; height: 48px; }
    .mati-db-widget-stat-num { font-size: 1.3rem; }
    .mati-p-xl { padding: 2rem 1rem; }
    .mati-p-lg { padding: 2rem 1rem; }
}

@media (max-width: 480px) {
    .mati-wrap { padding: 0 0.5rem; margin: 1rem 0; }
    .mati-wrap h1 { font-size: clamp(1.3rem, 5vw, 1.6rem); }
    .mati-wrap h2 { font-size: 1.1rem; }
    .mati-card { padding: 1rem; border-radius: 1rem; }
    .mati-stats-row { grid-template-columns: 1fr; }
    .mati-stat-card { padding: 1rem; }
    .mati-stat-num { font-size: 1.3rem; }
    .mati-quick-links { grid-template-columns: repeat(2, 1fr); }
    .mati-quick-card { padding: 1rem; font-size: 0.8rem; }
    .mati-table { font-size: 0.78rem; }
    .mati-table th, .mati-table td { padding: 0.5rem 0.65rem; }
    .mati-template-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .mati-template-card { padding: 0.75rem 0.35rem; }
    .mati-template-swatch { width: 30px; height: 30px; }
    .mati-template-name { font-size: 0.7rem; }
    .mati-preview-tab { flex: 1 1 auto; font-size: 0.7rem; padding: 0.4rem 0.15rem; }
    .mati-preview-frame-wrap { border-radius: 0.75rem; }
    .mati-h-500 { height: 350px; }
    .mati-db-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .mati-benefits-grid { grid-template-columns: 1fr; }
    .mati-service-row { gap: 0.35rem; padding: 0.5rem; }
    .mati-provider-fields { gap: 0.4rem; }
    .mati-provider-row { padding: 0.5rem; }
    .mati-schedule-day { gap: 0.4rem; padding: 0.5rem; }
    .mati-code-block { padding: 1rem; font-size: 0.72rem; }
    .mati-shortcode-row { padding: 0.5rem; }
    .mati-color-wrap { flex-wrap: wrap; }
    .mati-color-wrap input[type="color"] { width: 40px; height: 40px; }
    .mati-settings-form .form-table th { min-width: auto; width: 100%; }
    .mati-settings-form input[type="text"],
    .mati-settings-form select,
    .mati-settings-form textarea { width: 100%; min-width: auto; }
    .mati-btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
    .mati-embed-wrap pre { font-size: 0.65rem; }
    .mati-integ-header { flex-direction: column; gap: 0.5rem; }
    .mati-notice { padding: 0.75rem; }
    .mati-copilot-panel { width: calc(100vw - 1rem); right: -5px; border-radius: 1rem; }
    .mati-copilot-messages { height: 220px; padding: 0.75rem; }
    .mati-copilot-pill { font-size: 0.65rem; padding: 0.3rem 0.55rem; }
    .mati-db-widget-stats { grid-template-columns: 1fr; }
    .mati-db-widget-preview { padding: 0.5rem; }
    .mati-db-widget-footer a { font-size: 0.75rem; }
    .mati-p-xl { padding: 1.5rem 0.75rem; }
    .mati-p-lg { padding: 1.5rem 0.75rem; }
    .mati-text-3xl { font-size: clamp(1.5rem, 8vw, 2rem); }
    .mati-hero-title { font-size: clamp(1.3rem, 6vw, 1.5rem) !important; }
}


/* ─── ALERTS ─────────────────────────────────────── */
.mati-alert { padding: 1rem 1.25rem; border-radius: var(--mati-radius); font-size: 0.9rem; line-height: 1.6; }
.mati-alert-danger { background: #FEF2F2; border: 2px solid #FECACA; color: #991B1B; }
.mati-alert-danger strong { color: #7F1D1D; }

/* ─── PAGE HEADER ACTIONS ────────────────────────── */
.mati-page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.mati-page-header-actions { display: flex; gap: 0.5rem; }

/* ─── BUTTON VARIANTS ────────────────────────────── */
.mati-btn-outline { background: transparent; border: 2px solid var(--mati-border); color: var(--mati-text-dim); }
.mati-btn-outline:hover { border-color: #EF4444; color: #EF4444; background: #FEF2F2; }
.mati-btn-danger { background: linear-gradient(135deg, #EF4444, #DC2626); color: white; }
.mati-btn-danger:hover { background: linear-gradient(135deg, #DC2626, #B91C1C); }
.mati-btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

/* ─── DISCONNECT MODAL ───────────────────────────── */
.mati-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100000; align-items: center; justify-content: center; }
.mati-modal-overlay.mati-active { display: flex; }
.mati-modal { background: white; border-radius: 1.5rem; padding: 2rem; max-width: 420px; width: 90%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.mati-modal-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.mati-modal h3 { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 900; }
.mati-modal p { color: var(--mati-text-dim); margin-bottom: 1.5rem; font-size: 0.9rem; }
.mati-modal-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* ─── KPI CARDS v2 ──────────────────────────────── */
.mati-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.mati-kpi-card { background: var(--mati-surface); border-radius: 1rem; padding: 1.25rem; border: 1px solid var(--mati-border); transition: all .15s; position: relative; overflow: hidden; }
.mati-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.mati-kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.mati-kpi-card.kpi-blue::before { background: var(--mati-blue); }
.mati-kpi-card.kpi-teal::before { background: var(--mati-teal); }
.mati-kpi-card.kpi-orange::before { background: var(--mati-orange); }
.mati-kpi-card.kpi-green::before { background: #16a34a; }
.mati-kpi-card.kpi-purple::before { background: #7c3aed; }
.mati-kpi-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.mati-kpi-icon { font-size: 1.5rem; }
.mati-kpi-trend { font-size: .7rem; padding: .15rem .5rem; border-radius: 1rem; font-weight: 600; }
.mati-kpi-trend.up { background: #dcfce7; color: #166534; }
.mati-kpi-trend.down { background: #fef2f2; color: #991b1b; }
.mati-kpi-value { font-size: 1.75rem; font-weight: 700; color: var(--mati-text); line-height: 1.2; }
.mati-kpi-label { font-size: .8rem; color: var(--mati-text-dim); margin-top: .25rem; }
.mati-kpi-sub { font-size: .72rem; color: var(--mati-text-dim); margin-top: .35rem; }

/* ─── CHARTS ──────────────────────────────────────── */
.mati-db-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 768px) { .mati-db-charts { grid-template-columns: 1fr; } }
.mati-chart-bar { display: flex; align-items: flex-end; gap: .2rem; height: 120px; padding-top: .5rem; }
.mati-chart-bar-col { flex: 1; background: var(--mati-blue); border-radius: .2rem .2rem 0 0; min-height: 3px; transition: height .3s; }
.mati-chart-bar-col:hover { opacity: .8; }
.mati-chart-bar-label { font-size: .6rem; color: var(--mati-text-dim); text-align: center; margin-top: .25rem; }

/* ─── RECENT LIST ─────────────────────────────────── */
.mati-recent-list { margin: 0; padding: 0; list-style: none; }
.mati-recent-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--mati-border); }
.mati-recent-item:last-child { border-bottom: none; }
.mati-recent-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--mati-bg); display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 600; flex-shrink: 0; }
.mati-recent-info { flex: 1; min-width: 0; }
.mati-recent-name { font-weight: 600; font-size: .85rem; }
.mati-recent-detail { font-size: .75rem; color: var(--mati-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mati-recent-time { font-size: .8rem; color: var(--mati-text-dim); text-align: right; white-space: nowrap; }

/* ─── SERVICE CARDS ───────────────────────────────── */
.mati-services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.mati-svc-card { background: var(--mati-surface); border-radius: 1rem; border: 1px solid var(--mati-border); overflow: hidden; transition: all .15s; }
.mati-svc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.mati-svc-card-header { padding: .85rem 1.25rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--mati-border); cursor: pointer; }
.mati-svc-card-name { font-weight: 700; font-size: .95rem; }
.mati-svc-card-body { padding: 1rem 1.25rem; }
.mati-svc-card-body.collapsed { display: none; }
.mati-svc-card-body label { display: block; font-size: .72rem; font-weight: 600; color: var(--mati-text-dim); margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .03em; }
.mati-svc-card-body input, .mati-svc-card-body select, .mati-svc-card-body textarea { width: 100%; padding: .4rem .6rem; border: 1px solid var(--mati-border); border-radius: .5rem; font-size: .85rem; margin-bottom: .65rem; font-family: inherit; }
.mati-svc-card-body input:focus, .mati-svc-card-body select:focus, .mati-svc-card-body textarea:focus { border-color: var(--mati-blue); outline: none; box-shadow: 0 0 0 3px rgba(48,79,254,.1); }
.mati-svc-card-body textarea { resize: vertical; min-height: 50px; }
.mati-svc-card-footer { padding: .5rem 1.25rem; display: flex; gap: .5rem; align-items: center; border-top: 1px solid var(--mati-border); font-size: .8rem; }
.mati-svc-card-price { font-weight: 700; font-size: .95rem; color: var(--mati-teal); }
.mati-svc-badge { font-size: .7rem; padding: .15rem .55rem; border-radius: 1rem; font-weight: 600; background: #e0e7ff; color: #3730a3; }
.mati-svc-card-actions { display: flex; gap: .5rem; margin-top: .75rem; }

/* ─── PROVIDER CARDS ──────────────────────────────── */
.mati-providers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.mati-prov-card { background: var(--mati-surface); border-radius: 1rem; border: 1px solid var(--mati-border); overflow: hidden; cursor: pointer; }
.mati-prov-card-top { display: flex; align-items: center; gap: .75rem; padding: 1.25rem; }
.mati-prov-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--mati-blue), var(--mati-teal)); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; flex-shrink: 0; }
.mati-prov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: 0 1.25rem 1rem; }
.mati-prov-stat { text-align: center; padding: .5rem; background: var(--mati-bg); border-radius: .5rem; }
.mati-prov-stat-val { font-weight: 700; font-size: 1.1rem; }
.mati-prov-stat-lbl { font-size: .7rem; color: var(--mati-text-dim); }
.mati-prov-body { padding: 0 1.25rem 1.25rem; display: none; }
.mati-prov-card.expanded .mati-prov-body { display: block; }
.mati-prov-body label { display: block; font-size: .72rem; font-weight: 600; color: var(--mati-text-dim); margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .03em; }
.mati-prov-body input, .mati-prov-body select, .mati-prov-body textarea { width: 100%; padding: .4rem .6rem; border: 1px solid var(--mati-border); border-radius: .5rem; font-size: .85rem; margin-bottom: .65rem; font-family: inherit; }
.mati-prov-body input:focus, .mati-prov-body textarea:focus { border-color: var(--mati-blue); outline: none; box-shadow: 0 0 0 3px rgba(48,79,254,.1); }
.mati-prov-body textarea { resize: vertical; min-height: 40px; }

/* ─── CALENDAR v6.3 ───────────────────────────────── */
.mati-cal-wrapper { display: flex; flex-direction: column; gap: 1rem; }
.mati-cal-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .75rem 1.1rem; background: var(--mati-surface); border-radius: 1rem; box-shadow: var(--mati-shadow); }
.mati-cal-stats { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--mati-text); font-size: .9rem; }
.mati-cal-stats-icon { font-size: 1.15rem; }
.mati-cal-legend { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mati-legend-item { display: flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--mati-text-dim); }
.mati-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.mati-legend-dot.legend-confirmed { background: var(--mati-teal); }
.mati-legend-dot.legend-pending { background: var(--mati-orange); }
.mati-legend-dot.legend-cancelled { background: #EF4444; }
.mati-cal-filter { display: flex; align-items: center; gap: .4rem; }
.mati-cal-filter select { padding: .35rem .6rem; border: 1px solid var(--mati-border); border-radius: .5rem; font-size: .78rem; background: var(--mati-bg); color: var(--mati-text); }
.mati-cal-navbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.mati-cal-nav-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mati-surface); border: 1px solid var(--mati-border); color: var(--mati-text); font-size: 1.2rem; text-decoration: none; cursor: pointer; transition: all .18s ease; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.mati-cal-nav-btn:hover { background: var(--mati-blue); color: #fff; border-color: var(--mati-blue); transform: scale(1.06); box-shadow: 0 4px 14px rgba(7,34,188,.22); }
.mati-cal-nav-center { display: flex; align-items: center; gap: .75rem; }
.mati-cal-month-title { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--mati-text); letter-spacing: -.01em; }
.mati-cal-today-btn { display: inline-flex; align-items: center; padding: .4rem .9rem; background: var(--mati-blue); color: #fff; border-radius: 2rem; font-size: .8rem; font-weight: 600; text-decoration: none; transition: all .18s ease; }
.mati-cal-today-btn:hover { background: var(--mati-blue-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(7,34,188,.25); color: #fff; }
.mati-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; background: var(--mati-border); border-radius: 1rem; overflow: hidden; box-shadow: var(--mati-shadow); }
.mati-cal-day-header { background: var(--mati-bg); padding: .7rem .4rem; text-align: center; font-size: .72rem; font-weight: 700; color: var(--mati-text-dim); text-transform: uppercase; letter-spacing: .03em; }
.mati-cal-day-header.weekend-header { color: #94A3B8; }
.mati-cal-day { background: var(--mati-surface); min-height: 90px; padding: .5rem; position: relative; cursor: pointer; transition: all .18s ease; display: flex; flex-direction: column; }
.mati-cal-day:hover { background: #EEF2FF; transform: scale(1.01); z-index: 2; box-shadow: 0 4px 16px rgba(7,34,188,.08); border-radius: .35rem; }
.mati-cal-day:active { transform: scale(.98); }
.mati-cal-day.other-month { opacity: .25; pointer-events: none; }
.mati-cal-day.weekend { background: #FAFBFC; }
.mati-cal-day.weekend:hover { background: #F0F3F8; }
.mati-cal-day.today { box-shadow: inset 0 0 0 2.5px var(--mati-blue); border-radius: .35rem; background: #F5F7FF; }
.mati-cal-day.today .mati-cal-day-num { color: var(--mati-blue); font-weight: 800; }
.mati-cal-day.has-bookings { border-left: 3px solid var(--mati-teal); padding-left: calc(.5rem - 3px); }
.mati-cal-day-num { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; color: var(--mati-text); }
.mati-cal-dots { display: flex; gap: 3px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: .2rem; }
.mati-cal-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.mati-cal-dot.dot-confirmed { background: var(--mati-teal); }
.mati-cal-dot.dot-pending { background: var(--mati-orange); }
.mati-cal-dot.dot-cancelled { background: #EF4444; opacity: .6; }
.mati-cal-dot.more { width: auto; height: auto; background: none !important; font-size: .62rem; font-weight: 700; color: var(--mati-text-dim); margin-left: 1px; line-height: 1; }
.mati-cal-detail-wrapper { display: none; animation: matiSlideUp .3s ease-out; }
@keyframes matiSlideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.mati-cal-detail-wrapper.active { display: block; }
.mati-cal-detail-card { background: var(--mati-surface); border-radius: 1rem; padding: 1.5rem; box-shadow: var(--mati-shadow); }
.mati-cal-detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.mati-cal-detail-title { font-size: 1.15rem; font-weight: 700; margin: 0; color: var(--mati-text); }
.mati-cal-detail-close { background: none; border: 1px solid var(--mati-border); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.1rem; color: var(--mati-text-dim); transition: all .15s; }
.mati-cal-detail-close:hover { background: #FEE2E2; border-color: #FCA5A5; color: #EF4444; }
.mati-booking-card { display: flex; align-items: center; gap: .85rem; padding: .8rem .9rem; background: var(--mati-bg); border-radius: .75rem; margin-bottom: .45rem; transition: all .15s; }
.mati-booking-card:hover { background: #EEF2FF; box-shadow: 0 2px 8px rgba(7,34,188,.05); }
.mati-booking-card:last-child { margin-bottom: 0; }
.mati-booking-card-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--mati-blue), var(--mati-teal)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; flex-shrink: 0; }
.mati-booking-card-body { flex: 1; min-width: 0; }
.mati-booking-card-name { font-weight: 600; font-size: .9rem; color: var(--mati-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mati-booking-card-meta { font-size: .78rem; color: var(--mati-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mati-booking-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex-shrink: 0; }
.mati-booking-card-time { font-weight: 700; font-size: .9rem; color: var(--mati-text); }
.mati-booking-card-status { font-size: .68rem; padding: .15rem .5rem; border-radius: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.mati-booking-card-status.status-confirmed { background: #D1FAE5; color: #065F46; }
.mati-booking-card-status.status-pending { background: #FFF7ED; color: #9A3412; }
.mati-booking-card-status.status-cancelled { background: #FEE2E2; color: #991B1B; }
.mati-cal-empty-day { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem; color: var(--mati-text-dim); text-align: center; }
.mati-cal-empty-day-icon { font-size: 2.5rem; margin-bottom: .5rem; opacity: .45; }
.mati-cal-empty-day-text { font-size: .9rem; font-weight: 500; }
@media (max-width: 768px) { .mati-cal-topbar { flex-direction: column; align-items: flex-start; gap: .5rem; } .mati-cal-legend { gap: .6rem; } .mati-cal-month-title { font-size: 1.15rem; } .mati-cal-nav-btn { width: 36px; height: 36px; font-size: 1rem; } .mati-cal-day { min-height: 65px; padding: .3rem; } .mati-cal-day-num { font-size: .75rem; } .mati-cal-dot { width: 6px; height: 6px; } .mati-cal-day-header { font-size: .62rem; padding: .5rem .2rem; } }
@media (max-width: 480px) { .mati-cal-grid { gap: 1px; border-radius: .5rem; } .mati-cal-day { min-height: 50px; padding: .2rem; } .mati-cal-day-num { font-size: .68rem; } .mati-cal-dot { width: 5px; height: 5px; } .mati-cal-dot.more { font-size: .55rem; } .mati-cal-month-title { font-size: 1rem; } .mati-cal-navbar { gap: .3rem; } .mati-booking-card { flex-wrap: wrap; } .mati-booking-card-right { flex-direction: row; align-items: center; gap: .5rem; } }
/* ─── SCHEDULE TABS ───────────────────────────────── */
.mati-sched-tabs { display: flex; gap: .25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.mati-sched-tab { padding: .5rem 1rem; border-radius: .5rem .5rem 0 0; border: 1px solid var(--mati-border); background: var(--mati-bg); cursor: pointer; font-size: .85rem; transition: all .1s; font-family: inherit; }
.mati-sched-tab:hover { background: #f0fdf4; }
.mati-sched-tab.active { background: var(--mati-surface); border-bottom-color: var(--mati-surface); font-weight: 600; color: var(--mati-blue); }
.mati-sched-week-overview { display: grid; grid-template-columns: repeat(7, 1fr); gap: .4rem; margin-bottom: 1rem; }
.mati-sched-week-day { text-align: center; padding: .6rem .3rem; border-radius: .5rem; background: var(--mati-bg); font-size: .8rem; }
.mati-sched-week-day.inactive { opacity: .4; }
.mati-sched-week-day-label { font-size: .68rem; font-weight: 700; color: var(--mati-text-dim); margin-bottom: .2rem; }
.mati-break-slot { display: flex; align-items: center; gap: .4rem; padding: .5rem; background: var(--mati-bg); border-radius: .5rem; margin-bottom: .4rem; flex-wrap: wrap; }
.mati-break-slot select, .mati-break-slot input { padding: .3rem .5rem; border: 1px solid var(--mati-border); border-radius: .3rem; font-size: .8rem; font-family: inherit; }
.mati-exception-date { display: flex; align-items: center; gap: .4rem; padding: .35rem 0; }

/* ─── PAYMENTS ────────────────────────────────────── */
.mati-pay-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.mati-pay-filter-tabs { display: flex; gap: .25rem; margin-bottom: 1rem; }
.mati-pay-filter-tab { padding: .35rem .85rem; border-radius: 1.5rem; border: 1px solid var(--mati-border); background: var(--mati-bg); cursor: pointer; font-size: .8rem; transition: all .1s; font-family: inherit; }
.mati-pay-filter-tab:hover, .mati-pay-filter-tab.active { background: var(--mati-blue); color: #fff; border-color: var(--mati-blue); }
.mati-pay-method { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; }

/* ─── TABBED PAGE ─────────────────────────────────── */
.mati-tab-nav { display: flex; gap: .25rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--mati-border); }
.mati-tab-btn { padding: .6rem 1.25rem; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; font-size: .9rem; color: var(--mati-text-dim); transition: all .15s; font-family: inherit; }
.mati-tab-btn:hover { color: var(--mati-text); }
.mati-tab-btn.active { color: var(--mati-blue); border-bottom-color: var(--mati-blue); font-weight: 600; }
.mati-tab-content { display: none; }
.mati-tab-content.active { display: block; }

/* ─── SECTION ACTIONS ─────────────────────────────── */
.mati-section-actions { display: flex; gap: .5rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.mati-section-divider { border: 0; border-top: 1px solid var(--mati-border); margin: 1.5rem 0; }


/* ─── WELCOME BANNER ──────────────────────────────── */
.mati-welcome-banner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; background: linear-gradient(135deg, var(--mati-blue) 0%, var(--mati-blue-light) 100%); color: #fff; border-radius: var(--mati-radius); padding: 1.5rem 2rem; margin-bottom: 1.5rem; box-shadow: var(--mati-shadow); }
.mati-welcome-banner h2 { color: #fff; margin: 0 0 .5rem; font-size: 1.35rem; }
.mati-welcome-banner p { color: rgba(255,255,255,.85); margin: 0 0 1rem; max-width: 60ch; }
.mati-welcome-banner .mati-btn-primary { background: #fff; color: var(--mati-blue); border: none; }
.mati-welcome-banner .mati-btn-primary:hover { background: rgba(255,255,255,.9); }
.mati-welcome-orb { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mati-welcome-orb img, .mati-welcome-orb svg { width: 36px; height: 36px; }
@media (max-width: 600px) { .mati-welcome-banner { flex-direction: column; text-align: center; } }
