.sidebar { background: #102d59; }
.brand { padding-top: 2px; }
.brand-icon, .login-logo { background: linear-gradient(145deg, #2674e8, #18b8b1); box-shadow: 0 8px 22px rgba(22, 167, 187, .24); }
.brand b { font-size: 17px; letter-spacing: -.2px; }
.brand small { color: #b7d5f3; }
.sidebar nav a { color: #d1def0; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,.12); }
.sidebar nav a.active { box-shadow: inset 3px 0 #29c1b8; }
.topbar { color: #647995; }
body { background: #f3f6fb; }
.content { max-width: 1560px; }
.panel, .card { border-color: #d9e2ef; box-shadow: 0 12px 34px rgba(25, 54, 92, .07); }
.btn.primary { background: #2867df; border-color: #2867df; }
.templates-head { align-items: center; }
.template-list-panel { padding: 0; overflow: hidden; }
.template-table-wrap { overflow-x: auto; }
.template-table { table-layout: auto; }
.template-table th { background: #f8fafd; padding: 13px 18px; white-space: nowrap; }
.template-table td { padding: 15px 18px; vertical-align: middle; }
.template-table tbody tr:last-child td { border-bottom: 0; }
.template-table tbody tr:hover { background: #f9fbfe; }
.template-table th:first-child { width: 34%; }
.template-table th:nth-child(2) { width: 28%; }
.template-name { display: grid; gap: 5px; min-width: 220px; }
.template-name b { font-size: 14px; }
.template-name span, .template-date { color: var(--muted); font-size: 12px; }
.template-code { display: inline-block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count-badge { display: inline-grid; place-items: center; min-width: 30px; height: 28px; padding: 0 8px; border-radius: 8px; background: #eef3fa; color: #49627f; font-weight: 800; }
.btn.compact { padding: 8px 12px; font-size: 12px; }
.template-action { text-align: right; white-space: nowrap; }
.client-form-actions { align-items: center; }
.client-delete { margin-right: auto; }
.client-delete:hover { border-color: #ef4444; background: #fef2f2; }
.login-split-body { min-height: 100vh; padding: 48px 24px; background: radial-gradient(circle at 8% 12%, rgba(219,234,254,.72), transparent 32%), radial-gradient(circle at 92% 88%, rgba(204,251,241,.40), transparent 30%), #f3f7fc; }
.login-shell { width: min(1060px, 100%); min-height: 650px; display: grid; grid-template-columns: 46% 54%; background: white; border: 1px solid #d7e1ee; border-radius: 25px; overflow: hidden; box-shadow: 0 28px 80px rgba(31, 59, 94, .16); }
.login-product { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 45px 44px 42px; background: linear-gradient(155deg, #174a86 0%, #123766 58%, #102f58 100%); color: white; }
.login-product-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.login-product-brand .login-logo { width: 48px; height: 48px; margin: 0; border-radius: 13px; font-size: 23px; }
.login-product-brand b { display: block; font-size: 17px; letter-spacing: -.2px; }
.login-product-brand small { display: block; margin-top: 4px; color: #b9d5ef; font-size: 11px; }
.login-product-copy { position: relative; z-index: 2; margin-top: 68px; max-width: 360px; }
.login-overline { display: block; color: #a9c9ff; font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.login-overline.blue { color: #2563eb; }
.login-product-copy h1 { margin: 18px 0 18px; font-size: clamp(40px, 4vw, 57px); line-height: .98; letter-spacing: -2.2px; }
.login-product-copy p { margin: 0; color: #e1ecf8; font-size: 15px; line-height: 1.7; }
.login-benefit { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; margin-top: auto; padding: 16px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 13px; background: rgba(255,255,255,.09); backdrop-filter: blur(8px); }
.benefit-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: rgba(32,211,190,.18); color: #55e4d2; font-size: 18px; font-weight: 900; }
.login-benefit b, .login-benefit small { display: block; }
.login-benefit b { font-size: 12px; }
.login-benefit small { margin-top: 4px; color: #bcd2ea; font-size: 10px; }
.login-orbit { position: absolute; border: 1px solid rgba(154,199,235,.19); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 330px; height: 330px; right: -185px; top: 80px; }
.orbit-two { width: 235px; height: 235px; right: -102px; bottom: -105px; }
.login-access { display: grid; place-items: center; padding: 55px 70px; background: #fff; }
.login-access-inner { width: 100%; max-width: 410px; }
.login-access h2 { margin: 20px 0 12px; font-size: 34px; line-height: 1.15; letter-spacing: -1px; }
.login-access-inner > p { color: var(--muted); margin: 0 0 30px; font-size: 14px; }
.login-error { margin: 0 0 18px; }
.login-sso-button { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 17px 0 22px; border-radius: 11px; color: white; background: linear-gradient(135deg, #2868e7, #3168d9); box-shadow: 0 12px 25px rgba(37,99,235,.24); text-decoration: none; font-weight: 800; }
.login-sso-button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(37,99,235,.30); }
.login-sso-button b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.14); font-size: 18px; }
.login-security { display: flex; align-items: flex-start; gap: 13px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.security-icon { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 50%; background: #edf4ff; color: #2563eb; font-weight: 900; }
.login-security p { margin: 0; color: #7b879a; font-size: 11px; line-height: 1.55; }
.message-content { margin-top: 22px; }
.user-actions-panel { width: 100%; }
.user-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.user-action-card { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.user-action-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; background: #e8edf4; color: #718096; font-size: 18px; font-weight: 900; }
.user-action-card small, .user-action-card strong { display: block; }
.user-action-card small { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.user-action-card strong { color: #536176; font-size: 14px; }
.user-action-card.completed { border-color: #bcebd6; background: #f0fdf7; }
.user-action-card.completed .user-action-icon { background: #d7f8e7; color: #16845b; }
.user-action-card.completed strong { color: #146c4c; }
.trace-filters { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)) repeat(2, minmax(130px, .8fr)) auto auto; gap: 10px; }
.compact-stats { grid-template-columns: repeat(4, 1fr); }
.pill.pending { background: #dbeafe; color: #1d4ed8; }
.pill.accepted { background: #dcfce7; color: #15803d; }
.pill.problem { background: #fee2e2; color: #b91c1c; }
.delivery-note { margin-top: 4px; padding: 14px 16px; border-radius: 11px; background: #f8fafc; border: 1px solid var(--line); }
.delivery-note p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.message-content h3 { font-size: 13px; color: var(--muted); margin: 20px 0 8px; }
.message-content pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 14px; line-height: 1.55; margin: 0; }
.detail-list dd { min-width: 0; overflow-wrap: anywhere; }
.settings-side { display: grid; gap: 18px; align-content: start; }
.smtp-test-card { max-width: none; }
.section-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #e8efff; color: var(--brand); font-size: 21px; margin-bottom: 14px; }
.secret-note { margin: 0; }
.profile-wrap { max-width: 720px; }
.profile-compact { max-width: 720px; margin: 0; text-align: left; }
.profile-head { display: flex; align-items: center; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.profile-head .profile-avatar { margin: 0; flex: 0 0 auto; }
.profile-head h2 { margin: 0 0 5px; }
.profile-compact dl { margin: 24px 0; }
.profile-compact form { display: flex; justify-content: flex-end; }
.guide-head { align-items: center; }
.guide-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; margin-bottom: 22px; background: linear-gradient(135deg, #fff, #f2f7ff); }
.guide-hero h2 { font-size: 24px; margin: 8px 0 10px; }
.guide-hero p, .guide-section p, .guide-section li { line-height: 1.65; }
.guide-step { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; align-content: center; }
.flow span { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; font-weight: 700; box-shadow: 0 5px 18px rgba(31,45,61,.06); }
.flow b { color: var(--brand); }
.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.guide-nav { position: sticky; top: 94px; display: grid; gap: 4px; padding: 14px; }
.guide-nav b { padding: 8px 10px; }
.guide-nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.guide-nav a:hover { background: #eef4ff; color: var(--brand); }
.guide-content { display: grid; gap: 22px; min-width: 0; }
.guide-section { scroll-margin-top: 92px; }
.guide-section h2 { font-size: 22px; margin: 7px 0 14px; }
.guide-section h3 { margin: 22px 0 8px; }
.guide-section pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow-x: auto; background: #101b30; color: #dbeafe; border-radius: 11px; padding: 15px; line-height: 1.55; font: 13px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace; }
.guide-section a { color: var(--brand); }
.variable-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.variable-demo b { display: block; margin-bottom: 8px; }
.variable-demo pre { height: calc(100% - 26px); margin: 0; }
.field-table { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; margin: 18px 0; }
.field-table > div { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.field-table > div:first-child { background: #f8fafc; }
.field-table > div:last-child { border-bottom: 0; }
.code-example { margin-top: 16px; }
.code-example summary { cursor: pointer; color: var(--brand); font-weight: 700; }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.status-grid > div { border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.status-grid p { display: inline; margin-left: 8px; }
.error-list { border-top: 1px solid var(--line); }
.error-list > div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding: 8px 0 8px 32px; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "✓"; position: absolute; left: 4px; color: #16a34a; font-weight: 900; }
@media (max-width: 720px) {
  .detail-list { grid-template-columns: 1fr; }
  .user-actions-grid { grid-template-columns: 1fr; }
  .trace-filters { grid-template-columns: 1fr; }
  .compact-stats { grid-template-columns: 1fr; }
  .detail-list dt { font-weight: 700; }
  .profile-compact form .btn { width: 100%; }
  .guide-hero, .guide-layout, .variable-demo { grid-template-columns: 1fr; }
  .guide-nav { display: none; }
  .field-table > div { grid-template-columns: 1fr; gap: 5px; }
  .status-grid { grid-template-columns: 1fr; }
  .templates-head { align-items: stretch; flex-direction: column; }
  .templates-head .btn { width: 100%; }
  .template-list-panel { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .template-table thead { display: none; }
  .template-table, .template-table tbody, .template-table tr, .template-table td { display: block; width: 100%; }
  .template-table tr { background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 12px; }
  .template-table td { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border: 0; }
  .template-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
  .template-table td:first-child { display: block; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .template-table td:first-child::before, .template-action::before { display: none; }
  .template-action { display: block!important; padding-top: 12px!important; }
  .template-action .btn { width: 100%; }
  .client-form-actions { align-items: stretch; flex-direction: column; }
  .client-form-actions .btn { width: 100%; }
  .client-delete { margin-right: 0; order: 3; }
  .login-split-body { padding: 18px 12px; }
  .login-shell { min-height: 0; grid-template-columns: 1fr; border-radius: 20px; }
  .login-product { min-height: 335px; padding: 28px 26px; }
  .login-product-copy { margin-top: 42px; }
  .login-product-copy h1 { font-size: 40px; }
  .login-benefit { margin-top: 38px; }
  .login-access { padding: 42px 27px; }
  .login-access h2 { font-size: 29px; }
}
