/* ============================================
   CRM Visie — Design System
   Editorial refined, monochromatic + red accent
   Instrument Serif display · Inter body
   ============================================ */

/* --- Custom Properties --- */
:root,
[data-theme="light"] {
    --bg: #fafafa;
    --bg-alt: #f0f0f1;
    --bg-elevated: #ffffff;
    --bg-surface: #ffffff;
    --text: #0c0c0c;
    --text-secondary: #3d3f44;
    --text-muted: #8a8f9a;
    --border: #d8d9dc;
    --border-subtle: #e8e9eb;
    --accent: #a7000c;
    --accent-hover: #8a000a;
    --accent-soft: rgba(167, 0, 12, 0.05);
    --accent-glow: rgba(167, 0, 12, 0.10);
    --accent-text: #a7000c;
    --input-bg: #ffffff;
    --input-border: #d4d5d9;
    --input-focus-border: #0c0c0c;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.06), 0 0 1px rgba(0,0,0,0.04);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08), 0 0 1px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.10);
    --nav-bg: #ffffff;
    --nav-border: #e8e9eb;
    --hero-bg: #0c0c0c;
    --hero-text: #ffffff;
    --footer-bg: #f0f0f1;
    --card-bg: #ffffff;
    --kanban-bg: #f0f0f1;
    --success: #1a7f37;
    --success-soft: rgba(26, 127, 55, 0.08);
    --danger: #a7000c;
    --danger-soft: rgba(167, 0, 12, 0.06);
    --warning: #9a6700;
    --warning-soft: rgba(154, 103, 0, 0.08);
    --info: #0969da;
    --info-soft: rgba(9, 105, 218, 0.06);
    --notification-success-bg: #dafbe1;
    --notification-success-border: #1a7f37;
    --notification-success-text: #116329;
    --notification-danger-bg: #ffebe9;
    --notification-danger-border: #a7000c;
    --notification-danger-text: #82071e;
    --notification-warning-bg: #fff8c5;
    --notification-warning-border: #9a6700;
    --notification-warning-text: #6a4e00;
    --notification-info-bg: #ddf4ff;
    --notification-info-border: #0969da;
    --notification-info-text: #0550ae;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

[data-theme="dark"] {
    --bg: #0d0d0f;
    --bg-alt: #161618;
    --bg-elevated: #1c1c1f;
    --bg-surface: #1c1c1f;
    --text: #e6e6e8;
    --text-secondary: #a0a1a6;
    --text-muted: #56575c;
    --border: #2e2f32;
    --border-subtle: #232426;
    --accent: #e03e4a;
    --accent-hover: #f05060;
    --accent-soft: rgba(224, 62, 74, 0.08);
    --accent-glow: rgba(224, 62, 74, 0.15);
    --accent-text: #f06070;
    --input-bg: #161618;
    --input-border: #35363a;
    --input-focus-border: #e6e6e8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.5), 0 0 1px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.6), 0 0 1px rgba(0,0,0,0.5);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.6);
    --nav-bg: #0d0d0f;
    --nav-border: #232426;
    --hero-bg: #161618;
    --hero-text: #e6e6e8;
    --footer-bg: #0d0d0f;
    --card-bg: #1c1c1f;
    --kanban-bg: #161618;
    --success: #3fb950;
    --success-soft: rgba(63, 185, 80, 0.10);
    --danger: #f85149;
    --danger-soft: rgba(248, 81, 73, 0.10);
    --warning: #d29922;
    --warning-soft: rgba(210, 153, 34, 0.10);
    --info: #58a6ff;
    --info-soft: rgba(88, 166, 255, 0.10);
    --notification-success-bg: rgba(63, 185, 80, 0.12);
    --notification-success-border: #3fb950;
    --notification-success-text: #7ee787;
    --notification-danger-bg: rgba(248, 81, 73, 0.12);
    --notification-danger-border: #f85149;
    --notification-danger-text: #ffa198;
    --notification-warning-bg: rgba(210, 153, 34, 0.12);
    --notification-warning-border: #d29922;
    --notification-warning-text: #e3b341;
    --notification-info-bg: rgba(88, 166, 255, 0.12);
    --notification-info-border: #58a6ff;
    --notification-info-text: #79c0ff;
}

/* --- Base --- */

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg);
    transition: background-color 0.25s ease;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

body > .section {
    flex-grow: 1;
}

::selection {
    background-color: var(--accent-glow);
    color: var(--text);
}

/* --- Typography --- */

.title,
.subtitle {
    color: var(--text) !important;
    letter-spacing: -0.02em;
}

.title {
    font-family: "Instrument Serif", "Georgia", serif;
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.title.is-1 {
    font-size: 3.2rem;
    letter-spacing: -0.02em;
}

.title.is-2 {
    font-size: 2.4rem;
    letter-spacing: -0.015em;
}

.title.is-3 {
    font-size: 1.6rem;
}

.title.is-4 {
    font-family: "Inter", -apple-system, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.title.is-5 {
    font-family: "Inter", -apple-system, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.title.is-6 {
    font-family: "Inter", -apple-system, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-muted) !important;
    font-weight: 400;
    letter-spacing: -0.005em;
}

.subtitle.is-6 {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted) !important;
}

.label {
    color: var(--text) !important;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

a {
    color: var(--text);
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent);
}

p a,
.content a {
    color: var(--accent-text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, color 0.15s ease;
}

p a:hover,
.content a:hover {
    border-bottom-color: var(--accent);
}

strong {
    color: var(--text);
    font-weight: 600;
}

small {
    color: var(--text-muted);
    font-size: 0.82em;
}

hr {
    background-color: var(--border-subtle) !important;
    height: 1px !important;
}

/* --- Navbar --- */

.navbar {
    background-color: var(--nav-bg) !important;
    border-bottom: 1px solid var(--nav-border);
    min-height: 3.25rem;
    transition: background-color 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.navbar > .container {
    max-width: 1280px;
}

.navbar-item,
.navbar-link {
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.15s ease;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
}

.navbar-item .icon {
    font-size: 0.9em;
    width: 1.2em;
    opacity: 0.65;
    transition: opacity 0.15s ease;
}

.navbar-item:hover {
    background-color: transparent !important;
    color: var(--text) !important;
}

.navbar-item:hover .icon {
    opacity: 1;
}

.navbar-brand .navbar-item {
    color: var(--text) !important;
    font-family: "Instrument Serif", "Georgia", serif;
    font-weight: 400;
    font-size: 1.15rem;
    letter-spacing: 0;
    padding-left: 0;
}

.navbar-burger {
    color: var(--text) !important;
}

.navbar-burger:hover {
    background-color: transparent !important;
    color: var(--accent) !important;
}

.navbar-burger span {
    background-color: var(--text) !important;
    height: 1.5px !important;
}

.navbar-dropdown {
    background-color: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-top: 2px solid var(--accent) !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.25rem 0 !important;
    min-width: 180px;
}

.navbar-dropdown .navbar-item {
    font-size: 0.82rem !important;
    padding: 0.45rem 1rem !important;
    border-radius: 0 !important;
}

.navbar-dropdown .navbar-item:hover {
    background-color: var(--bg-alt) !important;
    color: var(--accent) !important;
}

.navbar-divider {
    background-color: var(--border-subtle) !important;
    margin: 0.25rem 0.75rem !important;
}

.navbar-link::after {
    border-color: var(--text-muted) !important;
}

.navbar-menu {
    background-color: var(--nav-bg) !important;
    transition: background-color 0.25s ease;
}

/* --- Buttons --- */

.button,
.buttons .button {
    border-radius: 60px !important;
    font-weight: 500;
    font-size: 0.82rem;
    padding: 0.5em 1.6em;
    letter-spacing: 0.01em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-width: 1.5px;
    border-style: solid;
    line-height: 1.5;
    height: auto;
    position: relative;
}

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

.button.is-primary:not(.is-outlined) {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #ffffff !important;
}

.button.is-primary:not(.is-outlined):hover {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    box-shadow: 0 4px 14px rgba(167, 0, 12, 0.25);
    transform: translateY(-1px);
}

.button.is-primary:not(.is-outlined):active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(167, 0, 12, 0.2);
}

.button.is-primary:focus {
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

.button.is-primary.is-outlined {
    background-color: transparent !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.button.is-primary.is-outlined:hover {
    background-color: var(--accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(167, 0, 12, 0.2);
    transform: translateY(-1px);
}

.button.is-outlined {
    background-color: transparent !important;
}

.button.is-outlined:not([class*="is-primary"]):not([class*="is-link"]):not([class*="is-info"]):not([class*="is-success"]):not([class*="is-warning"]):not([class*="is-danger"]) {
    border-color: var(--text-secondary) !important;
    color: var(--text-secondary) !important;
}

.button.is-outlined:not([class*="is-primary"]):not([class*="is-link"]):not([class*="is-info"]):not([class*="is-success"]):not([class*="is-warning"]):not([class*="is-danger"]):hover {
    background-color: var(--text-secondary) !important;
    color: var(--bg) !important;
}

.button.is-light {
    background-color: var(--bg-alt) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.button.is-light:hover {
    border-color: var(--text-muted) !important;
    background-color: var(--border) !important;
}

.button.is-dark {
    background-color: var(--text) !important;
    border-color: var(--text) !important;
    color: var(--bg) !important;
}

.button.is-dark:hover {
    opacity: 0.85;
}

.button.is-white {
    background-color: var(--bg) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.button:not([class*="is-"]) {
    background-color: var(--bg-surface) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

.button:not([class*="is-"]):hover {
    border-color: var(--text-muted) !important;
    box-shadow: var(--shadow-sm);
}

.button[disabled] {
    opacity: 0.4 !important;
    pointer-events: none;
}

.button.is-loading::after {
    border-color: transparent transparent currentColor currentColor !important;
}

.button.is-fullwidth {
    padding-top: 0.65em;
    padding-bottom: 0.65em;
    font-size: 0.87rem;
}

.button.is-medium {
    font-size: 0.9rem;
    padding: 0.6em 2em;
}

.button.is-small {
    font-size: 0.75rem;
    padding: 0.35em 1em;
}

.button.is-large {
    font-size: 1rem;
    padding: 0.7em 2.2em;
}

.navbar .button.is-primary,
.navbar .button.is-light {
    padding: 0.3em 1.2em;
    font-size: 0.78rem;
}

.field.has-addons .control .button,
.field.has-addons .control .input {
    border-radius: 0 !important;
}

.field.has-addons .control:first-child .button,
.field.has-addons .control:first-child .input {
    border-radius: 60px 0 0 60px !important;
}

.field.has-addons .control:last-child .button,
.field.has-addons .control:last-child .input {
    border-radius: 0 60px 60px 0 !important;
}

/* --- Form Inputs --- */

.input,
.textarea,
.select select {
    background-color: var(--input-bg) !important;
    border: 1.5px solid var(--input-border) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text) !important;
    box-shadow: none !important;
    font-size: 0.88rem;
    padding: 0.55em 0.8em;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: auto;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.65;
}

.input:hover,
.textarea:hover,
.select select:hover {
    border-color: var(--text-muted) !important;
}

.input:focus,
.textarea:focus,
.select select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

.control.has-icons-left .icon {
    color: var(--text-muted) !important;
    transition: color 0.15s ease;
}

.control.has-icons-left .input:focus ~ .icon {
    color: var(--accent) !important;
}

.help {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--text-muted);
}

/* --- Notifications --- */

.notification {
    border-radius: var(--radius-md) !important;
    border: none;
    border-left: 3px solid var(--border);
    padding: 0.85rem 2.5rem 0.85rem 1rem !important;
    font-size: 0.85rem;
    font-weight: 400;
    box-shadow: var(--shadow-sm) !important;
    background-color: var(--bg-elevated) !important;
    transition: opacity 0.3s ease, transform 0.3s ease,
                margin 0.3s ease, padding 0.3s ease,
                max-height 0.3s ease;
    max-height: 200px;
    overflow: hidden;
}

.notification.is-fading {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.notification.is-primary {
    background-color: var(--notification-danger-bg) !important;
    border-left-color: var(--notification-danger-border);
    color: var(--notification-danger-text) !important;
}

.notification.is-success {
    background-color: var(--notification-success-bg) !important;
    border-left-color: var(--notification-success-border);
    color: var(--notification-success-text) !important;
}

.notification.is-danger {
    background-color: var(--notification-danger-bg) !important;
    border-left-color: var(--notification-danger-border);
    color: var(--notification-danger-text) !important;
}

.notification.is-warning {
    background-color: var(--notification-warning-bg) !important;
    border-left-color: var(--notification-warning-border);
    color: var(--notification-warning-text) !important;
}

.notification.is-info {
    background-color: var(--notification-info-bg) !important;
    border-left-color: var(--notification-info-border);
    color: var(--notification-info-text) !important;
}

.notification .delete {
    background-color: transparent !important;
    opacity: 0.4;
    transition: opacity 0.15s ease;
}

.notification .delete:hover {
    opacity: 1;
}

.notification .delete::before,
.notification .delete::after {
    background-color: currentColor !important;
}

/* --- Section --- */

.section {
    background-color: var(--bg);
    padding: 2rem 1.5rem;
    transition: background-color 0.25s ease;
}

.section > .container {
    max-width: 1280px;
}

/* --- Form Card --- */

.form-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    max-width: 560px;
}

.form-card .title {
    margin-bottom: 0.25rem !important;
}

.form-card .form-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
}

.form-card .field {
    margin-bottom: 1.1rem;
}

.form-card .button.is-fullwidth {
    margin-top: 0.5rem;
}

.separator {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.separator::before,
.separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.separator span {
    padding: 0 0.75rem;
}

.google-btn {
    border: 1px solid var(--border) !important;
    background: var(--bg-surface) !important;
    color: var(--text) !important;
    font-weight: 500;
    transition: all 0.15s;
}

.google-btn:hover {
    border-color: var(--text-muted) !important;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.form-links {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-links p + p {
    margin-top: 0.35rem !important;
}

.form-links a {
    background-image: none !important;
    text-decoration: underline;
    text-decoration-color: var(--border);
    text-underline-offset: 3px;
    color: var(--text-secondary);
}

.form-links a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

/* --- Hero (home anonymous) --- */

.hero-landing {
    background-color: var(--hero-bg);
    color: var(--hero-text);
    padding: 8rem 1.5rem 7rem;
    margin: -2rem -1.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-landing::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.4;
}

.hero-landing .hero-title {
    font-family: "Instrument Serif", "Georgia", serif;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--hero-text);
    margin-bottom: 1rem;
    position: relative;
}

.hero-landing .hero-subtitle {
    font-size: 1.05rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 2.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
}

.hero-landing .buttons {
    justify-content: center;
    gap: 0.75rem;
    position: relative;
}

.hero-landing .button.is-primary {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #ffffff !important;
}

.hero-landing .button.is-primary:hover {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

.hero-landing .button.is-outlined {
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

.hero-landing .button.is-outlined:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

/* --- Section Label --- */

.section-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

/* --- Footer --- */

.footer {
    background-color: var(--footer-bg) !important;
    border-top: 1px solid var(--border-subtle);
    padding: 1.5rem !important;
    transition: background-color 0.25s ease;
}

.footer .content p {
    color: var(--text-muted) !important;
    font-size: 0.75rem;
}

/* --- Theme Toggle --- */

.theme-toggle {
    cursor: pointer;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 60px;
    font-size: 0.75rem;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.theme-toggle:hover {
    border-color: var(--text);
    color: var(--text);
    transform: rotate(15deg);
}

/* --- Animation --- */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-card {
    animation: fadeUp 0.35s ease both;
}

.hero-landing .hero-title {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-landing .hero-subtitle {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}

.hero-landing .buttons {
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.notification {
    animation: fadeUp 0.3s ease both;
}

/* --- Box --- */

.box {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    color: var(--text-secondary) !important;
    padding: 1.25rem;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* --- Table --- */

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

.table {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
    font-size: 0.85rem;
    margin-bottom: 0 !important;
}

.table th {
    color: var(--text-muted) !important;
    border-color: var(--border-subtle) !important;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.7em 1em !important;
    background-color: var(--bg-alt) !important;
    white-space: nowrap;
}

.table td {
    border-color: var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    padding: 0.65em 1em !important;
    vertical-align: middle;
}

.table thead th {
    border-bottom: 1px solid var(--border) !important;
}

.table.is-striped tbody tr:not(.is-selected):nth-child(even) {
    background-color: var(--bg-alt) !important;
}

.table.is-hoverable tbody tr:not(.is-selected) {
    transition: background-color 0.1s ease;
}

.table.is-hoverable tbody tr:not(.is-selected):hover {
    background-color: var(--accent-soft) !important;
}

.table tr.is-selected {
    background-color: var(--accent) !important;
    color: #ffffff !important;
}

.table tr.is-selected td,
.table tr.is-selected th {
    border-color: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
}

/* --- Card --- */

.card {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover) !important;
    border-color: var(--border) !important;
    transform: translateY(-2px);
}

.card-header {
    background-color: transparent;
    box-shadow: none !important;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.1rem 0;
}

.card-header-title {
    color: var(--text) !important;
    font-weight: 500;
    font-size: 0.88rem;
}

.card-header-icon {
    color: var(--text-muted) !important;
}

.card-content {
    color: var(--text-secondary);
    font-size: 0.87rem;
}

.card-footer {
    border-top: 1px solid var(--border-subtle) !important;
}

.card-footer-item {
    border-right-color: var(--border-subtle) !important;
    color: var(--text-muted) !important;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.card-footer-item:hover {
    background-color: var(--accent-soft);
    color: var(--accent) !important;
}

/* --- Tags --- */

.tag:not(body) {
    border-radius: 4px !important;
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    padding: 0 0.6em;
    height: 1.65em;
    transition: opacity 0.15s ease;
}

.tags.has-addons .tag:first-child {
    border-radius: 4px 0 0 4px !important;
}

.tags.has-addons .tag:last-child {
    border-radius: 0 4px 4px 0 !important;
}

/* --- Tabs --- */

.tabs {
    border-bottom-color: var(--border-subtle) !important;
}

.tabs ul {
    border-bottom-color: var(--border-subtle) !important;
}

.tabs a {
    border-bottom: 2px solid transparent !important;
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    font-weight: 450;
    padding-bottom: calc(0.5em + 1px);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.tabs a:hover {
    border-bottom-color: var(--border) !important;
    color: var(--text) !important;
}

.tabs li.is-active a {
    border-bottom-color: var(--accent) !important;
    color: var(--accent) !important;
    font-weight: 500;
}

.tabs.is-boxed a {
    border: 1.5px solid transparent !important;
    border-bottom: none !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.tabs.is-boxed li.is-active a {
    background-color: var(--bg-surface) !important;
    border-color: var(--border-subtle) !important;
    border-bottom: none !important;
    color: var(--text) !important;
}

.tabs.is-toggle a {
    border: 1.5px solid var(--border) !important;
    color: var(--text-secondary) !important;
    font-size: 0.82rem;
    border-radius: 0 !important;
    transition: all 0.15s ease;
}

.tabs.is-toggle li:first-child a {
    border-radius: 60px 0 0 60px !important;
}

.tabs.is-toggle li:last-child a {
    border-radius: 0 60px 60px 0 !important;
}

.tabs.is-toggle li.is-active a {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #ffffff !important;
}

.tabs.is-toggle li:not(.is-active) a:hover {
    background-color: var(--bg-alt) !important;
    color: var(--text) !important;
}

/* --- Dropdown --- */

.dropdown-content {
    background-color: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.25rem 0 !important;
}

.dropdown-item {
    color: var(--text-secondary) !important;
    font-size: 0.85rem;
    padding: 0.45rem 1rem !important;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-alt) !important;
    color: var(--text) !important;
}

a.dropdown-item.is-active {
    background-color: var(--accent) !important;
    color: #ffffff !important;
}

.dropdown-divider {
    background-color: var(--border-subtle) !important;
    margin: 0.25rem 0.5rem !important;
}

/* --- Pagination --- */

.pagination-previous,
.pagination-next,
.pagination-link {
    border: 1.5px solid var(--border) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.82rem;
    font-weight: 450;
    min-width: 2.25em;
    transition: all 0.15s ease;
}

.pagination-previous:hover,
.pagination-next:hover,
.pagination-link:hover {
    border-color: var(--text-muted) !important;
    color: var(--text) !important;
    background-color: var(--bg-alt) !important;
}

.pagination-link.is-current {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #ffffff !important;
}

.pagination-ellipsis {
    color: var(--text-muted) !important;
}

/* --- Progress --- */

.progress {
    border-radius: 60px !important;
    height: 0.5rem;
    overflow: hidden;
}

.progress::-webkit-progress-bar {
    background-color: var(--bg-alt) !important;
    border-radius: 60px;
}

.progress::-webkit-progress-value {
    border-radius: 60px;
    transition: width 0.4s ease;
}

.progress.is-small { height: 0.35rem; }
.progress.is-medium { height: 0.7rem; }
.progress.is-large { height: 1rem; }

/* --- Breadcrumb --- */

.breadcrumb {
    font-size: 0.82rem;
    margin-bottom: 0.75rem !important;
}

.breadcrumb a {
    color: var(--text-muted) !important;
    background-image: none !important;
    border-bottom: none !important;
}

.breadcrumb a:hover {
    color: var(--accent) !important;
}

.breadcrumb li.is-active a {
    color: var(--text) !important;
    font-weight: 500;
}

.breadcrumb li + li::before {
    color: var(--text-muted) !important;
}

/* --- Message --- */

.message {
    background-color: transparent !important;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.message-header {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.7em 1em;
}

.message-body {
    background-color: var(--bg-elevated) !important;
    border: none !important;
    border-top: none !important;
    color: var(--text-secondary) !important;
    font-size: 0.87rem;
    padding: 1em 1.25em;
}

.message:not([class*="is-"]) .message-header {
    background-color: var(--text) !important;
    color: var(--bg) !important;
}

.message.is-success .message-body,
.message.is-warning .message-body,
.message.is-danger .message-body {
    background-color: var(--bg-alt) !important;
}

/* --- Modal --- */

.modal-background {
    background-color: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-card {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-subtle);
}

.modal-card-head {
    background-color: var(--bg-elevated) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 1rem 1.25rem;
}

.modal-card-foot {
    background-color: var(--bg-alt) !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 0.85rem 1.25rem;
}

.modal-card-title {
    color: var(--text) !important;
    font-family: "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.modal-card-body {
    background-color: var(--bg-elevated) !important;
    color: var(--text-secondary) !important;
    padding: 1.25rem;
}

/* --- Hero (Bulma component) --- */

.hero {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.hero .title,
.hero .subtitle {
    color: inherit !important;
}

.hero.is-primary {
    background-color: var(--accent) !important;
    color: #ffffff !important;
}

/* --- Level --- */

.level .heading {
    color: var(--text-muted) !important;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
}

.level .title {
    font-weight: 600 !important;
    letter-spacing: -0.02em;
}

/* --- Content --- */

.content blockquote {
    background-color: var(--bg-alt);
    border-left: 3px solid var(--accent) !important;
    padding: 1em 1.25em;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.content pre {
    background-color: var(--bg-alt) !important;
    color: var(--text) !important;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md) !important;
    padding: 1.25em;
    font-size: 0.85rem;
}

.content code {
    background-color: var(--accent-soft) !important;
    color: var(--accent-text) !important;
    border-radius: 3px;
    padding: 0.15em 0.35em;
    font-size: 0.87em;
}

.content pre code {
    background: none !important;
    color: inherit !important;
    padding: 0;
}

/* --- Checkbox / Radio --- */

.checkbox,
.radio {
    color: var(--text-secondary) !important;
    font-size: 0.87rem;
}

/* --- Select --- */

.select::after {
    border-color: var(--text-muted) !important;
}

.select select {
    border-radius: var(--radius-sm) !important;
}

/* --- File --- */

.file-cta {
    background-color: var(--bg-alt) !important;
    border: 1.5px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
    transition: all 0.15s ease;
}

.file-name {
    background-color: var(--input-bg) !important;
    border: 1.5px solid var(--border) !important;
    border-left: none !important;
    color: var(--text-secondary) !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

.file.is-primary .file-cta {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #ffffff !important;
}

/* --- Showcase Sidebar --- */

.showcase-sidebar {
    position: sticky;
    top: 4rem;
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.showcase-sidebar::-webkit-scrollbar {
    width: 3px;
}

.showcase-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.showcase-sidebar .menu-list a {
    color: var(--text-muted) !important;
    font-size: 0.78rem;
    padding: 0.25em 0.75em;
    border-radius: 0 !important;
    border-left: 2px solid transparent;
    background: none !important;
    transition: color 0.1s ease, border-color 0.1s ease;
    line-height: 1.6;
}

.showcase-sidebar .menu-list a:hover {
    color: var(--text) !important;
    border-left-color: var(--border);
}

.showcase-sidebar .menu-list a.is-active {
    color: var(--accent) !important;
    border-left-color: var(--accent);
    font-weight: 500;
}

/* --- Media Object --- */

.media + .media {
    border-top-color: var(--border-subtle) !important;
}

.media-content .content p {
    line-height: 1.55;
}

/* ============================================
   CRM Components
   ============================================ */

/* --- Page Header --- */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header .title {
    margin-bottom: 0 !important;
}

.page-header .buttons {
    margin-bottom: 0 !important;
}

/* --- Filter Bar --- */

.filter-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.filter-bar .field.is-grouped {
    margin-bottom: 0;
}

.filter-bar .input,
.filter-bar .select select {
    font-size: 0.82rem;
    padding: 0.4em 0.75em;
}

.filter-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.period-shortcut {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--accent-text);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.1em 0.3em;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}

.period-shortcut:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Pipeline Kanban --- */

.pipeline-kanban {
    display: flex;
    justify-content: safe center;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0 1.5rem 1rem;
    min-height: 420px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.pipeline-kanban::-webkit-scrollbar {
    height: 6px;
}

.pipeline-kanban::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.pipeline-column {
    flex: 0 0 256px;
    min-width: 256px;
    background: var(--kanban-bg);
    border-radius: var(--radius-md);
    padding: 0;
    display: flex;
    flex-direction: column;
}

.pipeline-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.pipeline-column-header .title {
    font-family: "Inter", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted) !important;
    margin-bottom: 0 !important;
}

.pipeline-column-header .tag {
    font-size: 0.68rem;
    min-width: 1.5em;
    justify-content: center;
}

.pipeline-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.65rem;
    flex-grow: 1;
    min-height: 60px;
}

.pipeline-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.75rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.pipeline-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--border);
}

.pipeline-card.is-dragging {
    opacity: 0.4;
    transform: scale(0.97);
    box-shadow: none;
}

.pipeline-card.is-drop-ghost {
    border: 2px dashed var(--accent);
    background: var(--accent-soft);
    opacity: 1;
    min-height: 48px;
    pointer-events: none;
}

.pipeline-card.is-drop-ghost * {
    visibility: hidden;
}

.pipeline-cards.is-drag-over {
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    outline: 2px dashed var(--accent);
    outline-offset: -2px;
    min-height: 80px;
}

.pipeline-cards.is-drag-over .pipeline-empty {
    display: none;
}

.pipeline-card-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text) !important;
    display: block;
    margin-bottom: 0.2rem;
    line-height: 1.35;
}

.pipeline-card-company {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.pipeline-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.2rem;
}

.pipeline-card-value {
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.pipeline-card-owner {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* --- Pipeline Progress (deal view) --- */

.pipeline-progress {
    display: flex;
    gap: 2px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.pipeline-step {
    flex: 1;
    text-align: center;
    padding: 0.45rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--bg-alt);
    color: var(--text-muted);
    position: relative;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pipeline-step.is-done {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.pipeline-step.is-active {
    background: var(--accent);
    color: #fff;
}

.pipeline-progress.is-interactive .pipeline-step {
    cursor: pointer;
    user-select: none;
}

.pipeline-progress.is-interactive .pipeline-step:hover {
    filter: brightness(1.1);
}

.pipeline-progress.is-interactive .pipeline-step:not(.is-active):not(.is-done):hover {
    background: var(--border);
    color: var(--text);
}

.pipeline-progress.is-interactive .pipeline-step.is-done:hover {
    background: var(--accent-glow);
}

.pipeline-progress.is-interactive .pipeline-step.is-active {
    cursor: default;
}

.pipeline-progress.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* --- Timeline --- */

.timeline-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.timeline-item.is-movement {
    background: var(--bg-alt);
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    margin: 0.35rem 0;
    border-bottom: none;
    font-size: 0.85rem;
}

.timeline-item .icon {
    width: 1.5rem;
    color: var(--text-muted);
}

/* --- Activity items (dashboard) --- */

.activity-item {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

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

.activity-item.is-overdue {
    border-left: 3px solid var(--accent);
    padding-left: 0.75rem;
    margin-left: -0.15rem;
}

/* --- Navbar search --- */

.navbar-search-form .input {
    border-radius: 60px 0 0 60px !important;
    height: 1.85rem;
    font-size: 0.78rem;
    padding-left: 0.85rem;
    border-color: var(--border) !important;
    background: var(--bg-alt) !important;
}

.navbar-search-form .input:focus {
    background: var(--input-bg) !important;
}

.navbar-search-form .button {
    border-radius: 0 60px 60px 0 !important;
    height: 1.85rem;
    padding: 0 0.6rem;
    border-color: var(--border) !important;
    background: var(--bg-alt) !important;
    color: var(--text-muted) !important;
}

.navbar-search-form .button:hover {
    color: var(--accent) !important;
}

/* --- Stats cards (dashboard) --- */

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    transition: border-color 0.15s ease;
}

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

.stat-card-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-family: "Instrument Serif", "Georgia", serif;
    font-size: 1.8rem;
    color: var(--text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* --- Empty state --- */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.88rem;
}

/* --- Detail page info table --- */

.info-table {
    width: 100%;
    font-size: 0.85rem;
}

.info-table th {
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem 0.35rem 0;
    vertical-align: top;
    width: 120px;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.82rem;
    border: none !important;
    background: transparent !important;
}

.info-table td {
    color: var(--text);
    padding: 0.35rem 0;
    border: none !important;
}

/* --- Status badges --- */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2em 0.65em;
    border-radius: 4px;
    letter-spacing: 0.01em;
}

.status-badge.is-open {
    background: var(--info-soft);
    color: var(--info);
}

.status-badge.is-won {
    background: var(--success-soft);
    color: var(--success);
}

.status-badge.is-lost {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-badge.is-pending {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-badge.is-done {
    background: var(--success-soft);
    color: var(--success);
}

/* --- Column layout for wide forms --- */

.wide-form {
    max-width: 720px;
}

/* --- Responsive --- */

@media screen and (max-width: 768px) {
    .hero-landing {
        padding: 4.5rem 1.5rem 4rem;
    }

    .hero-landing::before {
        width: 300px;
        height: 300px;
    }

    .form-card {
        padding: 1.75rem 1.25rem;
        border: none;
        box-shadow: none;
        background-color: transparent;
    }

    [data-theme="dark"] .form-card {
        background-color: transparent;
    }

    .section {
        padding: 1.5rem 1rem;
    }

    .card:hover {
        transform: none;
    }

    .pipeline-kanban {
        flex-direction: column;
    }

    .pipeline-column {
        flex: auto;
        min-width: auto;
    }

    .pipeline-progress {
        flex-direction: column;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .level:not(.is-mobile) {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media screen and (min-width: 769px) {
    .section {
        padding: 2rem 2rem;
    }
}

/* --- Settings page --- */

.settings-nav {
    position: sticky;
    top: 4.5rem;
}

.settings-nav .menu-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding-left: 0.75rem;
}

.settings-nav .menu-list a {
    color: var(--text-secondary) !important;
    font-size: 0.82rem;
    padding: 0.4em 0.75em;
    border-radius: var(--radius-sm) !important;
    display: flex;
    align-items: center;
    gap: 0.4em;
    transition: background-color 0.1s ease, color 0.1s ease;
}

.settings-nav .menu-list a .icon {
    font-size: 0.85em;
    width: 1.3em;
    color: var(--text-muted);
}

.settings-nav .menu-list a:hover {
    background-color: var(--bg-alt) !important;
    color: var(--text) !important;
}

.settings-nav .menu-list a:hover .icon {
    color: var(--text);
}

.settings-section {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section .title.is-4 {
    margin-bottom: 0.25rem !important;
}

/* --- Tag Input Widget --- */

.tag-input-widget {
    position: relative;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-sm);
    padding: 0.35em 0.5em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    cursor: text;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    min-height: 2.5em;
}

.tag-input-widget:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.tag-input-chips {
    display: contents;
}

.tag-input-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    background: var(--accent-soft);
    color: var(--accent-text);
    border: 1px solid var(--accent-glow);
    border-radius: 4px;
    padding: 0.15em 0.5em;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.tag-input-chip-remove {
    cursor: pointer;
    opacity: 0.5;
    font-size: 0.85em;
    line-height: 1;
    transition: opacity 0.1s ease;
    padding: 0 0.1em;
}

.tag-input-chip-remove:hover {
    opacity: 1;
}

.tag-input-text {
    flex: 1;
    min-width: 80px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    padding: 0.15em 0;
}

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

.tag-input-suggestions {
    position: absolute;
    top: 100%;
    left: -1px;
    right: -1px;
    z-index: 20;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-md);
    display: none;
    max-height: 180px;
    overflow-y: auto;
}

.tag-input-suggestions.is-open {
    display: block;
}

.tag-input-suggestion {
    padding: 0.4em 0.75em;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background-color 0.08s ease;
    color: var(--text-secondary);
}

.tag-input-suggestion:hover,
.tag-input-suggestion.is-highlighted {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.tag-input-suggestion mark {
    background: transparent;
    color: var(--accent);
    font-weight: 600;
}

/* --- Rich content display --- */

.rich-content {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    word-break: break-word;
}

.rich-content p {
    margin-bottom: 0.5em;
}

.rich-content p:last-child {
    margin-bottom: 0;
}

.rich-content a {
    color: var(--accent-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.rich-content ul,
.rich-content ol {
    margin-left: 1.5em;
    margin-bottom: 0.5em;
}

.rich-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 0.75em;
    color: var(--text-muted);
    margin: 0.5em 0;
}

/* --- Quill editor theme overrides --- */

.ql-toolbar.ql-snow {
    border: 1.5px solid var(--input-border) !important;
    border-bottom: none !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    background: var(--bg-alt) !important;
    padding: 0.35rem 0.5rem !important;
}

.ql-container.ql-snow {
    border: 1.5px solid var(--input-border) !important;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    background: var(--input-bg) !important;
    font-family: "Inter", -apple-system, sans-serif !important;
    font-size: 0.88rem !important;
    color: var(--text) !important;
    min-height: 100px;
}

.ql-editor {
    padding: 0.6rem 0.75rem !important;
    min-height: 80px;
    color: var(--text) !important;
}

.ql-editor.ql-blank::before {
    color: var(--text-muted) !important;
    opacity: 0.6;
    font-style: normal !important;
}

.ql-snow .ql-stroke {
    stroke: var(--text-muted) !important;
}

.ql-snow .ql-fill {
    fill: var(--text-muted) !important;
}

.ql-snow .ql-picker-label {
    color: var(--text-muted) !important;
}

.ql-snow button:hover .ql-stroke,
.ql-snow button.ql-active .ql-stroke {
    stroke: var(--accent) !important;
}

.ql-snow button:hover .ql-fill,
.ql-snow button.ql-active .ql-fill {
    fill: var(--accent) !important;
}

.ql-snow .ql-picker-options {
    background: var(--bg-elevated) !important;
    border-color: var(--border) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
}

.ql-snow .ql-tooltip {
    background: var(--bg-elevated) !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow-md) !important;
    color: var(--text) !important;
    border-radius: var(--radius-sm) !important;
}

.ql-snow .ql-tooltip input[type="text"] {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text) !important;
    border-radius: 4px !important;
}

.ql-snow .ql-tooltip a {
    color: var(--accent-text) !important;
}

.ql-editor a {
    color: var(--accent-text) !important;
}

/* --- Inline edit (users table) --- */

.inline-edit {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
}

.inline-edit input[type="text"] {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.2em 0.4em;
    width: 150px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.inline-edit input[type="text"]:hover {
    border-color: var(--border);
}

.inline-edit input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--input-bg);
}

.inline-edit input[type="text"]::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.inline-edit button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2em 0.3em;
    font-size: 0.75rem;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.inline-edit:hover button,
.inline-edit input:focus ~ button {
    opacity: 1;
}

.inline-edit button:hover {
    color: var(--success);
}

/* --- Deals table pagination --- */

.deals-pag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.82rem;
}

.pag-info {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.pag-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    font-variant-numeric: tabular-nums;
}

.pag-btn:hover:not(:disabled):not(.is-active) {
    border-color: var(--text-muted);
    background: var(--bg-alt);
    color: var(--text);
}

.pag-btn.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    cursor: default;
}

.pag-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.pag-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    user-select: none;
}
