@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root {
    --background: 0 0% 97%;
    --foreground: 0 0% 10%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 10%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 10%;
    --primary: 0 100% 46%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 94%;
    --secondary-foreground: 0 0% 10%;
    --muted: 0 0% 94%;
    --muted-foreground: 0 0% 45%;
    --accent: 0 0% 94%;
    --accent-foreground: 0 0% 10%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 88%;
    --input: 0 0% 88%;
    --ring: 0 100% 46%;
    --radius: 0.25rem;
    --ubs-red: 0 100% 46%;
    --ubs-dark: 0 0% 13%;
    --info: 210 80% 60%;
    --ubs-gray: 0 0% 45%;
    --ubs-light-gray: 0 0% 96%;
    --ubs-success: 145 63% 42%;
}

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

html { overflow-y: scroll; overflow-x: hidden; }

body {
    font-family: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   UTILITY CLASSES (Tailwind-like)
   ============================================ */
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-1 { margin-left: 0.25rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pb-0 { padding-bottom: 0; }
.pb-2 { padding-bottom: 0.5rem; }
.pl-5 { padding-left: 1.25rem; }
.pl-10 { padding-left: 2.5rem; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[12px\] { font-size: 12px; }
.text-\[13px\] { font-size: 13px; }
.text-\[15px\] { font-size: 15px; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, monospace; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break-words { word-wrap: break-word; overflow-wrap: break-word; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.transition-colors { transition: color 0.15s, background-color 0.15s, border-color 0.15s; }
.transition-opacity { transition: opacity 0.15s; }
.transition-all { transition: all 0.15s; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }
.rounded-r-sm { border-radius: 0 calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0; }
.rounded-none { border-radius: 0; }
.border { border: 1px solid hsl(var(--border)); }
.border-b { border-bottom: 1px solid hsl(var(--border)); }
.border-t { border-top: 1px solid hsl(var(--border)); }
.border-l-4 { border-left: 4px solid; }
.border-l-\[3px\] { border-left: 3px solid; }
.border-dashed { border-style: dashed; }
.border-border { border-color: hsl(var(--border)); }
.border-primary { border-color: hsl(var(--primary)); }
.border-primary\/30 { border-color: hsl(var(--primary) / 0.3); }
.border-b-0 { border-bottom: 0; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }

/* Colors */
.bg-background { background-color: hsl(var(--background)); }
.bg-card { background-color: hsl(var(--card)); }
.bg-primary { background-color: hsl(var(--primary)); }
.bg-primary\/5 { background-color: hsl(var(--primary) / 0.05); }
.bg-primary\/10 { background-color: hsl(var(--primary) / 0.1); }
.bg-secondary { background-color: hsl(var(--secondary)); }
.bg-secondary\/30 { background-color: hsl(var(--secondary) / 0.3); }
.bg-secondary\/50 { background-color: hsl(var(--secondary) / 0.5); }
.bg-muted { background-color: hsl(var(--muted)); }
.bg-ubs-dark { background-color: hsl(var(--ubs-dark)); }
.bg-foreground\/40 { background-color: hsl(var(--foreground) / 0.4); }
.bg-black\/60 { background-color: rgba(0,0,0,0.6); }
.bg-white\/40 { background-color: rgba(255,255,255,0.4); }
.bg-white\/50 { background-color: rgba(255,255,255,0.5); }
.text-foreground { color: hsl(var(--foreground)); }
.text-primary { color: hsl(var(--primary)); }
.text-primary-foreground { color: hsl(var(--primary-foreground)); }
.text-muted-foreground { color: hsl(var(--muted-foreground)); }
.text-muted-foreground\/60 { color: hsl(var(--muted-foreground) / 0.6); }
.text-white { color: white; }
.text-white\/60 { color: rgba(255,255,255,0.6); }
.text-destructive { color: hsl(var(--destructive)); }
.text-info { color: hsl(var(--info)); }
.text-green-600 { color: #059669; }
.bg-yellow-100 { background-color: #fef3c7; }
.text-yellow-800 { color: #92400e; }
.bg-blue-100 { background-color: #dbeafe; }
.text-blue-800 { color: #1e40af; }
.bg-green-100 { background-color: #dcfce7; }
.text-green-800 { color: #166534; }
.bg-red-100 { background-color: #fee2e2; }
.text-red-800 { color: #991b1b; }
.text-yellow-500 { color: #eab308; }
.text-green-500 { color: #22c55e; }
.bg-info\/10 { background-color: hsl(var(--info) / 0.1); }
.border-info { border-color: hsl(var(--info)); }

/* Shadow */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }

/* Object fit */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Background utilities */
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }
.bg-no-repeat { background-repeat: no-repeat; }

/* ============================================
   COMPONENT STYLES
   ============================================ */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.25rem;
    text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover:not(:disabled) { background: hsl(var(--primary) / 0.9); }
.btn-outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover:not(:disabled) { background: hsl(var(--secondary)); }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); }
.btn-ghost:hover:not(:disabled) { background: hsl(var(--secondary)); }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }
.btn-icon { padding: 0.25rem; width: 2rem; height: 2rem; }
.btn-destructive { color: hsl(var(--destructive)); }

/* Form inputs */
.input, .textarea, .select-trigger {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    line-height: 1.5;
}
.input:focus, .textarea:focus, .select-trigger:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 1px hsl(var(--ring) / 0.3);
}
.input-h9 { height: 2.25rem; padding-top: 0.375rem; padding-bottom: 0.375rem; }
.textarea { resize: vertical; min-height: 80px; }

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

/* Custom checkbox */
.checkbox-wrapper { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.checkbox-box {
    width: 1rem; height: 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.checkbox-box.checked {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
}
.checkbox-box.checked::after {
    content: '✓';
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}
.badge-outline {
    border: 1px solid hsl(var(--border));
    background: transparent;
}
.badge-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

/* Tabs */
.tabs-list {
    display: grid;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    padding: 0.25rem;
}
.tab-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.tab-trigger:hover { color: hsl(var(--foreground)); }
.tab-trigger.active {
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Table */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 0.75rem 1rem; font-size: 0.75rem; font-weight: 500; color: hsl(var(--muted-foreground)); border-bottom: 1px solid hsl(var(--border)); }
td { padding: 0.75rem 1rem; font-size: 0.875rem; border-bottom: 1px solid hsl(var(--border)); vertical-align: middle; }
tr:hover { background: hsl(var(--muted) / 0.3); }

/* Dialog/Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-content {
    background: hsl(var(--card)); border-radius: var(--radius);
    padding: 1.5rem; max-width: 42rem; width: 90%;
    max-height: 85vh; overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

/* Accordion/FAQ */
.accordion-item { border-bottom: 1px solid hsl(var(--border)); }
.accordion-item:last-child { border-bottom: none; }
.accordion-trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0; background: none; border: none; cursor: pointer;
    font-size: 13px; font-weight: 300; color: hsl(var(--foreground));
    text-align: left; font-family: inherit;
}
.accordion-trigger::after {
    content: '▸'; font-size: 12px; transition: transform 0.2s;
    color: hsl(var(--muted-foreground));
}
.accordion-trigger.open::after { transform: rotate(90deg); }
.accordion-content {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out;
    font-size: 13px; font-weight: 300; color: hsl(var(--muted-foreground));
}
.accordion-content.open { max-height: 500px; padding-bottom: 0.75rem; }

/* Switch toggle */
.switch {
    position: relative; display: inline-flex;
    width: 2.5rem; height: 1.25rem;
    background: hsl(var(--muted)); border-radius: 9999px;
    cursor: pointer; transition: background 0.2s;
}
.switch.active { background: hsl(var(--primary)); }
.switch-thumb {
    position: absolute; top: 2px; left: 2px;
    width: calc(1.25rem - 4px); height: calc(1.25rem - 4px);
    background: white; border-radius: 9999px;
    transition: transform 0.2s;
}
.switch.active .switch-thumb { transform: translateX(1.25rem); }

/* Progress bar */
.progress-bar { display: flex; gap: 0.375rem; }
.progress-segment {
    height: 4px; flex: 1; border-radius: 9999px;
    transition: background-color 0.3s;
}
.progress-active { background: hsl(var(--primary)); }
.progress-inactive { background: rgba(255,255,255,0.4); }

/* Hero section */
.hero { position: relative; min-height: 420px; }
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.hero-overlay { position: absolute; inset: 0; background: hsl(var(--foreground) / 0.4); }
.hero-carousel-dot {
    width: 8px; height: 8px; border-radius: 9999px;
    background: rgba(255,255,255,0.5); border: none; cursor: pointer;
    transition: all 0.3s;
}
.hero-carousel-dot.active { background: white; width: 20px; }

/* Spinner animation */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s infinite; }

/* File upload zone */
.upload-zone {
    border: 2px dashed hsl(var(--border));
    padding: 2rem; text-align: center; cursor: pointer;
    transition: border-color 0.15s;
}
.upload-zone:hover { border-color: hsl(var(--primary) / 0.3); }
.upload-zone.has-file { border-color: hsl(var(--primary) / 0.3); background: hsl(var(--card)); }

/* Container */
.container { max-width: 80rem; margin: 0 auto; }

/* SVG icons - inline sizing */
.icon { display: inline-block; vertical-align: middle; }
.icon-sm { width: 0.875rem; height: 0.875rem; }
.icon-md { width: 1rem; height: 1rem; }
.icon-lg { width: 1.25rem; height: 1.25rem; }

/* Color picker */
input[type="color"] { cursor: pointer; border: 1px solid hsl(var(--border)); border-radius: var(--radius); }

/* Responsive */
@media (min-width: 640px) {
    .sm\:min-h-\[480px\] { min-height: 480px; }
    .sm\:p-7 { padding: 1.75rem; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
    .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:flex { display: flex; }
    .md\:flex-row { flex-direction: row; }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* Lucide icon SVGs */
.lucide { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
