/* Bombex Mail – UI inspired by Ecomail */
:root {
  --green: #8dc63f;
  --green-dark: #6faa22;
  --green-light: #e9f6d8;
  --dark: #2f2f2f;
  --bg: #f1f2f4;
  --card: #ffffff;
  --border: #e3e5e8;
  --text: #2d3239;
  --muted: #6f7782;
  --blue: #2f80ed;
  --blue-light: #e8f1fd;
  --purple: #9b7fe0;
  --orange: #f2994a;
  --red: #eb5757;
  --yellow: #f8d66d;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(20, 30, 40, 0.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 500; margin: 0 0 12px; color: #1f242a; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }
.green { color: var(--green-dark); }
.red { color: var(--red); }
.orange { color: var(--orange); }
.blue { color: var(--blue); }
.purple { color: var(--purple); }

/* Top bar */
.topbar { background: var(--dark); color: #fff; height: 54px; }
.topbar-inner { max-width: 1380px; margin: 0 auto; padding: 0 16px; height: 54px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; }
.mainnav { display: flex; align-items: center; height: 54px; gap: 4px; }
.mainnav > a, .mainnav .dropdown-toggle { color: #d9dcdf; padding: 0 16px; height: 54px; line-height: 54px; display: inline-block; font-size: 14px; text-decoration: none; border-bottom: 3px solid transparent; }
.mainnav > a:hover, .mainnav .dropdown-toggle:hover { color: #fff; }
.mainnav > a.active, .mainnav .dropdown-toggle.active { color: #fff; border-bottom-color: var(--green); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topsearch input { background: #444; border: 1px solid #555; color: #fff; padding: 6px 12px; border-radius: 20px; width: 220px; font-size: 13px; outline: none; }
.topsearch input::placeholder { color: #aaa; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; text-decoration: none !important; }
.caret { display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; margin-left: 5px; vertical-align: middle; }

/* Dropdowns */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: 0 6px 20px rgba(0,0,0,.12); border-radius: var(--radius); min-width: 210px; z-index: 50; padding: 6px 0; text-align: left; font-weight: 400; line-height: 1.45; }
.dropdown-right .dropdown-menu { left: auto; right: 0; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu .dropdown-item-btn { display: block; padding: 8px 16px; color: var(--text); text-decoration: none; width: 100%; text-align: left; background: none; border: 0; font: inherit; cursor: pointer; line-height: 1.4; }
.dropdown-menu a:hover, .dropdown-menu .dropdown-item-btn:hover { background: #f5f6f8; text-decoration: none; }
.dropdown-menu .danger { color: var(--red); }
.dropdown-menu .divider { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-header { padding: 8px 16px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-weight: 500; }
.dropdown-header small { color: var(--muted); font-weight: 400; }
.mainnav .dropdown-menu { top: 54px; }
.kebab { display: inline-flex; width: 30px; height: 30px; border-radius: 4px; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; text-decoration: none !important; }
.kebab:hover { background: #eef0f2; }

/* Page */
.page { max-width: 1380px; margin: 20px auto; padding: 0 16px; }
.page-wide { max-width: 1600px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.card-header h1, .card-header h2 { margin: 0; }
.card-body { padding: 20px 24px; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border); background: #fafbfc; display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.card-sub { padding: 12px 24px; background: #fafbfc; border-bottom: 1px solid var(--border); font-size: 13px; }
.section-title { font-size: 17px; font-weight: 500; margin: 26px 0 14px; }

/* Sidebar layout (Kontakty / Reporty / Správa účtu) */
.layout-side { display: flex; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 600px; margin-bottom: 20px; }
.side-nav { width: 226px; flex-shrink: 0; background: #fafbfc; border-right: 1px solid var(--border); padding: 20px 0; border-radius: var(--radius) 0 0 var(--radius); }
.side-nav h2 { padding: 0 24px 16px; font-size: 20px; }
.side-nav a { display: block; margin: 0 10px 2px 12px; padding: 9px 12px; color: #4a525c; text-decoration: none; font-size: 14px; border: 1px solid transparent; border-left: 3px solid transparent; border-radius: 4px; }
.side-nav a:hover { background: #fff; border-color: var(--green); border-left-color: var(--green); color: #1f242a; text-decoration: none; }
.side-nav a.active { background: #fff; border-color: #fff; border-left-color: var(--green); color: #1f242a; font-weight: 500; box-shadow: var(--shadow); }
.side-nav a.active:hover { border-color: var(--green); }
.side-nav .side-group { padding: 14px 24px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.side-content { flex: 1; min-width: 0; }
.side-content > .card-header:first-child { border-radius: 0 var(--radius) 0 0; }
.crumbs { font-size: 20px; font-weight: 500; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); font-weight: 400; }
.crumbs .arrow { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; font-size: 14px; border-radius: 4px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; font-family: inherit; line-height: 1.3; white-space: nowrap; background: #fff; color: var(--text); transition: background .12s, box-shadow .12s; }
.btn:hover { filter: brightness(.97); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); font-weight: 500; }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); filter: none; }
.btn-secondary { background: #fff; border-color: #cfd3d8; color: var(--text); }
.btn-secondary:hover { background: #f5f6f8; }
.btn-light { background: #f1f2f4; border-color: #f1f2f4; }
.btn-dark { background: #3f3f3f; color: #fff; border-color: #3f3f3f; }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-blue { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-orange { background: #fff; color: var(--orange); border-color: var(--orange); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-link { background: none; border: 0; color: var(--blue); padding: 0; }
.btn-group { display: inline-flex; gap: 6px; }
.btn-toggle { padding: 4px 10px; font-size: 12px; border-radius: 4px; border: 1px solid #cfd3d8; background: #fff; cursor: pointer; }
.btn-toggle.active { background: #333; color: #fff; border-color: #333; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge-green { background: #e3f5d2; color: #3e7d0f; }
.badge-blue { background: #dfeefc; color: #1f65b8; }
.badge-dark { background: #2f2f2f; color: #fff; }
.badge-gray { background: #ebedf0; color: #4f5964; }
.badge-orange { background: #fdeadb; color: #b25c14; }
.badge-red { background: #fde2e2; color: #b31c1c; }
.badge-yellow { background: #fff4cf; color: #8a6400; }
.badge-purple { background: #ede8fb; color: #5b3fb4; }
.badge-lg { padding: 6px 14px; font-size: 14px; }
.tag { display: inline-block; padding: 2px 8px; border: 1px solid #d5d9de; border-radius: 3px; font-size: 11px; color: #4f5964; background: #fff; margin: 1px 2px 1px 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 12px 14px; background: #fafbfc; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfc; }
.table .actions { text-align: right; white-space: nowrap; }
.table .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.table .title { font-weight: 500; color: #1f242a; }
.table th.sortable a { color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-hover tbody tr { cursor: pointer; }
.table-compact td, .table-compact th { padding: 9px 12px; }
.table-wrap { overflow-x: auto; }
.list-toolbar { display: flex; align-items: center; gap: 10px; padding: 16px 24px; flex-wrap: wrap; }
.list-toolbar .search { margin-left: auto; display: flex; }
.list-toolbar .search input { width: 240px; border-radius: 4px 0 0 4px; }
.list-toolbar .search button { border-radius: 0 4px 4px 0; border-left: 0; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-top: 1px solid var(--border); font-size: 13px; }
.pagination .pages { display: flex; gap: 4px; }
.pagination a, .pagination span.cur { padding: 5px 10px; border: 1px solid var(--border); border-radius: 4px; color: var(--text); background: #fff; }
.pagination span.cur { background: #333; color: #fff; border-color: #333; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty svg { margin-bottom: 12px; opacity: .6; }
.checkbox-cell { width: 34px; }

/* Forms */
label.form-label, .form-label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 13.5px; }
.form-group { margin-bottom: 18px; }
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; min-width: 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid #cfd3d8; border-radius: 4px; font: inherit; font-size: 14px; color: var(--text); background: #fff; outline: none; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(141,198,63,.18); }
input[readonly] { background: #f7f8f9; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
textarea { min-height: 100px; resize: vertical; }
textarea.code { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; min-height: 420px; line-height: 1.5; white-space: pre; }
.help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.error-text { color: var(--red); font-size: 12.5px; margin-top: 5px; }
.input-group { display: flex; }
.input-group input { border-radius: 4px 0 0 4px; }
.input-group select, .input-group .addon { border-radius: 0 4px 4px 0; border-left: 0; }
.input-group .addon { padding: 8px 11px; border: 1px solid #cfd3d8; background: #f7f8f9; white-space: nowrap; }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-weight: 400; }
.check input { margin-top: 3px; }
.radio-list label { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.counter { float: right; font-size: 11px; background: #eef0f2; padding: 2px 8px; border-radius: 10px; color: var(--muted); }
.form-narrow { max-width: 720px; }
.inline-form { display: inline; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd3d8; border-radius: 22px; transition: .2s; cursor: pointer; }
.switch span:before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span:before { transform: translateX(18px); }

/* Alerts / flashes */
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; border: 1px solid transparent; font-size: 13.5px; }
.alert-info { background: #eaf4fd; color: #1f65b8; border-color: #cfe4fa; }
.alert-success { background: #e9f6d8; color: #3e7d0f; border-color: #cfe9b0; }
.alert-warning { background: #fff4cf; color: #8a6400; border-color: #f6e4a3; }
.alert-danger { background: #fde2e2; color: #b31c1c; border-color: #f7bebe; }
.flashes { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.flash { padding: 10px 18px; border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.12); font-size: 13.5px; background: #fff; animation: fadein .2s; pointer-events: all; }
.flash-success { background: #e9f6d8; color: #3e7d0f; }
.flash-error { background: #fde2e2; color: #b31c1c; }
.flash-info { background: #eaf4fd; color: #1f65b8; }
.flash-warning { background: #fff4cf; color: #8a6400; }
@keyframes fadein { from { opacity: 0; transform: translateY(-6px);} to { opacity: 1; transform: none; } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 24px; }
.tabs a { padding: 14px 16px; color: #4a525c; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; }
.tabs a:hover { color: #1f242a; }
.tabs a.active { color: #1f242a; border-bottom-color: var(--green); font-weight: 500; }
.tabs .count { background: #ebedf0; color: #4f5964; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tabs a.active .count { background: #2f2f2f; color: #fff; }
.tabs-inline { padding: 0; margin-bottom: 20px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { padding: 22px 16px; text-align: center; border-right: 1px solid var(--border); background: #fafbfc; }
.stat:last-child { border-right: 0; }
.stat .val { font-size: 28px; font-weight: 500; color: #1f242a; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .val { font-size: 26px; font-weight: 500; }
.stat-card .lbl { color: var(--muted); font-size: 13px; }
.funnel { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0; margin: 10px 0 20px; align-items: end; }
.funnel-col { text-align: center; position: relative; }
.funnel-bar { margin: 0 auto; width: 100%; background: #f2f3f5; display: flex; align-items: flex-end; justify-content: center; height: 190px; position: relative; }
.funnel-fill { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: #1f242a; }
.funnel-fill.f1 { background: #9ad6f5; }
.funnel-fill.f2 { background: #b39ddb; }
.funnel-fill.f3 { background: #a5d86e; }
.funnel-fill .n { font-size: 28px; font-weight: 500; }
.funnel-fill .p { font-size: 13px; color: #33404b; }
.funnel-label { padding: 10px; background: #fafbfc; border-top: 1px solid var(--border); color: #33404b; }
.funnel-rate { position: absolute; top: 40%; right: -50%; width: 100%; text-align: center; font-weight: 500; color: #33404b; z-index: 2; }
.kv-table { width: 100%; }
.kv-table td { padding: 10px 6px; border-bottom: 1px solid var(--border); }
.kv-table td:last-child { text-align: right; font-weight: 500; }
.kv-table .pct { color: var(--muted); font-weight: 400; margin-right: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two-col, .three-col { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 300px; }
.chart-box-sm { position: relative; height: 220px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.summary-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #fafbfc; }
.summary-list li { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; }
.summary-list li:last-child { border-bottom: 0; }
.summary-list .ok { color: var(--green-dark); font-size: 18px; line-height: 1; }
.summary-list .lbl { color: var(--muted); font-size: 12.5px; }
.summary-list .val { font-weight: 500; }

/* Wizard */
.wizard-body { background: #fff; }
.wizard-topbar-inner { display: flex; align-items: center; gap: 14px; padding: 0 20px; height: 54px; }
.wizard-title { font-size: 17px; color: #fff; }
.wizard-close { margin-left: auto; }
.wizard { display: flex; min-height: calc(100vh - 54px); }
.wizard-steps { width: 280px; flex-shrink: 0; background: #f8f9fa; border-right: 1px solid var(--border); padding: 60px 0 0; }
.wizard-step { display: flex; align-items: center; justify-content: flex-end; padding: 16px 0 16px 20px; color: #98a1ab; text-decoration: none !important; font-size: 13.5px; position: relative; }
.wizard-step i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #c9ced4; margin: 0 -6px 0 14px; background: #fff; z-index: 2; }
.wizard-step.done { color: #4a525c; }
.wizard-step.done i { background: var(--green); border-color: var(--green); }
.wizard-step.current { color: #1f242a; font-weight: 500; }
.wizard-step.current i { border-color: var(--green); }
.wizard-content { flex: 1; padding: 50px 60px 120px; max-width: 1000px; }
.wizard-content h1 { font-size: 20px; font-weight: 400; margin-bottom: 26px; }
.wizard-footer { position: fixed; bottom: 0; left: 280px; right: 0; background: #f8f9fa; border-top: 1px solid var(--border); padding: 16px 60px; display: flex; align-items: center; gap: 24px; z-index: 20; }
.option-cards { display: flex; gap: 16px; flex-wrap: wrap; }
.option-card { width: 260px; padding: 30px 16px; border: 1px solid var(--border); border-radius: var(--radius); text-align: center; background: #fafbfc; cursor: pointer; color: #4a525c; }
.option-card:hover { border-color: #bbb; }
.option-card.active { border-color: var(--green); background: #fff; }
.option-card svg { display: block; margin: 0 auto 12px; }
.subnav-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.subnav-tabs a { padding: 10px 16px; color: #4a525c; border-bottom: 3px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.subnav-tabs a.active { border-bottom-color: var(--green); color: #1f242a; font-weight: 500; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 25, 30, .55); z-index: 900; display: flex; align-items: flex-start; justify-content: center; padding: 50px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: fadein .15s; }
.modal-lg { max-width: 900px; }
.modal-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #fafbfc; border-radius: 0 0 8px 8px; }
.contact-modal .modal-header { background: linear-gradient(90deg, #fff4e8, #fbe7f3); display: block; padding: 22px 28px; border-radius: 8px 8px 0 0; }
.contact-modal .contact-email { font-size: 26px; font-weight: 500; margin: 2px 0 8px; word-break: break-all; }
.contact-modal .contact-meta { display: flex; gap: 22px; font-size: 13.5px; color: #4a525c; }
.contact-modal .contact-meta b { color: #1f242a; }
.contact-modal .modal-actions { position: absolute; right: 60px; top: 24px; display: flex; gap: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline .when { width: 100px; flex-shrink: 0; color: var(--muted); font-size: 12.5px; }
.timeline .ico { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; font-size: 15px; }
.timeline .ico.open { background: #9b7fe0; } .timeline .ico.click { background: #6ec045; } .timeline .ico.send, .timeline .ico.delivery { background: #5cb7e6; } .timeline .ico.order { background: #ec6ec3; } .timeline .ico.bounce { background: #f2994a; } .timeline .ico.unsubscribe, .timeline .ico.complaint { background: #eb5757; } .timeline .ico.subscribe, .timeline .ico.resubscribe { background: #8dc63f; } .timeline .ico.custom { background: #2fb7c4; } .timeline .ico.automation_enter, .timeline .ico.automation_complete { background: #5f6ee0; } .timeline .ico.webversion { background: #999; }

/* Segment builder */
.seg-group { border: 2px solid #9fdcf5; border-radius: 8px; padding: 14px 16px; margin-bottom: 8px; position: relative; background: #fff; }
.seg-cond { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.seg-cond select, .seg-cond input { width: auto; min-width: 150px; }
.seg-cond .remove { margin-left: auto; color: var(--muted); cursor: pointer; background: none; border: 0; font-size: 18px; }
.seg-or { display: inline-block; padding: 3px 10px; border: 1px solid #e9a9dd; color: #b33fa0; border-radius: 4px; font-size: 12px; cursor: pointer; background: #fff; font-weight: 500; }
.seg-and { display: inline-block; padding: 4px 12px; border: 1px solid #9fdcf5; color: #1b8fc2; border-radius: 4px; font-size: 12px; cursor: pointer; background: #e8f6fd; font-weight: 500; margin: 4px 0 12px; }
.seg-group .remove-group { position: absolute; right: 10px; top: 8px; background: none; border: 0; font-size: 18px; color: var(--muted); cursor: pointer; }

/* Automation builder */
.flow { display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.flow-node { width: 380px; background: #fff; border: 1px solid #d9dde2; border-radius: 8px; box-shadow: var(--shadow); position: relative; margin-bottom: 0; }
.flow-node .node-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 500; }
.flow-node .node-head .ico { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; flex-shrink: 0; }
.flow-node .node-body { padding: 10px 16px 12px; font-size: 13px; color: #4a525c; }
.flow-node .node-body .row { display: flex; justify-content: space-between; padding: 6px 8px; background: #f5f6f8; border-radius: 4px; margin-top: 6px; }
.flow-node .node-tools { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.flow-node .node-tools button { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 14px; padding: 4px; }
.flow-node .node-tools button:hover { color: #1f242a; }
.flow-node.trigger { border-color: #b7a1f5; }
.flow-node.trigger:before { content: "⚡ Trigger"; position: absolute; top: -12px; left: 10px; background: #8a63f2; color: #fff; font-size: 11px; padding: 2px 10px; border-radius: 4px; }
.flow-link { width: 2px; height: 34px; background: #c9ced4; position: relative; }
.flow-add { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #c9ced4; background: #fff; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; margin: 4px 0; }
.flow-add:hover { border-color: var(--green); color: var(--green-dark); }
.flow-branches { display: flex; gap: 30px; align-items: flex-start; }
.flow-branch { display: flex; flex-direction: column; align-items: center; min-width: 380px; }
.flow-branch-label { font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 10px; margin-bottom: 6px; }
.flow-branch-label.yes { background: #e3f5d2; color: #3e7d0f; }
.flow-branch-label.no { background: #fde2e2; color: #b31c1c; }
.flow-end { padding: 8px 18px; border: 1px dashed #c9ced4; border-radius: 20px; color: var(--muted); font-size: 12.5px; }
.ico-email { background: #2f80ed; } .ico-wait { background: #f2994a; } .ico-cond { background: #9b7fe0; } .ico-tag { background: #27ae60; } .ico-list { background: #2fb7c4; } .ico-coupon { background: #ec6ec3; } .ico-end { background: #3f4a55; } .ico-webhook { background: #6c757d; } .ico-unsub { background: #eb5757; } .ico-trigger { background: #8a63f2; } .ico-field { background: #16a085; }

/* Template grid */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding: 24px; }
.tpl-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; }
.tpl-thumb { height: 240px; background: #e9f6d8; overflow: hidden; position: relative; border-radius: var(--radius) var(--radius) 0 0; }
.tpl-card .dropdown-menu { z-index: 60; }
.tpl-thumb iframe { width: 600px; height: 720px; transform: scale(.4667); transform-origin: 0 0; border: 0; pointer-events: none; background: #fff; margin-left: 70px; }
.tpl-thumb-new { height: 240px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); text-align: center; padding: 20px; }
.tpl-info { padding: 14px 16px; }
.tpl-info .name { font-weight: 500; color: var(--blue); display: block; }
.tpl-info .sub { color: var(--muted); font-size: 12.5px; margin: 4px 0 12px; }
.tpl-actions { display: flex; justify-content: space-between; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-box { width: 380px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 36px; box-shadow: 0 10px 40px rgba(0,0,0,.06); }
.login-box h1 { text-align: center; margin-bottom: 24px; }
.login-box .logo { text-align: center; margin-bottom: 14px; }

/* Public pages (unsubscribe/webversion) */
.public-page { max-width: 560px; margin: 60px auto; background: #fff; padding: 40px; border-radius: 8px; border: 1px solid var(--border); text-align: center; }

/* Misc */
.progress { height: 8px; background: #ebedf0; border-radius: 4px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green); transition: width .3s; }
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.info-card { background: #eaf4fd; border: 1px solid #cfe4fa; border-radius: var(--radius); padding: 16px 18px; font-size: 13px; }
.info-card b { display: block; margin-bottom: 4px; font-size: 14px; }
.domain-card { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; }
.domain-card .dh { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.domain-card .dh .dname { font-size: 19px; font-weight: 500; }
.domain-card .dns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fafbfc; font-size: 13px; }
.dns-records { width: 100%; font-size: 12.5px; }
.dns-records td { padding: 6px 8px; border-bottom: 1px solid var(--border); word-break: break-all; vertical-align: top; }
.dns-records code { background: #f1f2f4; padding: 2px 5px; border-radius: 3px; font-size: 12px; }
code.inline { background: #f1f2f4; padding: 2px 6px; border-radius: 3px; font-size: 12.5px; }
pre.log { background: #1f242a; color: #d7dbe0; padding: 14px; border-radius: 4px; font-size: 12px; max-height: 400px; overflow: auto; white-space: pre-wrap; }
.copy-btn { cursor: pointer; color: var(--blue); font-size: 12px; margin-left: 6px; }
.status-dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.status-dot.ok { background: var(--green); } .status-dot.wait { background: #5cb7e6; } .status-dot.err { background: var(--red); }
.iframe-preview { width: 100%; height: 800px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.preview-toggle { display: inline-flex; border: 1px solid #cfd3d8; border-radius: 4px; overflow: hidden; }
.preview-toggle button { border: 0; background: #fff; padding: 6px 12px; cursor: pointer; }
.preview-toggle button.active { background: #333; color: #fff; }
.donut-legend { display: flex; align-items: center; gap: 30px; }
.donut-legend table { flex: 1; }
.var-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.var-table code { background: #f1f2f4; padding: 2px 6px; border-radius: 3px; font-size: 12.5px; white-space: nowrap; }
.step-list { counter-reset: s; list-style: none; padding: 0; }
.step-list li { position: relative; padding-left: 36px; margin-bottom: 10px; }
.step-list li:before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) {
  .layout-side { flex-direction: column; }
  .side-nav { width: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .wizard-steps { display: none; }
  .wizard-footer { left: 0; padding: 12px 20px; }
  .wizard-content { padding: 30px 20px 100px; }
  .grid-2 { grid-template-columns: 1fr; }
  .mainnav > a { padding: 0 9px; }
  .topsearch { display: none; }
}
