/* ============================================
   MAIN.CSS - Global Design System 2026
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Variables / Design Tokens ---- */
:root {
    /* Primary Gradient */
    --primary-start: #ffffff;
    --primary-end: #d1d1d1;
    --primary: #ffffff;
    --primary-light: #f5f5f5;
    --primary-dark: #a3a3a3;
    --primary-gradient: linear-gradient(135deg, #ffffff 0%, #d1d1d1 100%);
    --primary-gradient-soft: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Accent */
    --accent: #ffffff;
    --accent-gradient: linear-gradient(135deg, #ffffff, #d1d1d1);
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);

    /* Backgrounds: Dark textured */
    --bg-base: #1a1a1c;
    --bg-surface: #222226;
    --bg-card: #202024;
    --bg-card-hover: #26262a;
    --bg-modal: #222226;
    --bg-input: transparent;
    --bg-sidebar: #1d1d21;
    --bg-overlay: rgba(0, 0, 0, 0.85);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-active: rgba(255, 255, 255, 0.15);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #a1a1a1;
    --text-muted: #666666;
    --text-accent: #ffffff;

    /* Borders */
    --border: rgba(255, 255, 255, 0.1);
    --border-focus: rgba(255, 255, 255, 0.8);
    --border-hover: rgba(255, 255, 255, 0.2);

    /* Shadows */
    --shadow-xs: none;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 30px 60px rgba(0, 0, 0, 0.9);
    --shadow-primary: 0 4px 15px rgba(255, 255, 255, 0.15);
    --shadow-card-hover: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);

    /* Radii */
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
    --radius-xl: 0px;
    --radius-full: 9999px;

    /* Sidebar */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --navbar-height: 68px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index layers */
    --z-base: 1;
    --z-card: 10;
    --z-sidebar: 100;
    --z-navbar: 110;
    --z-modal: 200;
    --z-toast: 300;
    --z-tooltip: 400;
}

/* Light Mode */
[data-theme="light"] {
    --bg-base: #e6e6e6;
    --bg-surface: #f5f5f5;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --bg-modal: #ffffff;
    --bg-input: transparent;
    --bg-sidebar: #f0f0f0;
    --bg-overlay: rgba(0, 0, 0, 0.4);

    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-hover: rgba(0, 0, 0, 0.05);
    --glass-active: rgba(0, 0, 0, 0.15);

    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #888888;
    --text-accent: #000000;

    --border: rgba(0, 0, 0, 0.1);
    --border-focus: rgba(0, 0, 0, 0.8);
    --border-hover: rgba(0, 0, 0, 0.2);

    --shadow-xs: none;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 30px 60px rgba(0, 0, 0, 0.15);
    --shadow-card-hover: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E');
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    outline: none;
}

input,
textarea,
select {
    font-family: inherit;
}

img {
    max-width: 100%;
}

ul {
    list-style: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

/* Ripple */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-out 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-out {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-primary {
    background: #222226;
    color: #fff;
    box-shadow: none;
    border: 1px solid var(--border);
}

.btn-primary:hover {
    box-shadow: none;
    background: #2a2a2f;
    border-color: var(--border-focus);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--glass-hover);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-danger-outline {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.btn-ghost {
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ---- Form Controls ---- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:hover {
    border-color: var(--border-hover);
    background: transparent;
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: none;
    animation: none;
}

@keyframes input-focus-glow {
    0% {
        box-shadow: none;
    }

    100% {
        box-shadow: none;
    }
}

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

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

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-draft {
    background: rgba(148, 148, 176, 0.12);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-dot.pulse {
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.85);
    }
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    padding: 32px;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-spring);
    position: relative;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

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

.modal-title {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    background: var(--glass-bg);
    border: 1px solid var(--border);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ---- Divider ---- */
.divider {
    height: 1px;
    background: var(--border);
    width: 100%;
}

/* ---- Skeleton Loading ---- */
@keyframes skeleton-shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 936px 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

/* ---- Toggle Switch ---- */
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle input {
    display: none;
}

.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border-hover);
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

.toggle input:checked+.toggle-track {
    background: var(--primary-gradient);
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition-spring);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked~.toggle-thumb {
    transform: translateX(22px);
}

/* ---- Avatar ---- */
.avatar {
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ---- Tooltip ---- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a26;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: var(--z-tooltip);
    box-shadow: var(--shadow-md);
}

[data-tooltip]:hover::before {
    opacity: 1;
}

/* ---- Dropdown Menu ---- */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: all var(--transition-base);
    overflow: hidden;
    padding: 6px;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: var(--glass-bg);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: var(--danger-bg);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ---- Page Transitions ---- */
.page-content {
    opacity: 1;
    /* Default to visible */
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Only animate if JS explicitly adds reveal class */
.page-content.reveal {
    animation: page-fade-in 0.4s ease forwards;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Utility Classes ---- */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-5 {
    gap: 20px;
}

.gap-6 {
    gap: 24px;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ---- Accessibility ---- */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---- Emoji / Icon Sizes ---- */
.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-md {
    width: 20px;
    height: 20px;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

.icon-xl {
    width: 28px;
    height: 28px;
}

svg {
    flex-shrink: 0;
}

/* ---- Toast ---- */
#toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    pointer-events: all;
    min-width: 280px;
    max-width: 380px;
    backdrop-filter: blur(12px);
    animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.exit {
    animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(80px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(80px);
    }
}

.toast-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.toast-error .toast-icon {
    background: var(--danger-bg);
    color: var(--danger);
}

.toast-info .toast-icon {
    background: var(--primary-gradient-soft);
    color: var(--primary-light);
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.toast-close {
    margin-left: auto;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ---- Status Toggle Pill ---- */
.status-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.status-option {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--text-muted);
}

.status-option.active-status {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.status-option.draft-status {
    background: var(--glass-bg);
    color: var(--text-secondary);
    box-shadow: inset 0 0 0 1px var(--border);
}

/* ---- Backdrop Blur cards ---- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* ---- Progress Bar ---- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    transition: width 0.6s ease;
}

/* ---- Empty State ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 24px;
    text-align: center;
}

.empty-illustration {
    width: 120px;
    height: 120px;
    margin-bottom: 8px;
}

.empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.empty-desc {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.7;
}

/* ---- Confirmation Modal Danger ---- */
.confirm-modal .modal {
    max-width: 420px;
    text-align: center;
}

.confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--danger-bg);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ---- Extra tokens ---- */
:root {
    --bg-elevated: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] {
    --bg-elevated: rgba(0, 0, 0, 0.03);
}

/* ---- Toggle Switch (builder settings) ---- */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-switch input {
    display: none;
}

.toggle-switch .toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border-hover);
    border-radius: var(--radius-full);
    transition: background var(--transition-base);
}

.toggle-switch input:checked+.toggle-track {
    background: var(--primary-gradient);
}

.toggle-switch .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition-spring);
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked~.toggle-thumb {
    transform: translateX(20px);
}

/* ---- Spinner ---- */
.spinner {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
}

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

/* ---- Skeleton variants ---- */
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.skeleton-line {
    width: 100%;
    height: 12px;
    margin-bottom: 8px;
}

/* ---- Card appear ---- */
@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-appear {
    animation: card-appear .3s ease;
}

/* ---- Heart animation ---- */
@keyframes heart-beat {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.35);
    }

    60% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

.heart-animate {
    animation: heart-beat .4s ease;
}

/* ---- Fav btn ---- */
.fav-btn {
    color: var(--text-muted);
}

.fav-btn.favorited {
    color: #ef4444;
}

/* ---- Loading dots ---- */
.loading-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: dot-bounce .9s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: .15s;
}

.loading-dots span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes dot-bounce {

    0%,
    100% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-8px);
        opacity: .6;
    }
}

/* ---- Responsive Breakpoints ---- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 72px;
    }
}

@media (max-width: 768px) {
    .btn-lg {
        padding: 12px 22px;
        font-size: 14px;
    }

    .modal {
        padding: 24px 20px;
    }
}