/* ==========================================================================
   AvanMail · sistema de diseño
   ========================================================================== */

@font-face {
    font-family: "Nunito";
    src: url("fonts/nunito-400.ttf?v=20261119") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Nunito";
    src: url("fonts/nunito-500.ttf?v=20261119") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Nunito";
    src: url("fonts/nunito-600.ttf?v=20261119") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Nunito";
    src: url("fonts/nunito-700.ttf?v=20261119") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Nunito";
    src: url("fonts/nunito-800.ttf?v=20261119") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-50: #fff2f1;
    --brand-100: #ffe4e2;
    --brand-200: #ffc9c5;
    --brand-300: #ffa29c;
    --brand-400: #f45b52;
    --brand-500: #d61f1f;
    --brand-600: #b60000;
    --brand-700: #940000;
    --brand-800: #740000;

    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --muted-light: #94a3b8;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;
    --bg: #f8fafc;
    --white: #ffffff;

    --success: #129b5e;
    --success-soft: #ecfdf3;
    --warning: #e98a05;
    --warning-soft: #fffaeb;
    --danger: #e5484d;
    --danger-soft: #fff1f2;
    --info: #2f6fed;
    --info-soft: #eff5ff;
    --violet: #b60000;
    --violet-soft: #fff1f0;
    --gold: #c69343;
    --gold-soft: #fbf5e8;

    --sidebar: #1e293b;
    --sidebar-soft: #0f172a;
    --sidebar-text: #94a3b8;

    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 10px;
    --radius-xl: 16px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .03);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);

    --sidebar-w: 280px;
    --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--brand-100); color: var(--brand-800); }

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4, p { margin: 0; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.8; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.app-shell { min-height: 100vh; background: var(--bg); }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: var(--sidebar-w);
    background:
        radial-gradient(420px 240px at 100% 0%, rgba(182, 0, 0, .16), transparent 70%),
        linear-gradient(180deg, #1e293b 0%, #172033 100%);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: transform .25s ease;
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    height: 70px;
    padding: 0 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 174px;
    height: 22px;
    object-fit: contain;
}
.brand-logo-lg { height: 30px; max-width: 230px; }
.brand-logo-sm { height: 19px; max-width: 150px; }

.brand-caption {
    display: block;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #64748b;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-400) 100%);
    display: grid;
    place-items: center;
    box-shadow: 0 8px 18px rgba(182, 0, 0, .32);
    color: #fff;
}

.brand-name { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; }
.brand-sub { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: #64748b; margin-top: 4px; }

.sidebar-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    margin: 16px 16px 6px;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    background: var(--brand-600);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 6px 14px rgba(182, 0, 0, .26);
    transition: background .14s, box-shadow .14s;
}
.sidebar-cta:hover { color: #fff; background: var(--brand-700); box-shadow: 0 8px 18px rgba(182, 0, 0, .32); }

.nav { flex: 1; overflow-y: auto; padding: 0 10px 14px; }
.nav::-webkit-scrollbar { width: 0; }

.nav-section { padding: 18px 10px 6px; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #64748b; }
.nav > .nav-section:first-child { padding-top: 12px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    margin: 1px 0;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-weight: 600;
    font-size: 13.5px;
    position: relative;
    transition: background .16s, color .16s;
}
.nav-link .icon {
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .045);
    color: #94a3b8;
    box-sizing: border-box;
    transition: background .16s, color .16s;
}
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #f1f5f9; }
.nav-link:hover .icon { background: rgba(255, 255, 255, .08); color: #e2e8f0; }
.nav-link.active { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.active .icon { background: rgba(182, 0, 0, .38); color: #ffd2cd; }
.nav-link.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--brand-500);
}
.nav-link .nav-count {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 700;
    background: rgba(255, 255, 255, .1);
    color: #e2e8f0;
    border-radius: 20px;
    padding: 1px 7px;
}

.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .08); padding: 12px; }

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: #e2e8f0;
    background: linear-gradient(135deg, rgba(182, 0, 0, .18) 0%, rgba(255, 255, 255, .045) 58%);
    transition: background .16s, border-color .16s, transform .16s;
}
.user-card:hover { background: linear-gradient(135deg, rgba(182, 0, 0, .26) 0%, rgba(255, 255, 255, .07) 58%); border-color: rgba(255, 255, 255, .16); color: #fff; transform: translateY(-1px); }
.user-card-avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--brand-600), var(--brand-500)); color: #fff; font-size: 11px; font-weight: 800; box-shadow: 0 4px 10px rgba(182, 0, 0, .32); }
.user-card-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.user-card-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-role { font-size: 8px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; color: #94a3b8; }
.user-card-chevron { flex: 0 0 auto; display: grid; place-items: center; color: #64748b; transition: color .15s, transform .15s; }
.user-card:hover .user-card-chevron { color: #e2e8f0; transform: translateX(1px); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 68px;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 20px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; }
.topbar-title p { max-width: 100%; overflow: hidden; font-size: 12.5px; color: var(--muted); margin-top: 2px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-actions .btn { white-space: nowrap; }

.topbar-divider { width: 1px; height: 26px; background: var(--line); flex: 0 0 auto; }
.topbar-user { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-family: inherit; cursor: pointer; }
.topbar-user:hover { color: var(--ink); background: #f8fafc; }
.topbar-user-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.topbar-user-name strong { max-width: 150px; overflow: hidden; font-size: 12.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.topbar-user-name small { max-width: 150px; overflow: hidden; color: var(--muted); font-size: 10.5px; white-space: nowrap; text-overflow: ellipsis; }

.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 26px 28px 56px; flex: 1; }
.content-narrow { max-width: 890px; }

.menu-toggle { display: none; background: none; border: 0; color: var(--ink-soft); padding: 6px; cursor: pointer; }

.topbar-brand-mobile { display: none; flex: 0 0 auto; }
.topbar-brand-mobile img { height: 20px; width: auto; max-width: 116px; display: block; }

.sidebar-backdrop { display: none; }

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */
.page-heading { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-heading:not(:has(.page-heading-actions)) { display: none; }
.page-heading > div:first-child { display: none; }
.page-heading:has(.page-heading-actions) { margin-bottom: 14px; }
.page-heading h2 { font-size: 22px; font-weight: 750; letter-spacing: -.5px; }
.page-heading p { margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.page-heading-actions { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 26px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 26px; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 18px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.hide { display: none !important; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s, box-shadow .12s, border-color .12s, color .12s;
    text-decoration: none;
}
.btn:hover { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 4px 10px rgba(182, 0, 0, .16); }
.btn-primary:hover { background: var(--brand-700); color: #fff; box-shadow: 0 6px 14px rgba(182, 0, 0, .22); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink-soft); }
.btn-secondary:hover { border-color: #cbd5e1; color: var(--ink); background: #f8fafc; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #d92d20; color: #fff; }
.btn-danger-soft { background: var(--danger-soft); color: #b42318; }
.btn.btn-soft {
    border-radius: 999px;
    border-color: #ffd9d4;
    background: linear-gradient(180deg, #fff8f7 0%, #fff1ee 100%);
    color: var(--brand-700);
    box-shadow: 0 1px 2px rgba(182, 0, 0, .06);
}
.btn.btn-soft:hover {
    border-color: var(--brand-600);
    background: var(--brand-600);
    color: #fff;
    box-shadow: 0 4px 10px rgba(182, 0, 0, .18);
}
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #039855; color: #fff; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 11px; border-radius: 6px; gap: 5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; border-radius: 9px; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon.btn-sm { width: 31px; height: 31px; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Cards, stats
   -------------------------------------------------------------------------- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}
.card-pad { padding: 20px; }
.card-header { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line-soft); }
.card-header h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.15px; }
.card-header .card-actions { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.card-body { padding: 18px; }
.card-footer { padding: 13px 18px; border-top: 1px solid var(--line-soft); background: #f8fafc; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-xs);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
}
.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}
.stat-icon.violet { background: var(--violet-soft); color: var(--violet); }
.stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-icon.blue { background: var(--info-soft); color: var(--info); }
.stat-icon.amber { background: var(--warning-soft); color: var(--warning); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; margin-top: 3px; }
.stat-meta { font-size: 11.5px; color: var(--muted-light); margin-top: 4px; }
.stat-meta .up { color: var(--success); font-weight: 700; }
.stat-meta .down { color: var(--danger); font-weight: 700; }

.stat-grid--dash { margin-bottom: 10px; }
.stat-card--dash {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: 15px 18px 9px;
    transition: border-color .15s, box-shadow .15s;
}
.stat-card--dash:hover { border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.stat-card--dash::before {
    content: none;
}
.stat-body { position: relative; z-index: 1; padding-right: 86px; min-width: 0; }
.stat-value-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.stat-chip {
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
    white-space: nowrap;
    flex: 0 0 auto;
}
.stat-chip--up { background: var(--success-soft); color: #067647; }
.stat-card--dash .stat-label { font-size: 12px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card--dash .stat-value { font-size: 32px; margin-top: 2px; line-height: 1.05; }
.stat-card--dash .stat-meta { margin-top: 5px; font-size: 11px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-art {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    border: 0;
    background: none;
    color: var(--brand-600);
    pointer-events: none;
    z-index: 0;
}
.stat-art svg { width: 48px; height: 48px; opacity: .32; }
.stat-card--dash:nth-child(3) .stat-art { color: var(--success); }
.stat-card--dash:nth-child(4) .stat-art { color: var(--warning); }
.stat-bar { position: relative; z-index: 1; height: 4px; margin-top: 5px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.stat-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-600), var(--brand-400)); }
.stat-bar--green > span { background: linear-gradient(90deg, var(--success), #47cd89); }
.stat-bar--amber > span { background: linear-gradient(90deg, var(--warning), #fdb022); }

.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 30px 34px;
    color: #fff;
    background:
        radial-gradient(600px 300px at 92% -20%, rgba(255, 90, 82, .32), transparent 62%),
        radial-gradient(460px 300px at 8% 130%, rgba(198, 147, 67, .16), transparent 62%),
        linear-gradient(115deg, #120a09 0%, #290808 52%, #5c0505 100%);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 44px rgba(65, 12, 10, .3);
    margin-bottom: 22px;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(100deg, black, transparent 70%);
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    right: -90px;
    top: -130px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 58px solid rgba(255, 255, 255, .05);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.hero-copy { flex: 1; min-width: 260px; }
.hero-eyebrow { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; color: #e5bd80; }
.hero h2 { font-size: 28px; font-weight: 780; letter-spacing: -.8px; margin-top: 8px; }
.hero p { color: #e4c9c5; font-size: 13.5px; margin-top: 8px; max-width: 560px; }
.hero-actions { display: flex; gap: 9px; margin-top: 19px; flex-wrap: wrap; }
.hero-actions .btn-primary { background: #fff; color: var(--brand-700); box-shadow: 0 8px 20px rgba(0,0,0,.16); }
.hero-actions .btn-primary:hover { background: #fff8f7; color: var(--brand-700); }
.hero-actions .btn-secondary { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(6px); }
.hero-actions .btn-secondary:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.hero-metrics { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-metric { min-width: 90px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .13); }
.hero-metric:first-child { padding-left: 0; border-left: 0; }
.hero-metric-value { font-size: 25px; font-weight: 780; letter-spacing: -.6px; }
.hero-metric-label { font-size: 11px; color: #d5b8b2; margin-top: 3px; }
.hero-wave { display: inline-block; transform-origin: 70% 70%; }

.hero-watermark {
    position: absolute;
    right: 24px;
    bottom: -38px;
    width: 390px;
    max-width: 38%;
    opacity: .055;
    pointer-events: none;
    z-index: 0;
}

.hero-metrics--cards { gap: 10px; align-items: stretch; }
.hero-metrics--cards .hero-metric {
    min-width: 124px;
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-sizing: border-box;
}
.hero-metrics--cards .hero-metric:first-child { padding-left: 15px; border-left: 1px solid rgba(255, 255, 255, .12); }
.hero-metric-icon {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    margin-bottom: 9px;
    border-radius: 8px;
    color: #ffd2cd;
    background: rgba(255, 255, 255, .1);
}
.hero-metrics--cards .hero-metric-value { font-size: 23px; }
.hero-metric-sub { margin-top: 5px; color: #c8a8a3; font-size: 10.5px; line-height: 1.35; }

.dash-hero { padding: 20px 28px; margin-bottom: 14px; }
.dash-hero h2 { font-size: 24px; margin-top: 4px; }
.dash-hero .dash-title { font-size: 30px; font-weight: 780; letter-spacing: -.8px; line-height: 1.1; margin-top: 4px; }
.dash-hero .dash-hero-sub { margin-top: 4px; color: #d8b8b2; font-size: 12px; line-height: 1.45; max-width: none; }
.dash-hero p { margin-top: 4px; max-width: 590px; font-size: 12.5px; }
.dash-hero .hero-actions { margin-top: 12px; }
.dash-hero .hero-actions .btn { height: 36px; font-size: 12.5px; border-radius: 9px; }
.dash-hero .hero-metrics--cards .hero-metric { min-width: 108px; padding: 9px 12px; }
.dash-hero .hero-metric-icon { width: 22px; height: 22px; margin-bottom: 5px; border-radius: 7px; }
.dash-hero .hero-metrics--cards .hero-metric-value { font-size: 20px; }
.dash-hero .hero-metric-label { font-size: 10px; }
.dash-hero .hero-metric-sub { font-size: 9px; margin-top: 2px; }
.dash-hero .hero-eyebrow { font-size: 9.5px; }

.stat-grid--dash { margin-bottom: 10px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, .9fr); gap: 16px; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-col { display: flex; flex-direction: column; gap: 16px; }
.dash-main > .card > .card-header,
.dash-side > .card > .card-header { padding: 13px 18px; }
.dash-main > .card > .card-body,
.dash-side > .card > .card-body { padding: 15px 18px; }
.dash-main .campaign-table th { padding: 7px 12px; }
.dash-main .campaign-table td { padding: 8px 12px; }
.dash-main .chart-summary { padding-bottom: 12px; margin-bottom: 5px; }
.dash-main .chart-summary-item strong { font-size: 17px; }
.dash-side .activity-item { padding: 8px 0; }
.dash-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 16px; margin-top: 16px; align-items: stretch; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .65px;
    color: var(--muted);
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th.text-right,
.table td.text-right { text-align: right; }
.table th.text-center,
.table td.text-center { text-align: center; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #f8fafc; }
.table .cell-main { font-weight: 700; color: var(--ink); }
.table .cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.campaign-table .cell-with-avatar > div { min-width: 0; }
.campaign-table .cell-main,
.campaign-table .cell-sub { display: block; max-width: 245px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-compact td { padding: 10px 12px; }
.table-compact th { padding: 8px 12px; }

.row-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.icon-btn:hover { background: #f1f5f9; color: var(--ink); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    font-weight: 750;
    background: var(--brand-50);
    color: var(--brand-600);
    flex: 0 0 auto;
}
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-sm { width: 28px; height: 28px; font-size: 10.5px; }
.cell-with-avatar { display: flex; align-items: center; gap: 10px; }

/* --------------------------------------------------------------------------
   Badges, chips, progress
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
    white-space: nowrap;
}
.badge .dot { display: none; }
.tone-success { background: #ecfdf3; color: #067647; border-color: #d1fadf; }
.tone-warning { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.tone-danger { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.tone-info { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }
.tone-violet { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.tone-neutral { background: #f9fafb; color: #344054; border-color: #e4e7ec; }
.tone-muted { background: #f9fafb; color: #98a2b3; border-color: #eaecf0; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    background: #f1f5f9;
    color: var(--ink-soft);
    font-size: 11.5px;
    font-weight: 600;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 5px; }

.progress { height: 7px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-600), var(--brand-400)); transition: width .4s ease; }
.progress.green > span { background: linear-gradient(90deg, #12b76a, #32d583); }
.progress.amber > span { background: linear-gradient(90deg, #f79009, #fdb022); }
.progress-lg { height: 10px; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.campaign-form-section-body > .hint { margin-top: 8px; }
.campaign-edit-attachments .campaign-form-section-body .hint { margin-top: 8px; }
.field .error { font-size: 11.5px; color: var(--danger); font-weight: 600; }

.input, .select, .textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 9px 11px;
    min-height: 40px;
    font-size: 13.5px;
    transition: border-color .14s, box-shadow .14s;
    outline: none;
}
.input::placeholder, .textarea::placeholder { color: #94a3b8; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(182, 0, 0, .1); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input-sm, .select-sm { min-height: 34px; padding: 6px 9px; font-size: 12.5px; border-radius: 7px; }
.input[type="file"] { padding: 6px 8px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8fafc;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.input[type="file"]::file-selector-button:hover { background: #f1f5f9; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; }
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand-600); }
.checkbox-row label { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 210px; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.check-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.check-item input { accent-color: var(--brand-600); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 18px; margin-top: 20px; border-top: 1px solid var(--line-soft); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 38px; height: 22px; border-radius: 999px; background: #d0d5dd; position: relative; transition: background .15s; flex: 0 0 auto; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--brand-600); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch-label { font-size: 13px; color: var(--ink-soft); }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 9px 0 0 9px; }
.input-group .btn { border-radius: 0 9px 9px 0; height: auto; }
.input-with-icon { position: relative; }
.input-with-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-light); width: 17px; height: 17px; }
.input-with-icon .input { padding-left: 37px; }

/* --------------------------------------------------------------------------
   Alerts and toasts
   -------------------------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--success-soft); border-color: #abefc6; color: #067647; }
.alert-error { background: var(--danger-soft); border-color: #fecdca; color: #b42318; }
.alert-warning { background: var(--warning-soft); border-color: #fedf89; color: #93370d; }
.alert-info { background: var(--info-soft); border-color: #b2ddff; color: #175cd3; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert strong { font-weight: 700; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #1b1413;
    color: #fff;
    padding: 13px 15px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    animation: toast-in .25s ease;
}
.toast.success .icon { color: #32d583; }
.toast.error .icon { color: #f97066; }
.toast button { margin-left: auto; background: none; border: 0; color: #98a2b3; cursor: pointer; padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* --------------------------------------------------------------------------
   Modals & dropdowns
   -------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.modal-panel {
    position: relative;
    z-index: 1;
    width: calc(100% - 28px);
    max-width: 560px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    margin: 30px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    animation: modal-in .2s ease;
}
.modal-panel.modal-lg { max-width: 780px; }
.modal-panel.modal-sm { max-width: 420px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.modal-header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.modal-header h3 { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.modal-header p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-close { margin-left: auto; }
.modal-body { padding: 18px 22px 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 22px; border-top: 1px solid var(--line-soft); background: #f8fafc; border-radius: 0 0 12px 12px; }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 5px;
    z-index: 40;
    display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 9px; border-radius: 6px; border: 0; background: none; color: var(--ink-soft); font-size: 13px; cursor: pointer; }
.dropdown-item:hover { background: #f1f5f9; color: var(--ink); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-soft); }
.dropdown-sep { height: 1px; background: var(--line-soft); margin: 5px 0; }

/* --------------------------------------------------------------------------
   Tabs and filters
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-600); border-bottom-color: var(--brand-600); }

.filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.filters .input, .filters .select { height: 36px; min-height: 36px; font-size: 12.5px; }
.filters .search { min-width: 240px; flex: 1; max-width: 380px; }

.segmented { display: inline-flex; background: #f1f5f9; border-radius: 9px; padding: 3px; gap: 2px; }
.segmented a { padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.segmented a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

/* --------------------------------------------------------------------------
   Empty states, timeline, activity
   -------------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 46px 24px; }
.empty-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state h3 { font-size: 16px; font-weight: 700; }
.empty-state p { color: var(--muted); font-size: 13px; max-width: 380px; margin: 6px auto 16px; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 17px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -21px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--brand-300); }
.timeline-item.success .timeline-dot { border-color: var(--success); }
.timeline-item.danger .timeline-dot { border-color: var(--danger); }
.timeline-item.warning .timeline-dot { border-color: var(--warning); }
.timeline-title { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.timeline-meta { font-size: 11px; color: var(--muted-light); margin-top: 2px; }

.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.activity-item:last-child { border-bottom: 0; }
.activity-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.activity-text { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; min-width: 0; }
.activity-text a { font-weight: 650; }
.activity-time { font-size: 10.5px; color: var(--muted-light); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Campaign specific
   -------------------------------------------------------------------------- */
.campaign-row-progress { min-width: 120px; }
.campaign-audience-lists {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
    max-width: 212px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}
.campaign-audience-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid #ffd9d4;
    border-radius: 6px;
    background: #fff;
    color: var(--brand-700);
    font-size: 9.5px;
    font-weight: 650;
    line-height: 1.3;
    box-shadow: 0 1px 1px rgba(182, 0, 0, .03);
}
.campaign-audience-chip--empty { border-color: var(--line); background: #f8fafc; color: var(--muted-light); box-shadow: none; }
.campaign-head-list { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 320px; }
.campaign-head-list .icon { flex: 0 0 auto; color: var(--brand-500); }
.campaign-head-list > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }

.campaign-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.campaign-summary-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-xs);
    transition: box-shadow .15s, border-color .15s;
}
.campaign-summary-card:hover { color: var(--ink); border-color: #cbd5e1; box-shadow: var(--shadow-sm); transform: none; }
.campaign-summary-card.active { border-color: var(--brand-200); background: linear-gradient(180deg, #fff 0%, #fff8f7 100%); box-shadow: 0 0 0 1px rgba(182, 0, 0, .04); }
.summary-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.summary-icon.amber { background: var(--warning-soft); color: #b54708; }
.summary-icon.green { background: var(--success-soft); color: #067647; }
.summary-icon.violet { background: var(--violet-soft); color: var(--brand-700); }
.summary-icon.red { background: var(--danger-soft); color: var(--danger); }
.summary-content { display: flex; flex-direction: column; min-width: 0; }
.summary-label { font-size: 9.5px; font-weight: 650; color: var(--muted); }
.summary-value { margin-top: 0; font-size: 19px; font-weight: 780; letter-spacing: -.45px; line-height: 1.15; }
.summary-meta { margin-top: 0; font-size: 9px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.campaign-list-card { overflow: hidden; }
.campaign-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line-soft);
}
.campaign-search { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; flex: 1; min-width: 0; }
.campaign-search .input-with-icon { flex: 1; min-width: 190px; max-width: 360px; }
.campaign-search .input { height: 33px; min-height: 33px; font-size: 12.5px; }
.campaign-status-select { width: auto; min-width: 170px; height: 33px; font-size: 11.5px; }
.campaign-toolbar-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--muted);
    font-size: 10.5px;
    white-space: nowrap;
}
.campaign-toolbar-count .icon { color: var(--brand-500); }
.status-filter { display: flex; align-items: center; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.status-filter::-webkit-scrollbar { height: 0; }
.status-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 29px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 650;
    white-space: nowrap;
}
.status-filter-item:hover { border-color: var(--brand-300); color: var(--brand-600); }
.status-filter-item.active { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.status-filter-item .count {
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
}
.status-filter-item.active .count { background: var(--brand-600); color: #fff; }

.campaign-audience-compact { min-width: 178px; }
.campaign-audience-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.campaign-audience-count { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid #e4e7ec; border-radius: 999px; background: #f9fafb; color: #344054; font-size: 9px; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.campaign-audience-progress { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.campaign-audience-progress .progress { flex: 1; height: 3px; background: #f1f5f9; }
.campaign-audience-progress small { flex: 0 0 auto; color: var(--brand-700); font-size: 8.5px; font-weight: 700; }
.progress--slim { height: 3px; margin-top: 5px; }
.campaign-rates { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: var(--muted); }
.campaign-rates--compact { flex-direction: row; align-items: center; gap: 4px; font-size: 10px; }
.campaign-rates--compact .badge { padding: 2px 6px; font-size: 9.5px; line-height: 1.4; }
.campaign-rates span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.campaign-rates i { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.campaign-rates .open-dot { background: var(--success); }
.campaign-rates .click-dot { background: var(--warning); }
.campaigns-page-table td { padding-top: 8px; padding-bottom: 8px; }
.campaigns-page-table th,
.campaigns-page-table td { padding-left: 10px; padding-right: 10px; }
.campaigns-page-table .cell-main,
.campaigns-page-table .cell-sub { max-width: 200px; }
.campaigns-page-table .campaign-tile { width: 34px; height: 34px; border-radius: 10px; }
.campaigns-page-table .cell-with-avatar { gap: 9px; }
.campaign-status-badge { padding: 4px 9px; font-size: 10.5px; font-weight: 650; border-radius: 6px; }

/* --------------------------------------------------------------------------
   Audience
   -------------------------------------------------------------------------- */
.audience-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.audience-filters { flex: 1; min-width: 0; }
.audience-filters .input-with-icon { flex: 1 1 230px; max-width: 320px; }
.audience-count { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }

.subscribers-card { overflow: hidden; }
.subscribers-bulk {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #fff8f7 0%, #f8fafc 100%);
}
.bulk-title { margin-right: 2px; font-size: 9.5px; font-weight: 750; letter-spacing: .55px; text-transform: uppercase; color: var(--muted); }
.bulk-selected { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--brand-100); border-radius: 999px; background: #fff; color: var(--brand-700); font-size: 10px; font-weight: 700; white-space: nowrap; }
.bulk-clear { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 10.5px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.bulk-clear:hover { color: var(--brand-600); }
.subscribers-table td { padding-top: 11px; padding-bottom: 11px; }
.subscribers-table .cell-main { font-weight: 650; }
.subscribers-table .contact-sub { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subscribers-table .chip-list { flex-wrap: wrap; gap: 4px; }
.subscribers-table .chip { font-size: 10.5px; }

/* --------------------------------------------------------------------------
   Reports
   -------------------------------------------------------------------------- */
.reports-heading { margin-bottom: 16px; }

.report-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.report-stat {
    --tone: var(--brand-600);
    --tone-soft: var(--brand-50);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px 15px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-xs);
    min-width: 0;
    transition: box-shadow .15s, border-color .15s;
}
.report-stat:hover { transform: none; border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.report-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--tone), rgba(0, 0, 0, 0));
    opacity: .5;
}
.report-stat--green { --tone: #129b5e; --tone-soft: var(--success-soft); }
.report-stat--blue { --tone: var(--info); --tone-soft: var(--info-soft); }
.report-stat--amber { --tone: var(--warning); --tone-soft: var(--warning-soft); }
.report-stat-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 10px;
    background: var(--tone-soft);
    color: var(--tone);
}
.report-stat-body { display: flex; flex-direction: column; min-width: 0; }
.report-stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .45px;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.report-stat-value { margin-top: 1px; font-size: 25px; font-weight: 780; letter-spacing: -.6px; line-height: 1.1; }
.report-stat-meta { margin-top: 2px; font-size: 10.5px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-stat-meta strong { color: var(--ink-soft); font-weight: 700; }

.reports-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .75fr);
    gap: 16px;
    align-items: start;
}
.reports-main,
.reports-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.report-table th,
.report-table td { padding-left: 7px; padding-right: 7px; }
.report-table td { padding-top: 8px; padding-bottom: 8px; }
.report-table .campaign-tile { width: 34px; height: 34px; }
.report-campaign-info { min-width: 0; }
.report-campaign-info .cell-main { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.report-campaign-sub {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    margin-top: 3px;
    color: var(--muted);
    font-size: 9.5px;
    white-space: nowrap;
}
.report-campaign-sub > * { flex: 0 0 auto; }
.report-campaign-sub .report-user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.report-sub-sep { color: var(--muted-light); }
.report-company-name { overflow: hidden; max-width: 90px; color: var(--ink-soft); text-overflow: ellipsis; }
.report-company-name:hover { color: var(--brand-600); }
.report-company-name--global { color: var(--muted); }
.report-user-name { display: inline-flex; align-items: center; gap: 3px; }
.report-user-name .icon { width: 8px; height: 8px; flex: 0 0 auto; opacity: .75; color: var(--muted-light); }
.report-user-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-pill--micro {
    display: inline-block;
    flex: 0 1 auto;
    max-width: 120px;
    overflow: hidden;
    padding: 2px 5px;
    font-size: 8.5px;
    text-overflow: ellipsis;
    vertical-align: middle;
}
.rate-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}
.rate-badge--open { background: var(--success-soft); color: #067647; }
.rate-badge--click { background: var(--warning-soft); color: #b54708; }

.top-links-list { display: flex; flex-direction: column; }
.top-link-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
}
.top-link-row:first-child { padding-top: 0; }
.top-link-row:last-child { padding-bottom: 0; border-bottom: 0; }
.top-link-row:hover { color: var(--ink); }
.top-link-rank {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 7px;
    background: #f1f5f9;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}
.top-link-row:first-child .top-link-rank { background: var(--brand-50); color: var(--brand-700); }
.top-link-info { flex: 1; min-width: 0; }
.top-link-url {
    display: block;
    font-size: 11.5px;
    font-weight: 650;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-link-url span { color: var(--muted); font-weight: 500; }
.top-link-bar { display: block; height: 4px; margin-top: 5px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.top-link-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-600), var(--brand-400)); }
.top-link-count { flex: 0 0 auto; text-align: right; }
.top-link-count strong { display: block; font-size: 13px; font-weight: 750; line-height: 1.1; }
.top-link-count small { font-size: 9px; color: var(--muted-light); }

.delivery-info { flex: 1; min-width: 150px; }
.reports-side .delivery-card-body { gap: 14px; flex-wrap: nowrap; }
.reports-side .delivery-ring { width: 86px; height: 86px; }
.reports-side .delivery-ring::before { inset: 8px; }
.reports-side .delivery-ring strong { font-size: 18px; }
.reports-side .delivery-ring span { font-size: 8px; letter-spacing: .4px; }
.reports-side .delivery-info { min-width: 120px; }
.delivery-stat strong em { font-style: normal; margin-left: 4px; font-size: 10px; font-weight: 600; color: var(--muted-light); }
.report-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    font-size: 10px;
    color: var(--muted);
    line-height: 1.45;
}
.report-note .icon { flex: 0 0 auto; margin-top: 1px; color: var(--muted-light); }

.campaign-overview { overflow: hidden; margin-bottom: 16px; }
.campaign-overview-head { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding: 20px 22px; }
.campaign-overview-info { flex: 1; min-width: 280px; }
.campaign-overview-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.campaign-kicker { font-size: 9px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; color: var(--muted-light); }
.campaign-overview-info h2 { font-size: 25px; font-weight: 780; letter-spacing: -.6px; line-height: 1.2; }
.campaign-overview-meta { display: flex; align-items: center; gap: 7px 15px; flex-wrap: wrap; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.campaign-meta-item { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 360px; }
.campaign-meta-item .icon { flex: 0 0 auto; color: var(--muted-light); }
.campaign-meta-item > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campaign-meta-lists { max-width: none; }
.campaign-meta-chip { padding: 2px 7px; font-size: 10px; line-height: 1.35; }
.campaign-overview-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.campaign-overview-progress {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px 22px 16px;
    border-top: 1px solid var(--line-soft);
    background: linear-gradient(90deg, #f8fafc 0%, #fff 100%);
}
.campaign-overview-progress .progress-ring { width: 64px; height: 64px; }
.campaign-overview-progress .progress-ring svg { width: 64px; height: 64px; }
.campaign-overview-progress .progress-ring-value { font-size: 14px; }
.campaign-progress-main { flex: 1; min-width: 240px; }
.campaign-progress-title { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }
.campaign-progress-sub { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.campaign-progress-main .progress { margin-top: 9px; }

.campaign-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f1f5f9;
    overflow-x: auto;
}
.campaign-tabs .tab { padding: 7px 13px; border: 0; border-radius: 8px; font-size: 11.5px; color: var(--muted); }
.campaign-tabs .tab:hover { color: var(--ink); }
.campaign-tabs .tab.active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-xs); border: 0; }

.campaign-results {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 16px;
    overflow: hidden;
}
.campaign-result { padding: 13px 15px 12px; border-left: 1px solid var(--line-soft); min-width: 0; }
.campaign-result:first-child { border-left: 0; }
.campaign-result-label { display: flex; align-items: center; gap: 5px; font-size: 9px; font-weight: 750; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.campaign-result-label i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; }
.campaign-result-value { display: block; margin-top: 3px; font-size: 23px; font-weight: 780; letter-spacing: -.5px; line-height: 1.1; }
.campaign-result-meta { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.campaign-detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .75fr); gap: 16px; align-items: start; }

.campaign-empty-block { display: flex; align-items: flex-start; gap: 11px; padding: 10px 0; }
.campaign-empty-block--chart { min-height: 128px; align-items: center; padding: 22px 16px; }
.campaign-empty-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.campaign-empty-block strong { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.campaign-empty-block p { margin-top: 2px; max-width: 390px; font-size: 10.5px; color: var(--muted); line-height: 1.45; }

.campaign-quality-list { display: flex; flex-direction: column; }
.campaign-quality-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.campaign-quality-row:last-child { border-bottom: 0; }
.campaign-quality-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.campaign-quality-label i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }
.campaign-quality-row strong { font-size: 12.5px; color: var(--ink); }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.metric { padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.metric-label { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.metric-value { font-size: 21px; font-weight: 780; letter-spacing: -.5px; margin-top: 5px; }
.metric-sub { font-size: 10.5px; color: var(--muted-light); margin-top: 3px; }

.progress-panel { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.progress-ring { width: 78px; height: 78px; flex: 0 0 auto; position: relative; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring-value { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 750; }
.progress-details { flex: 1; min-width: 220px; }
.progress-details .progress { height: 9px; }

.link-table-url { max-width: 430px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }

.attachment-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.attachment-row:last-child { border-bottom: 0; }
[data-attachment-status].is-success { color: var(--success); font-weight: 600; }
[data-attachment-status].is-error { color: var(--danger); font-weight: 600; }
.file-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Templates
   -------------------------------------------------------------------------- */
.template-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.template-toolbar .campaign-search { flex: 1; min-width: 280px; }
.template-toolbar .campaign-search .input-with-icon { max-width: 380px; }
.template-count { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }

.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.template-card {
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-xs);
    transition: box-shadow .2s, border-color .2s;
}
.template-card:has(.dropdown.open) { z-index: 20; }
.template-form-card { overflow: hidden; }
.template-form-hero { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: linear-gradient(135deg, #fff8f7 0%, #fff 55%, #f8fafc 100%); border-bottom: 1px solid var(--line-soft); }
.template-form-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); }
.template-form-identity { min-width: 0; }
.template-form-kicker { font-size: 8.5px; font-weight: 750; letter-spacing: .7px; text-transform: uppercase; color: var(--muted-light); }
.template-form-identity h3 { margin-top: 1px; font-size: 18px; font-weight: 780; letter-spacing: -.3px; line-height: 1.2; }
.template-form-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; font-size: 10px; color: var(--muted-light); }
.template-form-grid { grid-template-columns: minmax(0, 1.5fr) minmax(220px, .5fr); align-items: start; }
@media (max-width: 700px) {
    .template-form-hero { padding: 14px 16px; }
    .template-form-icon { width: 42px; height: 42px; border-radius: 10px; }
    .template-form-identity h3 { font-size: 16px; }
    .template-form-grid { grid-template-columns: 1fr; }
}.template-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}
.template-thumb-wrap {
    position: relative;
    isolation: isolate;
    height: 150px;
    padding: 8px;
    overflow: hidden;
    border-radius: 9px 9px 0 0;
    border-bottom: 1px solid var(--line-soft);
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    box-sizing: border-box;
}
.template-thumb-frame {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 16px -8px rgba(60, 30, 20, .28), 0 0 0 1px rgba(90, 60, 50, .08);
}
.template-thumb { width: 640px; height: 640px; border: 0; transform: scale(.38); transform-origin: top left; pointer-events: none; background: #fff; }
.template-thumb-wrap::after { content: ""; position: absolute; inset: 8px; border-radius: 8px; background: linear-gradient(180deg, transparent 72%, rgba(255, 255, 255, .9) 100%); pointer-events: none; z-index: 1; }
.template-body {
    position: relative;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.template-category {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 0;
    border-radius: 5px;
    background: linear-gradient(180deg, #c00000 0%, #a80000 100%);
    color: #fff;
    font-size: 8px;
    font-weight: 750;
    letter-spacing: .85px;
    text-transform: uppercase;
    line-height: 1.4;
    box-shadow: 0 3px 8px -2px rgba(120, 0, 0, .5);
}
.template-category::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .18);
}
.template-name {
    display: -webkit-box;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.2px;
    line-height: 1.3;
    color: var(--ink);
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.template-meta {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.template-actions { display: flex; gap: 4px; margin-top: auto; padding-top: 8px; flex-wrap: nowrap; align-items: center; }
.template-actions .btn { height: 27px; padding: 0 8px; font-size: 9.5px; border-radius: 7px; gap: 4px; }
.template-actions .icon-btn { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-soft); }
.template-actions .icon-btn:hover { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-600); }
.template-actions .icon-btn svg { width: 17px; height: 17px; }
.system-pill { font-size: 9.5px; text-transform: uppercase; letter-spacing: .7px; font-weight: 750; color: var(--brand-700); background: var(--brand-50); padding: 2px 6px; border-radius: 5px; }

.lists-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.lists-search { flex: 1; min-width: 0; }
.lists-search .input-with-icon { flex: 1; min-width: 220px; max-width: 360px; }
.lists-count { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }

.list-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) {
    .list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
    .list-grid { grid-template-columns: 1fr; }
}
.list-card {
    position: relative;
    overflow: visible;
    padding: 13px 13px 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.list-card:has(.dropdown.open) { z-index: 20; }
.list-card:hover { transform: none; border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.list-card-head { display: flex; gap: 8px; align-items: flex-start; }
.list-card-title { min-width: 0; flex: 1; }
.list-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex: 0 0 auto; }
.list-card h3 { display: -webkit-box; font-size: 13.5px; font-weight: 700; letter-spacing: -.15px; line-height: 1.3; white-space: normal; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.list-card h3 a { display: block; color: var(--ink); white-space: normal; }
.list-card h3 a:hover { color: var(--brand-600); }
.list-card-details { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; }
.list-detail { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.list-detail strong { margin-right: 2px; font-size: 15px; font-weight: 780; letter-spacing: -.25px; color: var(--ink); }
.list-active-rate { display: flex; align-items: center; gap: 8px; width: 100%; }
.list-active-rate-track { flex: 1; height: 7px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; overflow: hidden; }
.list-active-rate-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-600), var(--brand-400)); }
.list-active-rate-label { flex: 0 0 auto; font-size: 8.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--muted-light); white-space: nowrap; }
.list-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.list-card-updated { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-size: 9px; font-weight: 600; color: var(--muted-light); white-space: nowrap; }
.list-card-updated .icon { width: 9px; height: 9px; flex: 0 0 auto; }
.list-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(135deg, #fff8f7 0%, #fff 55%, #f8fafc 100%);
    box-shadow: var(--shadow-xs);
}
.list-detail-hero-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.list-detail-icon { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); }
.list-detail-copy { min-width: 0; }
.list-detail-kicker { font-size: 8.5px; font-weight: 750; letter-spacing: .7px; text-transform: uppercase; color: var(--muted-light); }
.list-detail-copy h2 { margin-top: 1px; font-size: 20px; font-weight: 780; letter-spacing: -.4px; line-height: 1.2; }
.list-detail-meta { display: flex; align-items: center; gap: 5px 9px; flex-wrap: wrap; margin-top: 6px; }
.list-detail-meta-item { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted-light); }
.list-detail-metrics { display: flex; align-items: stretch; flex: 0 0 auto; border-left: 1px solid var(--line-soft); }
.list-detail-metric { min-width: 66px; padding: 2px 12px; text-align: center; }
.list-detail-metric:not(:last-child) { border-right: 1px solid var(--line-soft); }
.list-detail-metric span { display: block; font-size: 8px; font-weight: 750; letter-spacing: .5px; text-transform: uppercase; color: var(--muted-light); }
.list-detail-metric strong { display: block; margin-top: 3px; font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1; color: var(--ink); }
.list-detail-metric strong.is-success { color: #067647; }
.list-detail-metric strong.is-warning { color: #b54708; }
.list-detail-metric strong.is-danger { color: #b42318; }
.list-contacts-card { overflow: visible; }
.list-contacts-card .table-wrap { overflow: visible; }
.list-contacts-table tr:has(.dropdown.open) { position: relative; z-index: 20; }
.list-contacts-table .dropdown-menu { min-width: 200px; }
.list-contacts-table tbody tr:nth-last-child(-n+3) .dropdown-menu { top: auto; bottom: calc(100% + 6px); }
.list-contacts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px 10px; border-bottom: 1px solid var(--line-soft); }
.list-contacts-head h3 { font-size: 14px; font-weight: 750; letter-spacing: -.1px; }
.list-contacts-head p { margin-top: 1px; font-size: 10px; color: var(--muted); }
.list-contacts-filters { margin-bottom: 0; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); background: #f8fafc; }
.list-contacts-table td { padding-top: 6px; padding-bottom: 6px; }
.copy-list-picker { max-height: 270px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.copy-list-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.copy-list-option:last-child { border-bottom: 0; }
.copy-list-option:hover { background: #f8fafc; }
.copy-list-option input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--brand-600); }
.copy-list-option-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.copy-list-option-name { font-size: 12px; font-weight: 700; color: var(--ink); }
.copy-list-option-meta { margin-top: 1px; font-size: 9.5px; color: var(--muted-light); }
.copy-list-option-count { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.copy-list-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 10px; color: var(--muted); }
.copy-list-summary [data-copy-selected] { font-weight: 700; color: var(--brand-600); }
.import-progress { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.import-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 10.5px; color: var(--muted); }
.import-progress-head strong { color: var(--brand-600); font-size: 11px; }
.import-progress .progress { height: 8px; }
.import-progress.is-processing .progress > span { animation: import-processing 1.2s ease-in-out infinite; }
@keyframes import-processing { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.import-result { margin-top: 12px; padding: 12px; border: 1px solid #d1fadf; border-radius: 10px; background: #f6fef9; }
.import-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.import-result-grid strong { display: block; font-size: 18px; line-height: 1.1; color: var(--ink); }
.import-result-grid span { display: block; margin-top: 2px; font-size: 8px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted-light); }
.import-result-logs { max-height: 150px; margin-top: 10px; padding-top: 8px; overflow-y: auto; border-top: 1px solid #d1fadf; }
.import-log-row { padding: 3px 0; font-size: 10px; line-height: 1.45; color: var(--muted); }
.import-log-row + .import-log-row { border-top: 1px solid rgba(6, 118, 71, .08); }
@media (max-width: 520px) {
    .import-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .list-detail-hero { padding: 14px; }
    .list-detail-metrics { width: 100%; padding-top: 10px; border-top: 1px solid var(--line-soft); border-left: 0; }
    .list-detail-metric { flex: 1; min-width: 0; padding: 0 6px; }
    .list-contacts-head { padding: 12px 14px 10px; }
    .list-contacts-filters { padding: 10px 14px; }
}

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
.chart-box { width: 100%; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.chart-empty { padding: 40px 0; text-align: center; color: var(--muted-light); font-size: 12px; }

.chart-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0 0 15px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
}
.chart-summary-item { padding: 0 16px; }
.chart-summary-item:first-child { padding-left: 0; }
.chart-summary-item + .chart-summary-item { border-left: 1px solid var(--line-soft); }
.chart-summary-item span { display: block; font-size: 10px; font-weight: 650; color: var(--muted); letter-spacing: .2px; }
.chart-summary-item strong { display: block; margin-top: 2px; font-size: 19px; font-weight: 780; letter-spacing: -.4px; color: var(--ink); }

.campaign-tile {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.campaign-tile.tone-success { background: var(--success-soft); color: #067647; }
.campaign-tile.tone-warning { background: var(--warning-soft); color: #b54708; }
.campaign-tile.tone-danger { background: var(--danger-soft); color: #b42318; }
.campaign-tile.tone-info { background: var(--info-soft); color: #175cd3; }
.campaign-tile.tone-muted { background: #f1f5f9; color: #8d7e7a; }
.campaign-tile.tone-neutral { background: #f1f5f9; color: #6f625e; }

.upcoming-list { display: flex; flex-direction: column; gap: 2px; }
.upcoming-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 0;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line-soft);
}
.upcoming-row:last-child { border-bottom: 0; }
.upcoming-row:hover { color: var(--ink); }
.upcoming-row > .icon { margin-left: auto; color: var(--muted-light); }
.upcoming-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 45px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: var(--brand-50);
    color: var(--brand-700);
}
.upcoming-date strong { font-size: 16px; font-weight: 780; line-height: 1; }
.upcoming-date span { margin-top: 2px; font-size: 8.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--brand-600); }
.upcoming-info { min-width: 0; }
.upcoming-info .strong { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-info .tiny { display: block; margin-top: 2px; }

.dashboard-ok { display: flex; align-items: center; gap: 11px; padding: 4px 0; }

.delivery-card-body { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.delivery-ring {
    --value: 0;
    position: relative;
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--brand-600) calc(var(--value) * 1%), #f1f5f9 0);
}
.delivery-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.delivery-ring > div { position: relative; z-index: 1; text-align: center; }
.delivery-ring strong { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.delivery-ring span { display: block; margin-top: 2px; font-size: 9px; font-weight: 650; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.delivery-info { flex: 1; min-width: 180px; }
.delivery-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.delivery-stat:last-of-type { border-bottom: 0; }
.delivery-stat span { font-size: 11.5px; color: var(--muted); }
.delivery-stat strong { font-size: 12.5px; color: var(--ink); }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.pagination a:hover { border-color: var(--brand-300); color: var(--brand-600); }
.pagination .active { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.pagination .disabled { opacity: .45; pointer-events: none; }
.pagination-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.pagination-info { font-size: 11.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Login · réplica de la pantalla de acceso de Avannubo
   -------------------------------------------------------------------------- */
.plesk-login-body {
    margin: 0;
    min-height: 100vh;
    background: #000;
    color: #fff;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.plesk-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #000 url("avannubo-login-bg.png") center center / cover no-repeat;
}
.plesk-login {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.plesk-card {
    width: 392px;
    max-width: calc(100vw - 32px);
    background: rgba(80, 80, 80, .4);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(40, 40, 52, .15), 0 0 1px rgba(40, 40, 52, .35);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    overflow: hidden;
    box-sizing: border-box;
}
.plesk-card-header { padding: 22px 36px 18px; text-align: center; }
.plesk-logo { display: block; width: 100%; height: auto; border: 0; }
.plesk-tagline {
    display: block;
    margin-top: 9px;
    color: rgba(255, 255, 255, .55);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 2.35px;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
}
.plesk-card-body { padding: 24px 36px 52px; }
.plesk-form { width: 100%; margin: 0; }
.plesk-field { padding: 4px 0; margin: 0 0 8px; }
.plesk-field label {
    display: block;
    margin: 0 0 4px;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.43;
}
.plesk-field input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 9px 16px;
    border: 1px solid #b5b5b5;
    border-radius: 100px;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    outline: none;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.plesk-field input:focus {
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px rgba(182, 0, 0, .22);
}
.plesk-password { position: relative; }
.plesk-password input { padding-right: 42px; }
.plesk-eye {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #222;
    cursor: pointer;
    padding: 0;
}
.plesk-eye:hover { background: #f3e9e7; }
.plesk-eye svg { width: 16px; height: 16px; }
.plesk-eye-open { display: none; }
.plesk-eye.is-visible .plesk-eye-closed { display: none; }
.plesk-eye.is-visible .plesk-eye-open { display: block; }
.plesk-login-button {
    display: block;
    width: 100%;
    height: 40px;
    margin: 28px 0 0;
    padding: 12px 24px;
    border: 0;
    border-radius: 100px;
    background: var(--brand-600);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}
.plesk-login-button:hover { background: var(--brand-700); }
.plesk-login-button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.plesk-alert {
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px;
    background: rgba(182, 0, 0, .6);
    color: #fff;
    font-size: 12px;
    line-height: 1.45;
}
.plesk-alert-success { background: rgba(18, 155, 94, .6); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .plesk-card { background: rgba(42, 42, 42, .94); }
}

/* --------------------------------------------------------------------------
   Public subscription pages
   -------------------------------------------------------------------------- */
.public-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 34px 16px 50px;
    background:
        radial-gradient(720px 500px at 50% -10%, rgba(182, 0, 0, .12), transparent 62%),
        radial-gradient(500px 340px at 100% 100%, rgba(198, 147, 67, .08), transparent 60%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.public-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; color: var(--ink); }
.public-brand-logo { width: 226px; max-width: 100%; height: auto; display: block; }
.public-brand-caption { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.public-card { width: 100%; max-width: 480px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 22px 55px rgba(65, 24, 16, .12); overflow: hidden; }
.public-card-head { padding: 28px 30px 22px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, #fff8f7, #fff); }
.public-card-head h1 { font-size: 23px; font-weight: 780; letter-spacing: -.6px; }
.public-card-head p { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.6; }
.public-card-body { padding: 24px 30px 28px; }
.public-card .field { margin-bottom: 13px; }
.public-note { font-size: 11px; color: var(--muted-light); line-height: 1.6; margin-top: 14px; }
.public-success { text-align: center; padding: 12px 4px; }
.public-success .success-icon { width: 66px; height: 66px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; margin: 0 auto 16px; }
.public-success h2 { font-size: 21px; font-weight: 750; letter-spacing: -.4px; }
.public-success p { color: var(--muted); font-size: 13px; line-height: 1.65; margin-top: 8px; }
.public-footer { font-size: 10.5px; color: var(--muted-light); text-align: center; margin-top: 20px; max-width: 430px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */
.alert-list { display: flex; flex-direction: column; gap: 9px; }
.warning-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-soft); }
.warning-item .icon { flex: 0 0 auto; }
.warning-item a { margin-left: auto; font-size: 11.5px; font-weight: 650; }

.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-soft); font-weight: 550; word-break: break-word; }
.copy-field { display: flex; gap: 7px; align-items: center; }
.copy-field .input { font-size: 11.5px; background: #f8fafc; }



.design-frame { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

.help-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.help-box strong { color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Settings
   -------------------------------------------------------------------------- */
.settings-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.settings-head-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.settings-head-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--brand-600);
    background: linear-gradient(145deg, #fff8f7, #ffe4e2);
    border: 1px solid #ffe4e2;
}
.settings-head h2 { font-size: 20px; font-weight: 780; letter-spacing: -.45px; line-height: 1.2; }
.settings-head p { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.settings-head > .badge { margin-left: auto; }

.settings-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}
.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 9px;
    border-radius: 9px;
    color: var(--muted);
}
.settings-nav-item:hover { background: #f8fafc; color: var(--ink); }
.settings-nav-item.active { background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-100); }
.settings-nav-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #f1f5f9;
    color: var(--muted);
}
.settings-nav-item.active .settings-nav-icon { background: #fff; color: var(--brand-600); box-shadow: var(--shadow-xs); }
.settings-nav-text { display: flex; flex-direction: column; min-width: 0; }
.settings-nav-text strong { font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-nav-text small { font-size: 9.5px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-nav-item.active small { color: var(--brand-500); }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); gap: 16px; align-items: start; }
.settings-layout--single { grid-template-columns: 1fr; }
.settings-main,
.settings-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-form-card { overflow: hidden; }
.settings-panel-head { display: flex; align-items: flex-start; gap: 11px; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); }
.settings-panel-head h3 { font-size: 14.5px; font-weight: 700; letter-spacing: -.15px; }
.settings-panel-head p { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.settings-panel-head--compact { padding: 13px 16px; }
.settings-panel-head--compact h3 { font-size: 13.5px; }
.settings-panel-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--brand-50);
    color: var(--brand-600);
}
.settings-panel-icon--brand { background: #fff; border: 1px solid var(--brand-100); }
.settings-group-label { margin-bottom: 10px; font-size: 9.5px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; color: var(--muted-light); }
.settings-rule { height: 1px; background: var(--line-soft); margin: 16px 0; }
.settings-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: #f8fafc;
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.45;
}
.settings-note .icon { flex: 0 0 auto; margin-top: 1px; color: var(--brand-500); }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.settings-footer .btn { margin-left: auto; }

.email-footer-preview { border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 0; background: #fff; overflow: hidden; }
.efp-company { font-size: 12px; font-weight: 750; color: var(--ink); }
.efp-meta { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; font-size: 9.5px; color: var(--muted-light); line-height: 1.45; word-break: break-word; }
.efp-note { margin: 9px 0 0; padding-top: 9px; border-top: 1px solid var(--line-soft); font-size: 9.5px; color: var(--muted); line-height: 1.45; }
.efp-unsubscribe { margin: 10px -14px 0; padding: 8px 14px; background: #f8fafc; border-top: 1px solid var(--line-soft); color: var(--muted-light); font-size: 9px; text-decoration: underline; }

.settings-info-list { display: flex; flex-direction: column; gap: 11px; }
.settings-info-row { display: flex; align-items: flex-start; gap: 9px; }
.settings-info-icon { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; background: var(--success-soft); color: #067647; }
.settings-info-title { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.settings-info-row p { margin-top: 1px; font-size: 10px; color: var(--muted); line-height: 1.45; }
.settings-compliance-card { background: linear-gradient(135deg, #fff8f7 0%, #fff 70%); }
.settings-compliance-title { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.settings-compliance-card p { line-height: 1.55; }

/* --------------------------------------------------------------------------
   Campaign form
   -------------------------------------------------------------------------- */
.campaign-create-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; max-width: none; margin: 0 auto 16px; }
.campaign-create-head-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.campaign-create-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--brand-600);
    background: linear-gradient(145deg, #fff8f7, #ffe4e2);
    border: 1px solid #ffe4e2;
}
.campaign-create-head h2 { font-size: 20px; font-weight: 780; letter-spacing: -.45px; line-height: 1.2; }
.campaign-create-head p { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.campaign-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}
.campaign-step { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 0; background: none; border-radius: 7px; font-family: inherit; font-size: 10.5px; font-weight: 650; color: var(--muted-light); white-space: nowrap; cursor: pointer; }
.campaign-step b { width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; color: var(--muted); font-size: 9px; font-weight: 750; }
.campaign-step.active { background: var(--brand-50); color: var(--brand-700); }
.campaign-step.active b { background: var(--brand-600); color: #fff; }
.campaign-step-sep { width: 16px; height: 1px; background: var(--line); }
.edit-campaign-steps { width: max-content; max-width: 100%; margin: 0 auto 14px; }
.campaign-edit-attachments { max-width: none; margin: 0 auto; }
.campaign-edit-confirmation { max-width: none; margin: 0 auto; }

.campaign-form-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 16px; align-items: start; max-width: none; margin: 0 auto; }
.campaign-form-layout--single { grid-template-columns: minmax(0, 1fr); }
.campaign-form-card { position: relative; overflow: hidden; box-shadow: var(--shadow-sm); }
.campaign-form-section + .campaign-form-section { border-top: 1px solid var(--line-soft); }
.campaign-form-section-head { display: flex; align-items: flex-start; gap: 11px; flex-wrap: wrap; padding: 16px 20px 0; }
.campaign-form-section-head h3 { font-size: 14px; font-weight: 700; letter-spacing: -.15px; }
.campaign-form-section-head p { margin-top: 2px; font-size: 10.5px; color: var(--muted); }
.campaign-form-section-icon { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.campaign-form-section-body { padding: 14px 20px 18px; background: #f8fafc; }
.campaign-form-footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.campaign-form-footer-hint { margin-left: auto; font-size: 10px; color: var(--muted-light); }
@media (min-width: 901px) {
    .campaign-form-layout > .dash-col { position: sticky; top: 84px; }
}

.list-picker { position: relative; }
.list-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    font-family: inherit;
    font-size: 11.5px;
    text-align: left;
    cursor: pointer;
}
.list-picker-trigger:hover { border-color: var(--brand-200); }
.list-picker-trigger .icon { flex: 0 0 auto; color: var(--muted-light); }
.list-picker-trigger > .icon:last-child { margin-left: auto; }
.list-picker-trigger-icon { width: 24px; height: 24px; flex: 0 0 auto; border-radius: 6px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.list-picker-trigger-icon .icon { color: var(--brand-600); }
.list-picker-trigger-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-picker-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.list-picker-chips .chip { background: var(--brand-50); color: var(--brand-700); font-size: 14px; font-weight: 650; padding: 6px 13px; border-radius: 8px; }
.list-picker-panel { margin-top: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); }
.list-picker-search { position: relative; padding: 7px; border-bottom: 1px solid var(--line-soft); background: #f8fafc; }
.list-picker-search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted-light); }
.list-picker-search .input { height: 32px; min-height: 32px; padding-left: 30px; font-size: 11.5px; }
.list-picker-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 260px;
    overflow-y: auto;
}
.list-picker-option { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); cursor: pointer; }
.list-picker-option:nth-child(3n) { border-right: 0; }
.list-picker-option:hover { background: #fff8f7; }
.list-picker-option:has(input:checked) { background: var(--brand-50); }
.list-picker-option input { flex: 0 0 auto; accent-color: var(--brand-600); }
.list-picker-option-main { display: flex; flex-direction: column; min-width: 0; }
.list-picker-option-name { font-size: 11px; font-weight: 650; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-picker-option-meta { font-size: 9px; color: var(--muted-light); }
.list-picker-empty { grid-column: 1 / -1; padding: 14px; text-align: center; font-size: 10px; color: var(--muted); }
.list-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-top: 0; background: #f8fafc; font-size: 9.5px; color: var(--muted-light); }
@media (max-width: 900px) {
    .list-picker-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .list-picker-option:nth-child(3n) { border-right: 1px solid var(--line-soft); }
    .list-picker-option:nth-child(2n) { border-right: 0; }
}
@media (max-width: 600px) {
    .list-picker-options { grid-template-columns: minmax(0, 1fr); }
    .list-picker-option,
    .list-picker-option:nth-child(3n),
    .list-picker-option:nth-child(2n) { border-right: 0; }
}
.field-optional { font-weight: 500; color: var(--muted-light); }
.required-mark { margin-left: 2px; color: var(--brand-600); font-weight: 750; }
.list-picker-error { margin-top: 6px; font-size: 10px; font-weight: 600; color: var(--danger); }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-action { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid transparent; border-radius: 6px; background: var(--brand-50); color: var(--brand-700); font-family: inherit; font-size: 9.5px; font-weight: 650; cursor: pointer; white-space: nowrap; }
.field-action:hover { background: var(--brand-100); color: var(--brand-800); text-decoration: none; }
.new-sender-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--brand-100); border-radius: 10px; background: linear-gradient(135deg, #fff8f7 0%, #fff 75%); }
.new-sender-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.new-sender-head strong { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.new-sender-head span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.new-sender-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.new-sender-feedback { flex: 1; min-width: 160px; font-size: 9.5px; color: var(--muted-light); }
.new-sender-feedback.is-error { color: var(--danger); }
.new-sender-feedback.is-ok { color: #067647; }
.new-reply-panel { position: relative; margin-top: 6px; }
.new-reply-panel .input { padding-right: 34px; }
.new-reply-panel .icon-btn { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); }

.audience-estimate { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.audience-estimate-value { font-size: 30px; font-weight: 780; letter-spacing: -.8px; line-height: 1; }
.audience-estimate-label { font-size: 10.5px; color: var(--muted); }
.audience-facts { display: flex; flex-direction: column; }
.audience-fact { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.audience-fact:last-child { border-bottom: 0; }
.audience-fact span { font-size: 11.5px; color: var(--muted); }
.audience-fact strong { font-size: 15px; font-weight: 750; }
.audience-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #f8fafc; font-size: 9.5px; color: var(--muted); line-height: 1.45; }
.audience-note .icon { flex: 0 0 auto; margin-top: 1px; color: var(--brand-500); }
.campaign-audience-estimate { display: flex; align-items: baseline; gap: 5px; margin-left: auto; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.campaign-audience-estimate strong { font-size: 14px; font-weight: 750; color: var(--ink-soft); }
.campaign-audience-estimate span { font-size: 9px; color: var(--muted-light); }
.campaign-edit-risk { max-width: 1100px; margin-left: auto; margin-right: auto; }
.campaign-resume-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.campaign-resume-banner > div:nth-child(2) { flex: 1 1 240px; min-width: 0; }
.campaign-resume-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.attachment-drop { display: flex; align-items: center; justify-content: center; padding: 20px 16px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fff; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.attachment-drop:hover { border-color: var(--brand-300); background: #fff8f7; }
.attachment-drop.dragging { border-color: var(--brand-400); background: var(--brand-50); }
.attachment-drop input { display: none; }
.attachment-drop-text { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.attachment-drop-text strong { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.attachment-drop-text small { margin-top: 2px; font-size: 9.5px; color: var(--muted); line-height: 1.4; }
.attachment-selected { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.attachment-selected-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px; border: 1px solid var(--line-soft); border-radius: 6px; background: #f8fafc; font-size: 10.5px; color: var(--ink-soft); }
.attachment-selected-row span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-selected-row span:last-child { flex: 0 0 auto; color: var(--muted-light); }
.field-error { margin-top: 4px; font-size: 11px; font-weight: 550; color: var(--danger); }

.template-choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.template-search { position: relative; width: 230px; max-width: 100%; margin-left: auto; align-self: center; }
.template-search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted-light); }
.template-search .input { height: 34px; min-height: 34px; padding-left: 30px; font-size: 11.5px; }
.template-search-empty { padding: 26px 10px; text-align: center; font-size: 10.5px; color: var(--muted); }
.template-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.template-choice:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.template-choice:has(input:checked) { border-color: var(--brand-400); box-shadow: 0 0 0 2px var(--brand-100); }
.template-choice input { position: absolute; top: 8px; right: 8px; z-index: 2; width: 15px; height: 15px; accent-color: var(--brand-600); }
.template-choice-thumb { display: block; height: 112px; padding: 7px; overflow: hidden; background: #f1f5f9; }
.template-choice-thumb iframe { width: 640px; height: 640px; border: 0; border-radius: 5px; background: #fff; transform: scale(.32); transform-origin: top left; pointer-events: none; }
.template-choice-body { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-top: 1px solid var(--line-soft); }
.template-choice-name { font-size: 11px; font-weight: 650; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.template-choice-meta { font-size: 9px; color: var(--muted-light); }
.template-choice--blank { border-style: dashed; background: linear-gradient(160deg, #fff8f7, #fff); }
.template-choice-blank { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 152px; padding: 14px; text-align: center; }
.template-choice-blank-icon { width: 38px; height: 38px; margin-bottom: 3px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.template-choice-blank-title { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.template-choice-blank-sub { font-size: 9px; color: var(--muted-light); }

.template-switch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.template-switch-copy { display: flex; flex-direction: column; gap: 1px; margin-right: auto; min-width: 180px; }
.template-switch-copy strong { font-size: 11.5px; font-weight: 700; }
.template-switch-copy span { font-size: 10px; color: var(--muted); }
.template-switch .select { width: 240px; max-width: 100%; }
@media (max-width: 640px) {
    .template-switch .select, .template-switch .btn { width: 100%; }
}
.template-selected { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.template-selected-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.template-selected-kicker { display: block; font-size: 8px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; color: var(--muted-light); }
.template-selected-name { display: block; margin-top: 1px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.template-selected-meta { display: block; margin-top: 1px; font-size: 9.5px; color: var(--muted); }
.template-selected-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.template-selected-actions .btn { flex: 0 0 auto; }
.template-selected-frame { position: relative; height: 230px; padding: 10px; background: #f1f5f9; }
.template-selected-iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; }
.template-selected-blank { position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px dashed var(--line); border-radius: 6px; background: #fff; text-align: center; color: var(--muted); }
.template-selected-blank-icon { width: 46px; height: 46px; margin-bottom: 3px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.template-selected-blank strong { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.template-selected-blank small { max-width: 260px; font-size: 9.5px; color: var(--muted); }

.campaign-confirm-banner { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #d1fadf; border-radius: 10px; background: #f6fef9; }
.campaign-confirm-icon { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: #ecfdf3; color: #067647; }
.campaign-confirm-banner strong { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.campaign-confirm-banner p { margin-top: 2px; font-size: 10px; color: var(--muted); line-height: 1.45; }
.campaign-confirm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.campaign-summary-block { padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0; }
.campaign-summary-block--wide { grid-column: 1 / -1; }
.campaign-summary-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.campaign-summary-icon { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); }
.campaign-summary-head h4 { font-size: 11px; font-weight: 700; color: var(--ink-soft); }
.campaign-summary-attachments { margin-left: auto; font-size: 9.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.campaign-summary-head .campaign-summary-attachments + .summary-edit { margin-left: 10px; }
.summary-edit { margin-left: auto; padding: 0; border: 0; background: none; color: var(--brand-600); font-family: inherit; font-size: 9.5px; font-weight: 650; cursor: pointer; }
.summary-edit:hover { color: var(--brand-700); text-decoration: underline; }
.campaign-summary-dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 10.5px; }
.campaign-summary-dl dt { color: var(--muted); }
.campaign-summary-dl dd { margin: 0; color: var(--ink-soft); font-weight: 600; word-break: break-word; }
.campaign-summary-lists { display: flex; flex-wrap: wrap; gap: 4px; }
.campaign-summary-lists .chip { background: var(--brand-50); color: var(--brand-700); font-size: 9.5px; }
.campaign-summary-empty { font-size: 10px; color: var(--muted-light); }
.campaign-summary-count { margin-top: 6px; font-size: 9.5px; color: var(--muted-light); }
.campaign-summary-emails { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.campaign-summary-emails-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 9px; font-weight: 750; letter-spacing: .4px; text-transform: uppercase; color: var(--muted-light); }
.campaign-summary-emails-head [data-summary-audience-count] { font-size: 9.5px; font-weight: 650; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.campaign-summary-emails-list { display: flex; flex-wrap: wrap; gap: 4px; max-height: 116px; overflow-y: auto; padding-right: 3px; }
.campaign-summary-emails-search { position: relative; margin-bottom: 7px; }
.campaign-summary-emails-search svg { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--muted-light); pointer-events: none; }
.campaign-summary-emails-search .input { height: 30px; padding: 5px 8px 5px 27px; font-size: 10.5px; border-radius: 7px; }
.campaign-summary-email { padding: 3px 7px; border: 1px solid #eef0f3; border-radius: 999px; background: #f8fafc; color: #475467; font-size: 9.5px; line-height: 1.5; word-break: break-all; }
.campaign-summary-emails-more { flex: 0 0 100%; margin-top: 3px; font-size: 9.5px; color: var(--muted-light); }
.campaign-summary-template { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.campaign-summary-template-meta { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); line-height: 1.4; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1400px) {
    .hide-lg { display: none !important; }
}

@media (max-width: 1100px) {
    .hide-md { display: none !important; }
}

@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid--dash { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .reports-layout { grid-template-columns: minmax(0, 1.55fr) minmax(270px, .78fr); }
    .form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .template-thumb-wrap { height: 160px; padding: 8px; }
    .template-thumb-wrap::after { inset: 8px; }
    .template-category { top: 14px; right: 14px; padding: 4px 9px; font-size: 8px; }
    .template-body { padding: 9px 12px 11px; }
    .template-name { font-size: 13.5px; }
    .template-meta { font-size: 10.5px; }
    .template-company { align-items: center; flex-direction: row; flex-wrap: wrap; gap: 3px; }
    .template-company .company-pill,
    .template-company .entity-user { max-width: 96px; padding: 2px 5px; font-size: 8px; }
    .template-company .company-pill { padding: 1px 5px; }
    .template-actions .btn { height: 27px; padding: 0 8px; font-size: 10px; }
}

@media (max-width: 1024px) {
    :root { --sidebar-w: 264px; }
    .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(16,24,40,.18); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(16,24,40,.45); }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar-brand-mobile { display: block; }
    .topbar { padding: 0 18px; }
    .topbar-title h1 { font-size: 16.5px; }
    .topbar-title p { display: none; }
    .topbar-user-name small { display: none; }
    .topbar-user-name strong { max-width: 120px; }
    .content { padding: 20px 18px 60px; }
    .dash-grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .9fr); }
    .dash-bottom-grid { grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); }
    .hero-watermark { opacity: .04; }
}

@media (min-width: 1025px) {
    .sidebar { transition: none; }
}

@media (max-width: 900px) {
    .stat-grid--dash { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .dash-grid, .dash-bottom-grid { grid-template-columns: 1fr; }
    .dash-grid { display: flex; flex-direction: column; }
    .report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reports-layout { grid-template-columns: 1fr; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .campaign-detail-grid { grid-template-columns: 1fr; }
    .campaign-results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .campaign-result { border-top: 1px solid var(--line-soft); }
    .campaign-result:nth-child(-n+3) { border-top: 0; }
    .campaign-result:nth-child(3n+1) { border-left: 0; }
    .campaign-form-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat-grid--dash { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .campaign-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audience-filters .input-with-icon { max-width: none; }
    .audience-count { width: 100%; margin-left: 0; }
    .bulk-hint { width: 100%; margin-left: 0; }
    .lists-search .input-with-icon { max-width: none; }
    .lists-count { width: 100%; margin-left: 0; }
    .campaign-create-head { gap: 12px; }
    .campaign-steps { width: 100%; margin-left: 0; }
    .campaign-form-section-head { padding: 16px 16px 0; }
    .campaign-form-section-body { padding: 14px 16px 16px; }
    .campaign-form-footer-hint { width: 100%; order: 3; margin-left: 0; }
    .template-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .template-search { width: 100%; margin-left: 0; margin-top: 4px; align-self: flex-start; }
    .campaign-summary-grid { grid-template-columns: 1fr; }
    .campaign-confirm-grid { grid-template-columns: 1fr; }
    .campaign-summary-block--wide { grid-column: auto; }
    .page-heading-actions { width: 100%; margin-left: 0; }
    .campaign-actions { width: 100%; margin-left: 0; }
    .campaign-overview-head { padding: 16px; }
    .campaign-overview-info h2 { font-size: 21px; }
    .campaign-overview-actions { width: 100%; margin-left: 0; justify-content: flex-start; }
    .campaign-overview-progress { padding: 14px 16px; gap: 14px; }
    .campaign-empty-block--chart { min-height: 150px; }
    .hide-sm { display: none !important; }
    .hero { padding: 24px 22px; }
    .hero h2 { font-size: 22px; }
    .hero-metrics { gap: 18px; }
    .hero-metrics--cards { width: 100%; gap: 9px; }
    .hero-metrics--cards .hero-metric { flex: 1 1 30%; min-width: 0; }
    .chart-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 13px; }
    .chart-summary-item:nth-child(odd) { padding-left: 0; border-left: 0; }
    .chart-summary-item:nth-child(even) { border-left: 1px solid var(--line-soft); }
    .check-grid { grid-template-columns: 1fr; }
    .kv { grid-template-columns: 1fr; gap: 3px; }
    .kv dt { margin-top: 6px; }
    .card-pad { padding: 17px; }
    .card-body { padding: 16px; }
    .modal-panel { margin: 14px auto; max-height: calc(100vh - 28px); }
    .topbar-actions .btn span { display: none; }
    .topbar-actions .btn { padding: 0 11px; }
    .public-card-head, .public-card-body { padding-left: 21px; padding-right: 21px; }
}

@media (max-width: 520px) {
    .hero-metrics--cards .hero-metric { flex: 1 1 100%; }
    .stat-grid--dash { grid-template-columns: 1fr !important; }
    .campaign-summary-grid { grid-template-columns: 1fr; }
    .template-grid { grid-template-columns: 1fr; }
    .report-stats { grid-template-columns: 1fr; }
    .campaign-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .campaign-result { border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
    .campaign-result:nth-child(-n+2) { border-top: 0; }
    .campaign-result:nth-child(2n+1) { border-left: 0; }
    .campaign-search .input-with-icon { max-width: none; }
    .plesk-login { padding: 12px; }
    .plesk-card { max-width: calc(100vw - 20px); }
    .plesk-card-header { padding: 20px 22px 17px; }
    .plesk-card-body { padding: 20px 22px 36px; }
    .plesk-tagline { font-size: 8.5px; letter-spacing: 1.7px; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .filters .search { min-width: 100%; }
    .filters .select { flex: 1; }
    .pagination-wrap { justify-content: center; }
    .toast-stack { left: 12px; right: 12px; bottom: 12px; }
    .campaign-head h2 { font-size: 20px; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .no-print, .toast-stack, .sidebar-backdrop { display: none !important; }
    .main { margin-left: 0; }
    .content { padding: 0; max-width: 100%; }
    .card { box-shadow: none; border-color: #ddd; }
    .print-only { display: block !important; }
}
.print-only { display: none; }

/* --------------------------------------------------------------------------
   Settings · Empresas (multiempresa)
   -------------------------------------------------------------------------- */
.company-page-heading { align-items: flex-end; }
.company-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
    padding: 4px 9px;
    border: 1px solid var(--brand-100);
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: 9.5px;
    font-weight: 750;
    letter-spacing: .55px;
    text-transform: uppercase;
}
.company-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}
.company-stat {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}
.company-stat-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.company-stat-icon.tone-violet { background: #f4f0ff; color: #7c3aed; }
.company-stat-icon.tone-info { background: var(--info-soft); color: var(--info); }
.company-stat-icon.tone-success { background: var(--success-soft); color: var(--success); }
.company-stat-label {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--muted);
}
.company-stat strong {
    display: block;
    margin-top: 1px;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -.5px;
}
.company-stat small {
    display: block;
    margin-top: 1px;
    font-size: 10px;
    color: var(--muted-light);
}
.company-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-xs);
}
.company-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 260px;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
}
.company-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
}
.company-status-filter { width: auto; min-width: 132px; height: 34px; font-size: 12px; }
.company-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.company-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 11px;
    overflow: hidden;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-xs);
    transition: box-shadow .16s ease, border-color .16s ease;
}
.company-card::before {
    content: none;
}
.company-card:hover {
    transform: none;
    border-color: #cbd5e1;
    box-shadow: var(--shadow-sm);
}
.company-card--inactive { opacity: .74; }
.company-card-top { display: flex; align-items: flex-start; gap: 8px; }
.company-card-id { flex: 1; min-width: 0; }
.company-card-name {
    margin: 1px 0 3px;
    overflow: hidden;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.company-card-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}
.company-card-metric {
    padding: 0 2px;
    border-left: 1px solid var(--line-soft);
    text-align: center;
    min-width: 0;
}
.company-card-metric:first-child { border-left: 0; }
.company-card-metric strong {
    display: block;
    font-size: 16px;
    letter-spacing: -.35px;
    line-height: 1.2;
}
.company-card-metric span {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--muted);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.company-card-users {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}
.company-card-users-label {
    color: var(--muted);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: .45px;
    text-transform: uppercase;
}
.company-user-list { display: flex; flex-direction: column; gap: 3px; }
.company-user-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--ink-soft);
    font-size: 10.5px;
}
.company-user-chip:hover { color: var(--brand-600); }
.company-user-chip-name { flex: 0 1 auto; overflow: hidden; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.company-user-chip-email { flex: 1 1 auto; overflow: hidden; color: var(--muted-light); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.company-user-more { padding-left: 0; color: var(--muted); font-size: 9.5px; }
.company-card-users-empty { color: var(--muted-light); font-size: 10px; font-style: italic; }
.company-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}
.company-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted-light);
    font-size: 10px;
}
.company-card-actions { display: flex; align-items: center; gap: 6px; }
.company-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
}
.company-pill .icon { color: var(--brand-600); }
a.company-pill:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.company-pill--global { background: #f8fafc; border-color: var(--line); color: var(--muted); }
.company-pill--global .icon { color: var(--muted-light); }
.company-user-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.company-user-stack--inline { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px; }
.entity-user {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 130px;
    overflow: hidden;
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--brand-50);
    color: var(--brand-600);
    font-size: 8.5px;
    font-weight: 650;
    line-height: 1.3;
    white-space: nowrap;
}
.entity-user .icon { width: 8px; height: 8px; flex: 0 0 auto; opacity: .8; }
.entity-user > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entity-user--system { background: var(--line-soft); color: var(--muted); }
.list-company { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.list-company .company-pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 6px; font-size: 8.5px; line-height: 1.3; }
.template-company { display: flex; align-items: center; flex-direction: row; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.template-category-chip { display: inline-flex; align-items: center; padding: 1px 5px; border: 1px solid var(--brand-100); border-radius: 5px; background: var(--brand-50); color: var(--brand-700); font-size: 8px; font-weight: 700; letter-spacing: .4px; line-height: 1.3; text-transform: uppercase; white-space: nowrap; }
.template-company .company-pill,
.template-company .entity-user { max-width: 96px; padding: 2px 5px; font-size: 8px; }
.template-company .company-pill { padding: 1px 5px; }
.template-company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-empty { max-width: 640px; margin: 0 auto; }
.company-pagination { margin-top: 16px; }
.company-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(290px, .9fr);
    gap: 16px;
    align-items: start;
}
.user-form-card { overflow: hidden; }
.user-form-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fff8f7 0%, #fff 55%, #f8fafc 100%);
    border-bottom: 1px solid var(--line-soft);
}
.user-form-avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .4px;
    box-shadow: 0 8px 18px rgba(182, 0, 0, .18);
}
.user-form-avatar--empty { background: #f1f5f9; color: var(--muted); box-shadow: none; }
.user-form-identity { min-width: 0; flex: 1; }
.user-form-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-form-name-row h3 { font-size: 16px; font-weight: 750; letter-spacing: -.2px; }
.user-form-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 5px; font-size: 11px; color: var(--muted); }
.user-form-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-form-meta .icon { color: var(--muted-light); flex: 0 0 auto; }
@media (max-width: 600px) {
    .user-form-hero { align-items: flex-start; padding: 16px; }
    .user-form-avatar { width: 46px; height: 46px; border-radius: 12px; font-size: 15px; }
    .user-form-meta { gap: 6px 10px; }
}
.company-form-card { overflow: hidden; }
.company-form-heading { display: flex; align-items: center; gap: 10px; }
.company-form-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.company-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 13px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #f8fafc;
}
.company-status-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.company-status-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: #fff;
    color: var(--brand-600);
}
.company-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.company-form-footer > .flex { margin-left: auto; }
.company-help-heading { display: flex; align-items: center; gap: 9px; min-width: 0; }
.company-help-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.company-help-heading h3 { display: flex; align-items: center; gap: 6px; margin: 0; }
.company-help-heading .tiny { margin-top: 1px; }
.company-help-card .card-header h3 { display: flex; align-items: center; gap: 7px; }
.company-help-list { display: flex; flex-direction: column; gap: 13px; }
.company-help-item { display: flex; align-items: flex-start; gap: 10px; }
.company-help-item > span {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.company-help-item strong { display: block; font-size: 11.5px; color: var(--ink-soft); }
.company-help-item small { display: block; margin-top: 1px; font-size: 10.5px; line-height: 1.45; color: var(--muted); }
.company-server-list { display: flex; flex-direction: column; gap: 6px; }
.company-server-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #f8fafc; transition: border-color .14s, background .14s; }
.company-server-row:hover { border-color: #cbd5e1; background: #fff; }
.company-server-icon { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line-soft); border-radius: 7px; background: #fff; color: var(--brand-600); }
.company-server-info { flex: 1; min-width: 0; }
.company-server-info strong { display: block; overflow: hidden; font-size: 11.5px; font-weight: 650; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.company-server-info small { display: block; margin-top: 1px; font-size: 9.5px; color: var(--muted-light); }
.company-server-row .btn { flex: 0 0 auto; }
.company-member-chevron { display: inline-flex; flex: 0 0 auto; color: var(--muted-light); }
.company-member-list { display: flex; flex-direction: column; gap: 4px; }
.company-member-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--ink-soft);
    transition: background .14s, border-color .14s;
}
.company-member-row:hover { background: #f8fafc; border-color: var(--line-soft); color: var(--ink); }
.company-member-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.company-member-info strong { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.company-member-info small { overflow: hidden; color: var(--muted-light); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.company-member-empty { color: var(--muted); font-size: 11px; }
.company-mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.company-mini-stats > div {
    padding: 10px 11px;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: #f8fafc;
    text-align: center;
}
.company-mini-stats strong { display: block; font-size: 19px; line-height: 1.2; letter-spacing: -.4px; }
.company-mini-stats span { display: block; margin-top: 2px; font-size: 9px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; color: var(--muted); }

@media (max-width: 860px) {
    .company-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .company-status-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 860px) {
    .company-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .company-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Resúmenes · mismo estilo que las tarjetas del panel */
.campaign-summary-card,
.report-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-height: 112px;
    padding: 14px 18px 12px;
    overflow: hidden;
    border-radius: 10px;
}
.campaign-summary-card::before,
.report-stat::before {
    content: none;
}
.report-stat::before { content: none; }
.campaign-summary-card:hover,
.report-stat:hover { transform: none; border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.campaign-summary-card .summary-icon,
.report-stat-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--brand-600);
}
.campaign-summary-card .summary-icon.amber { background: none; color: var(--warning); }
.campaign-summary-card .summary-icon.green { background: none; color: var(--success); }
.campaign-summary-card .summary-icon.violet { background: none; color: var(--brand-600); }
.report-stat-icon { background: none; color: var(--tone); }
.campaign-summary-card .summary-icon svg,
.report-stat-icon svg { width: 40px; height: 40px; opacity: .32; }
.campaign-summary-card .summary-content,
.report-stat-body { width: 100%; padding-right: 58px; }
.campaign-summary-card .summary-label,
.report-stat-label {
    font-size: 12px;
    font-weight: 550;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}
.campaign-summary-card .summary-value,
.report-stat-value {
    margin-top: 2px;
    font-size: 31px;
    font-weight: 780;
    letter-spacing: -.7px;
    line-height: 1.05;
}
.campaign-summary-card .summary-meta,
.report-stat-meta { margin-top: 5px; font-size: 11px; }

/* Servidores de correo · listado en 3 columnas */
.email-servers-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.email-servers-grid .card { min-width: 0; display: flex; flex-direction: column; }
.email-servers-grid .card-footer { margin-top: auto; }
.email-servers-grid .card-header { padding: 15px 16px; }
.email-servers-grid .card-header h3 { font-size: 13.5px; }
.email-servers-grid .card-body { padding: 16px; }
.email-servers-grid .card-footer { padding: 13px 16px; }
.email-servers-grid .kv { grid-template-columns: 92px minmax(0, 1fr); gap: 8px 10px; font-size: 11.5px; }
.email-servers-grid .kv dd { overflow-wrap: anywhere; }
@media (max-width: 1024px) {
    .email-servers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .email-servers-grid { grid-template-columns: 1fr; }
}

/* Servidor de correo · tarjetas del formulario */
.server-form-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 16px; align-items: start; }
.server-form-full { grid-column: 1 / -1; }
@media (max-width: 900px) {
    .server-form-grid { grid-template-columns: 1fr; }
}
.server-card-header { align-items: center; flex-wrap: wrap; }
.server-header-badges { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.server-switch-stack { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: #f8fafc; }
.server-switch-stack .switch { margin: 0; }
.server-card-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--brand-50);
    color: var(--brand-600);
}
.server-default-card { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.server-default-card .server-card-icon { width: 30px; height: 30px; }
.server-default-copy { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.server-default-copy strong { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.server-default-copy span { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-default-link { margin-left: auto; font-size: 10.5px; font-weight: 650; color: var(--brand-600); text-decoration: none; }
.server-default-link:hover { text-decoration: underline; }
.server-form-actions { margin-top: 16px; border-radius: 10px; }

/* Iconos de resumen · color corporativo */
.stat-card--dash .stat-art,
.stat-card--dash:nth-child(3) .stat-art,
.stat-card--dash:nth-child(4) .stat-art,
.campaign-summary-card .summary-icon,
.campaign-summary-card .summary-icon.amber,
.campaign-summary-card .summary-icon.green,
.campaign-summary-card .summary-icon.violet,
.report-stat-icon,
.company-stat-icon,
.company-stat-icon.tone-violet,
.company-stat-icon.tone-info,
.company-stat-icon.tone-success,
.stat-grid:not(.stat-grid--dash) .stat-icon {
    color: var(--brand-600);
}

/* Resúmenes secundarios · mismo lenguaje visual */
.company-stat,
.stat-grid:not(.stat-grid--dash) .stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    min-height: 112px;
    padding: 14px 18px 12px;
    overflow: hidden;
    border-radius: 10px;
}
.company-stat::before,
.stat-grid:not(.stat-grid--dash) .stat-card::before {
    content: none;
}
.company-stat-icon,
.stat-grid:not(.stat-grid--dash) .stat-icon {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: var(--brand-600);
}
.company-stat-icon.tone-violet { background: none; color: #7c3aed; }
.company-stat-icon.tone-info { background: none; color: var(--info); }
.company-stat-icon.tone-success { background: none; color: var(--success); }
.company-stat-icon svg,
.stat-grid:not(.stat-grid--dash) .stat-icon svg { width: 44px; height: 44px; opacity: .32; }
.company-stat > div,
.stat-grid:not(.stat-grid--dash) .stat-card > div { width: 100%; padding-right: 74px; }
.company-stat-label {
    font-size: 12px;
    font-weight: 550;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}
.company-stat strong { margin-top: 2px; font-size: 31px; line-height: 1.05; letter-spacing: -.7px; }
.company-stat small { margin-top: 5px; font-size: 11px; color: var(--muted-light); }
.stat-grid:not(.stat-grid--dash) .stat-label { font-size: 12px; font-weight: 550; }
.stat-grid:not(.stat-grid--dash) .stat-value { margin-top: 2px; font-size: 31px; line-height: 1.05; letter-spacing: -.7px; }
.stat-grid:not(.stat-grid--dash) .stat-meta { margin-top: 5px; font-size: 11px; }
@media (max-width: 640px) {
    .company-stats { grid-template-columns: 1fr; }
    .company-grid { grid-template-columns: 1fr; }
    .company-toolbar .btn, .company-status-filter { flex: 1 1 auto; }
    .company-search { flex: 1 1 100%; }
    .company-card-footer { align-items: flex-start; flex-direction: column; }
    .company-card-actions { width: 100%; }
    .company-card-actions .btn { flex: 1; justify-content: center; }
}

/* --------------------------------------------------------------------------
   Techwind · acabado visual global
   -------------------------------------------------------------------------- */
.settings-nav-item { border-radius: 8px; }
.settings-nav-item:hover { background: #f8fafc; }
.settings-nav-icon { background: #f1f5f9; }
.settings-nav-item.active .settings-nav-icon { box-shadow: none; }
.campaign-tabs { border-radius: 8px; background: #f1f5f9; }
.campaign-tabs .tab { border-radius: 6px; }
.segmented { border-radius: 8px; background: #f1f5f9; }
.segmented a { border-radius: 6px; }
.campaign-step { border-radius: 6px; }
.campaign-step b { background: #f1f5f9; }
.template-toolbar,
.audience-toolbar,
.company-toolbar { box-shadow: none; }
.card-header h3,
.settings-panel-head h3,
.campaign-form-section-head h3 { letter-spacing: -.1px; }

/* La página pública conserva el cálido de marca */
.public-page {
    background:
        radial-gradient(720px 500px at 50% -10%, rgba(182, 0, 0, .12), transparent 62%),
        radial-gradient(500px 340px at 100% 100%, rgba(198, 147, 67, .08), transparent 60%),
        linear-gradient(180deg, #fbf8f6 0%, #f4edeb 100%);
}
.public-card-head { background: linear-gradient(180deg, #fff8f6, #fff); }

/* Barras de búsqueda y filtros */
.campaign-search { gap: 8px; }
.campaign-search .input,
.filters .input {
    height: 36px;
    min-height: 36px;
    border-color: #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 12.5px;
}
.campaign-search .select,
.filters .select {
    height: 36px;
    min-height: 36px;
    border-color: #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 12.5px;
}
.campaign-search .input:hover,
.campaign-search .select:hover,
.filters .input:hover,
.filters .select:hover { border-color: #cbd5e1; }
.campaign-search .input:focus,
.campaign-search .select:focus,
.filters .input:focus,
.filters .select:focus { background-color: #fff; }
.campaign-search .btn-sm,
.filters .btn-sm { height: 36px; padding: 0 14px; border-radius: 8px; }
.campaign-search .input-with-icon > .icon,
.filters .input-with-icon > .icon { color: var(--brand-500); }
.campaign-search > button[type="submit"].btn-secondary,
.company-toolbar > button[type="submit"].btn-secondary,
.filters > button[type="submit"].btn-secondary {
    background: var(--brand-50);
    border-color: var(--brand-200);
    color: var(--brand-700);
}
.campaign-search > button[type="submit"].btn-secondary:hover,
.company-toolbar > button[type="submit"].btn-secondary:hover,
.filters > button[type="submit"].btn-secondary:hover {
    background: var(--brand-100);
    border-color: var(--brand-300);
    color: var(--brand-800);
}
.template-toolbar,
.audience-toolbar,
.lists-toolbar,
.company-toolbar { padding: 10px 12px; border-radius: 10px; }
.campaign-toolbar-count,
.template-count,
.lists-count,
.audience-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
}
.company-search { border-radius: 8px; background: #f8fafc; }
.company-search:hover { border-color: #cbd5e1; }

/* Iconos de resumen siempre en rojo corporativo */
.company-stat-icon,
.company-stat-icon.tone-violet,
.company-stat-icon.tone-info,
.company-stat-icon.tone-success,
.stat-grid:not(.stat-grid--dash) .stat-icon,
.campaign-summary-card .summary-icon,
.campaign-summary-card .summary-icon.amber,
.campaign-summary-card .summary-icon.green,
.campaign-summary-card .summary-icon.violet,
.report-stat-icon,
.stat-card--dash .stat-art,
.stat-card--dash:nth-child(3) .stat-art,
.stat-card--dash:nth-child(4) .stat-art {
    color: var(--brand-600) !important;
}

/* Cuota de envío · panel */
.sending-quota-card { margin-bottom: 16px; }
.sending-quota-card .card-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; }
.sending-quota-main { display: flex; align-items: center; gap: 10px; flex: 1 1 300px; min-width: 0; }
.sending-quota-icon { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--brand-50); color: var(--brand-600); }
.sending-quota-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.sending-quota-meter { flex: 0 1 320px; min-width: 200px; }
.sending-quota-values { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 11.5px; color: var(--muted); }
.sending-quota-values strong { font-size: 14px; color: var(--ink); }
.sending-quota-unlimited { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) {
    .sending-quota-meter { flex: 1 1 100%; min-width: 0; }
    .sending-quota-unlimited { justify-content: flex-start; }
}

/* Registros de entrega */

.delivery-card .campaign-toolbar { border-bottom: 1px solid var(--line-soft); }
.delivery-card .campaign-search .input-with-icon { max-width: 300px; }
.delivery-card .campaign-status-select { min-width: 140px; }
.delivery-live-time { color: var(--muted-light); }
.delivery-table td { padding-top: 10px; padding-bottom: 10px; }
.delivery-table th,
.delivery-table td { padding-left: 6px; padding-right: 6px; }
.delivery-table .delivery-campaign { display: block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-table .delivery-email { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-error { max-width: 240px; overflow: hidden; font-size: 10.5px; color: var(--danger); line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.delivery-company-cell .company-pill { max-width: 130px; }
.delivery-company-cell .delivery-company-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delivery-company-cell .entity-user { max-width: 130px; }
.delivery-status-cell .delivery-error { max-width: 100%; white-space: normal; }

@media (min-width: 761px) {
    .delivery-table { table-layout: fixed; }
    .delivery-table th:nth-child(1), .delivery-table td:nth-child(1) { width: 15%; }
    .delivery-table th:nth-child(2), .delivery-table td:nth-child(2) { width: 17%; }
    .delivery-table th:nth-child(3), .delivery-table td:nth-child(3) { width: 22%; }
    .delivery-table th:nth-child(4), .delivery-table td:nth-child(4) { width: 17%; }
    .delivery-table th:nth-child(5), .delivery-table td:nth-child(5) { width: 29%; }
    .delivery-table .delivery-campaign,
    .delivery-table .delivery-email,
    .delivery-error,
    .delivery-company-cell .company-pill,
    .delivery-company-cell .entity-user { max-width: 100%; }
}
@media (max-width: 760px) {
    .delivery-card .campaign-status-select { width: 100%; min-width: 0; }
    .delivery-table .delivery-campaign,
    .delivery-table .delivery-email { max-width: 170px; }
    .delivery-error { max-width: 200px; }
}

.live-filter-spinner {
    display: none;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border: 2px solid #e2e8f0;
    border-top-color: var(--brand-600);
    border-radius: 50%;
    animation: live-filter-spin .7s linear infinite;
}
form.is-loading .live-filter-spinner { display: inline-block; }
[data-live-results].is-loading,
[data-live-stats].is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
@keyframes live-filter-spin { to { transform: rotate(360deg); } }

.select.per-page-select {
    width: 64px;
    min-width: 64px;
    height: 32px;
    min-height: 32px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0 6px 0 8px;
    border-radius: 8px;
    border-color: #e2e8f0;
    background-color: #fff;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 650;
    box-shadow: var(--shadow-xs);
}
.select.per-page-select:hover { border-color: #cbd5e1; background-color: #fff; }
.select.per-page-select:focus { border-color: var(--brand-300); background-color: #fff; box-shadow: 0 0 0 3px var(--brand-50); }
@media (max-width: 640px) {
    .select.per-page-select { margin-left: 0; }
}

/* Modal action progress */
.action-progress { height: 3px; margin: 0 22px; overflow: hidden; background: #f1f5f9; }
.action-progress span { display: block; width: 34%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-600), var(--brand-400)); animation: action-progress-slide 1.05s ease-in-out infinite; }
@keyframes action-progress-slide {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(320%); }
}

@media (max-width: 1024px) {
    .topbar-user { padding: 4px; }
}

@media (max-width: 760px) {
    .topbar { height: 60px; padding: 0 14px; gap: 8px; }
    .topbar-title h1 { font-size: 16px; }
    .topbar-divider { display: none; }
    .content { padding: 16px 14px 56px; }
    .card-header { padding: 14px 15px; }
    .card-body { padding: 15px; }
    .card-footer { padding: 12px 15px; }
    .stat-card { padding: 15px; }
    .stat-card--dash { padding: 14px 16px 9px; }
    .stat-card--dash .stat-value { font-size: 29px; }
}

@media (max-width: 700px) {
    .topbar {
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
        padding: 9px 14px 8px;
        row-gap: 6px;
    }
    .topbar-title { flex: 1 1 auto; }
    .topbar-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-actions {
        width: 100%;
        margin-left: 0;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .topbar-actions::-webkit-scrollbar { height: 0; }
    .topbar-actions > * { flex: 0 0 auto; }
    .topbar-actions .btn { height: 32px; }
    .topbar-actions .topbar-user { margin-left: auto; }
}

@media (max-width: 520px) {
    .topbar-brand-mobile { display: none; }
    .btn { height: 36px; }
    .btn-sm { height: 31px; }
    .campaigns-page-table th,
    .campaigns-page-table td { padding-left: 8px; padding-right: 8px; }
    .campaigns-page-table .cell-main,
    .campaigns-page-table .cell-sub { max-width: 168px; }
    .campaigns-page-table .campaign-tile { width: 28px; height: 28px; }
    .campaigns-page-table .cell-with-avatar { gap: 8px; }
    .campaigns-page-table .badge { padding: 3px 7px; font-size: 10px; }
}



/* --------------------------------------------------------------------------
   Campaign create/edit: compact layout
   -------------------------------------------------------------------------- */
.campaign-create-head { margin-bottom: 10px; }
.campaign-create-head h2 { font-size: 17px; }
.campaign-create-head p { font-size: 10.5px; margin-top: 1px; }
.campaign-create-icon { width: 34px; height: 34px; border-radius: 10px; }
.campaign-step { padding: 4px 8px; font-size: 10px; }
.campaign-step b { width: 16px; height: 16px; font-size: 8.5px; }

.campaign-form-card .campaign-form-section-head { padding: 11px 16px 0; gap: 9px; align-items: center; }
.campaign-form-card .campaign-form-section-icon { width: 28px; height: 28px; border-radius: 8px; }
.campaign-form-card .campaign-form-section-head h3 { font-size: 13px; }
.campaign-form-card .campaign-form-section-head p { margin-top: 1px; font-size: 10px; }
.campaign-form-card .campaign-form-section-body { padding: 9px 16px 12px; }
.campaign-form-card .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.campaign-form-card .field { gap: 4px; }
.campaign-form-card .field > label { font-size: 11.5px; }
.campaign-form-card .field .hint { font-size: 10px; line-height: 1.3; }
.campaign-form-card .input,
.campaign-form-card .select { min-height: 33px; font-size: 12.5px; border-radius: 8px; }
.campaign-form-card .field > .input,
.campaign-form-card .field > .select { padding: 6px 10px; }
.campaign-form-card .list-picker-trigger { min-height: 33px; padding: 5px 10px; border-radius: 8px; font-size: 11.5px; }
.campaign-form-card .list-picker-chips .chip { font-size: 11.5px; padding: 4px 9px; border-radius: 7px; }
.campaign-form-card .card-footer { padding: 9px 16px; }

.schedule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.schedule-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 11.5px; font-weight: 650; color: var(--ink-soft); cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
.schedule-toggle:hover { border-color: var(--brand-200); }
.schedule-toggle:has(input:checked) { border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); }
.schedule-toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand-600); }
.schedule-fields { display: inline-flex; align-items: center; gap: 8px; }
.schedule-fields .input { min-height: 32px; width: 210px; }
.schedule-preview { font-size: 10.5px; color: var(--muted-light); }
.schedule-preview.is-on { color: var(--brand-700); font-weight: 650; }

@media (max-width: 900px) {
    .campaign-form-card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .campaign-form-card .form-grid { grid-template-columns: minmax(0, 1fr); }
}
.campaign-form-card .list-picker-search .input { padding-left: 34px; }

/* --------------------------------------------------------------------------
   Settings: compact layout
   -------------------------------------------------------------------------- */
.settings-form-card .settings-panel-head { padding: 12px 16px; gap: 10px; align-items: center; }
.settings-form-card .settings-panel-icon { width: 30px; height: 30px; border-radius: 8px; }
.settings-form-card .settings-panel-head h3 { font-size: 13.5px; }
.settings-form-card .settings-panel-head p { font-size: 10px; margin-top: 1px; }
.settings-form-card .card-body { padding: 12px 16px 14px; }
.settings-form-card .form-grid { gap: 10px 12px; }
.settings-form-card .field { gap: 4px; }
.settings-form-card .field > label { font-size: 11.5px; }
.settings-form-card .field .hint { font-size: 10px; line-height: 1.35; }
.settings-form-card .input,
.settings-form-card .textarea { min-height: 33px; padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.settings-form-card .textarea { min-height: 58px; }
.settings-form-card .settings-group-label { margin-bottom: 8px; display: flex; align-items: center; gap: 6px; letter-spacing: .5px; }
.settings-form-card .settings-rule { margin: 12px 0; }
.settings-form-card .settings-note { margin-top: 12px; padding: 8px 10px; border-radius: 8px; font-size: 10px; }
.settings-form-card .settings-footer { padding: 9px 16px; }

/* --------------------------------------------------------------------------
   Email server form: compact layout
   -------------------------------------------------------------------------- */
.server-form-grid .card-header { padding: 12px 16px; }
.server-form-grid .server-card-icon { width: 30px; height: 30px; border-radius: 8px; }
.server-form-grid .card-header h3 { font-size: 13.5px; }
.server-form-grid .card-body { padding: 12px 16px 14px; }
.server-form-grid .form-grid { gap: 10px 12px; }
.server-form-grid .field { gap: 4px; }
.server-form-grid .field > label { font-size: 11.5px; }
.server-form-grid .field .hint { font-size: 10px; line-height: 1.35; }
.server-form-grid .input,
.server-form-grid .select { min-height: 33px; padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.server-form-grid .settings-group-label { margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.server-form-grid .settings-group-label::before { content: ""; width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--brand-500); }
.server-form-grid .divider { margin: 12px 0; }
.server-form-grid .switch-label { font-size: 11.5px; }
.server-form-grid .switch { gap: 8px; }
.server-form-actions .card-body { padding: 10px 16px; }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .span-2 { grid-column: auto; } }

/* Keep the server form two-column further down, so it scrolls less on laptops */
@media (max-width: 900px) {
    .server-form-grid { grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); }
}
@media (max-width: 780px) {
    .server-form-grid { grid-template-columns: 1fr; }
}

/* Keep three-up grids on the server form above small-tablet widths */
@media (min-width: 861px) {
    .server-form-grid .form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Companies list: tighter cards, smaller actions
   -------------------------------------------------------------------------- */
.company-card { gap: 9px; padding: 12px; border-radius: 12px; }
.company-card-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.company-card-name { margin: 0; font-size: 13px; }
.company-card .badge { padding: 2px 7px; font-size: 9px; }
.company-card-metrics {
    margin: 0 -12px;
    padding: 9px 12px;
    background: #fcfcfd;
}
.company-card-metric strong { font-size: 15px; }
.company-card-metric span { margin-top: 1px; font-size: 7.5px; letter-spacing: .2px; }
.company-card-users { padding-top: 9px; gap: 4px; }
.company-card-meta { font-size: 9.5px; }
.company-card-actions { gap: 5px; }
.company-card-actions .btn { gap: 5px; border-radius: 7px; }
.company-card-actions .icon-btn { width: 26px; height: 26px; }
.company-card:hover { transform: translateY(-1px); }

/* Narrow company cards: drop the date so the smaller actions stay on one line */
.company-card { container-type: inline-size; }
@container (max-width: 300px) {
    .company-card-meta { display: none; }
    .company-card-footer { justify-content: flex-start; }
}

/* --------------------------------------------------------------------------
   Buttons: smaller icons everywhere (scales with the button size)
   -------------------------------------------------------------------------- */
.btn .icon { width: 1em; height: 1em; }
.btn .icon use { pointer-events: none; }

/* --------------------------------------------------------------------------
   Buttons: no icons + refined look (whole app)
   -------------------------------------------------------------------------- */
.btn:not(.btn-icon) .icon { display: none; }
.btn {
    border-radius: 9px;
    font-weight: 650;
    letter-spacing: -.05px;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    box-shadow: 0 1px 2px rgba(182, 0, 0, .16), 0 4px 10px rgba(182, 0, 0, .14);
}
.btn-primary:hover {
    box-shadow: 0 2px 4px rgba(182, 0, 0, .2), 0 7px 16px rgba(182, 0, 0, .2);
}
.btn-secondary { border-color: #e4e7ec; }
.btn-secondary:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-danger { box-shadow: 0 1px 2px rgba(229, 72, 77, .18); }
.btn-danger:hover { box-shadow: 0 3px 8px rgba(229, 72, 77, .22); }
.btn-danger-soft { border-color: #ffd9d4; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }

/* Activity feed: smaller icon badges */
.activity-icon { width: 28px; height: 28px; border-radius: 8px; }
.activity-icon .icon { width: 13px; height: 13px; }
.activity-item { gap: 9px; padding: 9px 0; }
.dash-side .activity-item { padding: 7px 0; }

/* --------------------------------------------------------------------------
   Search fields: branded icon chip + on-brand clear button
   -------------------------------------------------------------------------- */
.input-with-icon .icon {
    left: 8px;
    width: 22px;
    height: 22px;
    padding: 4px;
    box-sizing: border-box;
    border-radius: 7px;
    background: linear-gradient(180deg, #fff7f5 0%, #ffeae6 100%);
    color: var(--brand-600);
}
.input-with-icon .input { padding-left: 38px; }
.input-with-icon:focus-within .icon {
    background: linear-gradient(180deg, #ffe9e5 0%, #ffd9d4 100%);
    color: var(--brand-700);
}

input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    cursor: pointer;
    opacity: .55;
    background-color: var(--muted);
    -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: opacity .12s, background-color .12s;
}
input[type="search"]::-webkit-search-cancel-button:hover {
    opacity: 1;
    background-color: var(--brand-600);
}

/* Sortable table headers */
.th-sort {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.th-sort .icon { width: 9px; height: 9px; opacity: .35; transition: opacity .12s, color .12s; }
.th-sort:hover { color: var(--ink-soft); }
.th-sort:hover .icon { opacity: .8; }
.th-sort.is-active { color: var(--brand-700); }
.th-sort.is-active .icon { opacity: 1; color: var(--brand-600); }

/* Back button: sits left of the page title */
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title-text { min-width: 0; }
.topbar-back { display: flex; flex: 0 0 auto; }
.topbar-back-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-soft);
    box-shadow: var(--shadow-xs);
    transition: background .12s, border-color .12s, color .12s, transform .12s;
}
.topbar-back-btn .icon { width: 16px; height: 16px; }
.topbar-back-btn:hover {
    border-color: #ffd9d4;
    background: linear-gradient(180deg, #fff7f5 0%, #ffeae6 100%);
    color: var(--brand-700);
    transform: translateX(-1px);
}
@media (max-width: 640px) {
    .topbar-back-btn { width: 32px; height: 32px; }
}

/* Profile dropdown */
.dropdown-menu--profile { min-width: 200px; padding: 5px; border-radius: 10px; }
.profile-menu-head {
    padding: 7px 8px 8px;
    border-radius: 7px;
    background: linear-gradient(180deg, #fcfcfd 0%, #f8fafc 100%);
}
.profile-menu-name { font-size: 12.5px; font-weight: 750; color: var(--ink); line-height: 1.2; }
.profile-menu-email {
    margin-top: 1px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dropdown-menu--profile .dropdown-item { padding: 6px 8px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.dropdown-menu--profile .dropdown-item.danger { font-weight: 650; }
.dropdown-menu--profile .dropdown-sep { margin: 4px 2px; }

/* Template card actions dropdown */
.dropdown-menu--template,
.dropdown-menu--rows { min-width: 196px; padding: 5px; border-radius: 10px; }
.dropdown-menu--template .dropdown-item,
.dropdown-menu--rows .dropdown-item { padding: 6px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; }
.dropdown-menu--template .dropdown-item.danger,
.dropdown-menu--rows .dropdown-item.danger { font-weight: 650; }
.dropdown-menu--template .dropdown-sep,
.dropdown-menu--rows .dropdown-sep { margin: 4px 2px; }

/* Campaign overview: let the actions dropdown escape the card instead of being clipped */
.campaign-overview { overflow: visible; }
.campaign-overview-progress { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.dropdown-menu--rows { max-height: calc(100vh - 120px); overflow-y: auto; }

/* Dropdown options: small icons everywhere */
.dropdown-menu .icon { width: 13px; height: 13px; flex: 0 0 auto; }
.dropdown-menu .dropdown-item { gap: 7px; }

/* Panel chart legend as badges */
.chart-legend-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.35;
    white-space: nowrap;
}
.chart-legend-badge--sent { border-color: #ffd9d4; background: linear-gradient(180deg, #fff7f5 0%, #ffeae6 100%); color: var(--brand-700); }
.chart-legend-badge--open { border-color: #abefc6; background: linear-gradient(180deg, #f2fdf6 0%, #e6f9ee 100%); color: #027a48; }
.chart-legend-badge--click { border-color: #fedf89; background: linear-gradient(180deg, #fffcf2 0%, #fff4dc 100%); color: #b54708; }
.chart-legend:has(.chart-legend-badge) { gap: 8px; }

/* Edit campaign · content type tabs only (no header, clean borders) */
.campaign-mode-section .campaign-form-section-body { background: #fff; padding: 12px 16px 14px; }
.campaign-mode-section .campaign-mode-picker { margin-bottom: 0; }
.campaign-mode-section .campaign-mode-option { border-color: #e4e7ec; }
.campaign-mode-section .campaign-mode-option.active { border-color: var(--brand-600); box-shadow: inset 0 0 0 1px var(--brand-600); }

/* Sender: collapsed by default, revealed on demand */
.campaign-sender-body { padding: 10px 16px 12px; background: #fff; }
.campaign-sender-summary { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.campaign-sender-summary-label { font-size: 9.5px; font-weight: 750; letter-spacing: .55px; text-transform: uppercase; color: var(--muted-light); }
.campaign-sender-summary-value { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.campaign-sender-summary .btn { margin-left: auto; }

/* User form: compact */
.user-form-card .user-form-hero { padding: 12px 16px; gap: 11px; }
.user-form-card .user-form-avatar { width: 42px; height: 42px; border-radius: 11px; font-size: 14px; }
.user-form-card .user-form-name-row h3 { font-size: 14.5px; }
.user-form-card .user-form-meta { margin-top: 3px; font-size: 10.5px; gap: 10px; }
.user-form-card .card-body { padding: 12px 16px 14px; }
.user-form-card .form-grid { gap: 10px 12px; }
.user-form-card .field { gap: 4px; }
.user-form-card .field > label { font-size: 11.5px; }
.user-form-card .field .hint { font-size: 10px; line-height: 1.35; }
.user-form-card .input,
.user-form-card .select { min-height: 33px; padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.user-form-card .settings-group-label { margin-bottom: 7px; }
.user-form-card .divider { margin: 11px 0; }
.user-form-card .card-footer { padding: 10px 16px; }
.user-form-card .company-status-row { padding: 8px 10px; }

/* User form: compact "account active" row */
.user-form-card .company-status-row {
    max-width: 540px;
    padding: 8px 11px;
    gap: 10px;
    border-color: var(--line);
    background: linear-gradient(180deg, #fbfcfd 0%, #f7f9fb 100%);
}
.user-form-card .company-status-main { gap: 8px; }
.user-form-card .company-status-icon { width: 26px; height: 26px; border-radius: 7px; }
.user-form-card .company-status-icon .icon { width: 14px; height: 14px; }
.user-form-card .company-status-main .strong { font-size: 12px; }
.user-form-card .company-status-main .tiny { font-size: 10px; margin-top: 1px; }
.user-form-card .company-status-row .switch-label { font-size: 11px; }

/* keep the switch next to the text instead of pushed to the far edge */
.user-form-card .company-status-row { width: fit-content; max-width: 100%; justify-content: flex-start; gap: 14px; }

/* Company summary: compact segmented strip */
.company-help-card .company-mini-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.company-help-card .company-mini-stats > div {
    padding: 8px 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
}
.company-help-card .company-mini-stats > div + div { border-left: 1px solid var(--line-soft); }
.company-help-card .company-mini-stats strong { font-size: 16px; letter-spacing: -.3px; }
.company-help-card .company-mini-stats span { margin-top: 1px; font-size: 8px; letter-spacing: .4px; }

/* Company edit page: compact cards */
.company-form-grid .card-header { padding: 11px 14px; }
.company-form-grid .card-body { padding: 12px 14px; }
.company-form-grid .card-header h3 { font-size: 13px; }
.company-form-grid .card-header .tiny { font-size: 9.5px; }
.company-form-grid .company-form-icon,
.company-form-grid .company-help-icon { width: 26px; height: 26px; border-radius: 7px; }
.company-form-grid .company-help-heading { gap: 8px; }
.company-form-grid .divider { margin: 11px 0; }
.company-form-grid .settings-group-label { margin-bottom: 7px; }
.company-form-grid .company-server-row { padding: 6px 8px; gap: 8px; }
.company-form-grid .company-server-icon { width: 24px; height: 24px; border-radius: 6px; }
.company-form-grid .company-member-row { padding: 6px 8px; }
.company-form-grid .company-member-info strong { font-size: 11.5px; }
.company-form-grid .company-member-info small { font-size: 9.5px; }
.company-form-grid .company-status-row { padding: 8px 10px; }
.company-form-grid .company-server-list,
.company-form-grid .company-member-list { gap: 6px; }

.company-form-grid { gap: 12px; }
.company-form-grid .dash-col { gap: 12px; }
.company-form-grid .card-body { padding: 11px 14px; }

/* Default server badge */
.company-server-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.company-server-name strong { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-server-badge { flex: 0 0 auto; padding: 1px 6px; border-radius: 999px; font-size: 8.5px; font-weight: 700; line-height: 1.55; }

/* Simple switch row: text + toggle only */
.user-form-card .company-status-row--simple { padding: 7px 10px 7px 12px; gap: 16px; }
.user-form-card .company-status-row--simple .strong { font-size: 12.5px; font-weight: 650; }
.user-form-card .company-status-row--simple .switch { gap: 7px; }

/* Chart legend below the chart, smaller */
.chart-legend--below { justify-content: center; gap: 6px; margin-top: 10px; }
.chart-legend--below .chart-legend-badge { padding: 2px 7px; font-size: 9px; line-height: 1.4; }

/* Chart legend: small dots + text under the chart */
.chart-legend--dots { justify-content: center; align-items: center; gap: 14px; margin-top: 8px; }
.chart-legend--dots .chart-legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: var(--muted); }
.chart-legend--dots .chart-legend-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }

/* Add subscribers modal: compact + tidier */
#addSubscribersModal .modal-panel { width: 600px; max-width: calc(100vw - 32px); }
#addSubscribersModal .modal-header { padding: 12px 16px; }
#addSubscribersModal .modal-header h3 { font-size: 14.5px; }
#addSubscribersModal .modal-header p { margin-top: 2px; font-size: 10.5px; }
#addSubscribersModal .modal-body { padding: 11px 16px; }
#addSubscribersModal .settings-group-label { margin-bottom: 6px; font-size: 9px; }
#addSubscribersModal .input,
#addSubscribersModal .select { min-height: 33px; padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
#addSubscribersModal .field { gap: 4px; }
#addSubscribersModal .field > label { font-size: 11px; }
#addSubscribersModal .add-subscriber-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) auto; gap: 10px; align-items: end; }
#addSubscribersModal .add-subscriber-action .btn { height: 33px; }
#addSubscribersModal .add-subscriber-divider { margin: 10px 16px; }
#addSubscribersModal .add-subscriber-search { padding: 10px 16px 0; gap: 8px; }
#addSubscribersModal .add-subscriber-search .search { flex: 1 1 auto; max-width: none; }
#addSubscribersModal .add-subscriber-list { grid-template-columns: 1fr; max-height: 280px; }
#addSubscribersModal .check-item { padding: 4px 8px; font-size: 11.5px; border-radius: 7px; }
#addSubscribersModal .check-item .tiny { font-size: 9.5px; }
#addSubscribersModal .modal-footer { padding: 10px 16px; }

/* keep room for the search icon inside the add-subscribers modal */
#addSubscribersModal .input-with-icon .input { padding-left: 38px; }

.form-grid.form-grid--message { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) {
    .form-grid.form-grid--message { grid-template-columns: 1fr; }
}

/* campaign-message-row */
@media (max-width: 760px) {
    .form-grid.form-grid--message { grid-template-columns: 1fr; }
}

/* Programar envío: llamada de acción compacta */
.schedule-open-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 8px;
    border: 1px dashed #f1b5b1;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff8f7 0%, #fff 70%);
    color: var(--brand-700, #8f0000);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s, background .15s;
}
.schedule-open-card:hover {
    border-color: var(--brand-600, #b60000);
    background: linear-gradient(135deg, #fff1ef 0%, #fff 70%);
    box-shadow: 0 6px 16px -10px rgba(182, 0, 0, .35);
    transform: translateY(-1px);
}
.schedule-open-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--brand-50, #fff1ef);
    color: var(--brand-600, #b60000);
}
.schedule-open-optional {
    padding-left: 9px;
    border-left: 1px solid #f1d7d4;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted-light, #98a2b3);
}

.schedule-open-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}
.schedule-open-copy .schedule-open-optional {
    padding-left: 0;
    border-left: 0;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.schedule-open-label {
    font-size: 12px;
    font-weight: 700;
}

/* Cambiar plantilla dentro de la edición de campaña */
.template-switch-form { display: block; margin-bottom: 14px; }
.template-switch-form .template-switch { margin-bottom: 10px; }
.template-switch-search { width: 240px; max-width: 100%; }
@media (max-width: 900px) {
    .template-switch-search { width: 100%; }
}

.campaign-confirm-preview { height: 380px; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.campaign-confirm-preview iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.campaign-confirm-preview--empty { display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.template-picker-toolbar { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 10px; }
@media (max-width: 900px) {
    .template-picker-toolbar .template-search { width: 100%; }
}
.template-picker-toolbar:has(.template-search.hide) { display: none; }

/* Public subscription polish */
.public-brand-logo { width: 226px; max-width: 100%; height: auto; }
.public-card { max-width: 500px; border-top: 3px solid var(--brand-600); border-radius: 22px; }
.public-card-head { text-align: center; }
.public-card-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); }
.public-card-head h1 { font-size: 24px; }
.public-card-body { padding: 24px 30px 30px; }
.public-card-body .help-box { padding: 12px 14px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); }
.public-card-body .btn-block { min-height: 44px; border-radius: 10px; font-weight: 700; }
.public-note { text-align: center; margin-top: 16px; }

.public-success .success-icon.unsubscribe-icon { background: var(--brand-50); color: var(--brand-600); }
.public-card-body .public-success { padding: 4px 0 18px; }

/* Public unsubscribe pages · estructura tipo email */
.public-email-body { margin: 0; background: #f4f1f1; }
.public-email-page { min-height: 100vh; padding: 26px 14px 44px; display: flex; justify-content: center; align-items: flex-start; }
.public-email { width: 100%; max-width: 600px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 45px rgba(65, 24, 16, .12); }
.public-email-header { display: block; padding: 18px 24px; background: #b60000; text-align: center; }
.public-email-logo { width: 226px; max-width: 100%; height: auto; display: inline-block; }
.public-email-content { padding: 32px 36px 34px; color: var(--ink-soft); }
.public-email-content .public-success { padding: 0 0 18px; }
.public-email-content .public-success h2 { font-size: 24px; }
.public-email-content .help-box { margin-bottom: 14px; }
.public-email-content .btn-block { width: 100%; min-height: 46px; border-radius: 9px; font-weight: 700; }
.public-email-content .public-note { margin-top: 16px; text-align: center; }
.public-email-footer { padding: 20px 24px; border-top: 1px solid #f0e2de; background: #fbf7f5; text-align: center; font-size: 10.5px; line-height: 1.7; color: var(--muted); }
.public-email-footer-company { font-size: 11px; font-weight: 700; color: var(--brand-700); }
.public-email-footer-note { margin-top: 4px; color: var(--muted-light); }
@media (max-width: 640px) {
    .public-email-page { padding: 12px 8px 30px; }
    .public-email { border-radius: 10px; }
    .public-email-header { padding: 14px 18px; }
    .public-email-logo { width: 190px; }
    .public-email-content { padding: 24px 20px 26px; }
    .public-email-footer { padding: 16px 18px; }
}
.public-email-header { border-bottom: 3px solid #940000; }
.public-email-content .public-email-action { margin-top: 8px; text-align: center; }
.public-email-content .public-email-action .btn { min-width: 220px; min-height: 44px; border-radius: 9px; font-weight: 700; }

