:root {
  --ink: #172338;
  --muted: #738096;
  --line: #e8edf2;
  --canvas: #f5f7f9;
  --blue: #2968d7;
  --blue-dark: #1955bd;
  --navy: #10243d;
  --shadow: 0 5px 22px rgba(22,42,67,.045);
}
[hidden] { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f4f6f8; }
.login-card { width: min(100%, 390px); padding: 30px; border: 1px solid #e5eaf0; border-radius: 14px; background: #fff; box-shadow: 0 18px 55px #20314b12; }
.login-brand { margin-bottom: 34px; padding: 0; }
.login-card .eyebrow { margin-bottom: 7px; }
.login-card h1 { margin: 0; font-size: 25px; }
.login-card > p { margin: 7px 0 23px; color: #738096; font-size: 13px; }
.login-card .field { display: grid; gap: 7px; margin: 13px 0; color: #596a80; font-size: 11px; font-weight: 600; }
.login-card .field input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #dfe5ec; border-radius: 7px; outline: none; }
.login-card .field input:focus { border-color: #4c78b2; box-shadow: 0 0 0 3px #4c78b21a; }
.login-submit { width: 100%; justify-content: space-between; margin-top: 8px; }
.login-error { min-height: 18px; margin-top: 10px; color: #b94d49; font-size: 11px; }
.logout-button { margin-left: 12px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 'Segoe UI', Arial, sans-serif; }
button, input, select { font: inherit; }
.layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; background: #fff; border-right: 1px solid var(--line); padding: 27px 17px; display: flex; flex-direction: column; z-index: 2; }
.brand { display: flex; gap: 11px; align-items: center; font: 800 14px 'Segoe UI', sans-serif; letter-spacing: 1.4px; color: #22354d; padding: 0 10px 47px; }
.brand-mark { width: 31px; height: 31px; border-radius: 9px; background: var(--navy); color: #fff; display: grid; place-items: center; font: 800 18px 'Segoe UI'; letter-spacing: 0; }
.side-label { padding: 0 11px; color: #a0aaba; font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.workspace { display: flex; align-items: center; gap: 10px; padding: 11px; margin: 10px 0 29px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 600; }
.workspace-dot { width: 8px; height: 8px; border-radius: 50%; background: #30ae81; box-shadow: 0 0 0 3px #e8f7f0; }
.nav-label { margin-bottom: 9px; }
.nav-item { height: 42px; display: flex; gap: 12px; align-items: center; padding: 0 11px; border-radius: 8px; text-decoration: none; color: #68778b; font-size: 13px; font-weight: 500; }
.nav-item.active { background: #edf3ff; color: #245fca; font-weight: 700; }
.nav-icon { width: 17px; font-size: 17px; text-align: center; }
.sidebar-bottom { margin-top: auto; padding: 17px 5px 0; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 33px; height: 33px; border-radius: 50%; background: #e9eff8; color: #375375; display: grid; place-items: center; font-weight: 700; }
.sidebar-bottom strong, .sidebar-bottom small { display: block; }
.sidebar-bottom strong { font-size: 12px; }
.sidebar-bottom small { font-size: 10px; color: var(--muted); }
.more { margin-left: auto; color: #8e99a8; letter-spacing: 1px; }
.main { max-width: 1480px; margin-left: 244px; padding: 0 44px 28px; }
.topbar { height: 65px; border-bottom: 1px solid #e9edf1; display: flex; align-items: center; justify-content: space-between; color: #8793a3; font-size: 12px; }
.breadcrumb span { padding: 0 8px; color: #bdc5cf; }
.breadcrumb strong { color: #485970; font-weight: 600; }
.local-badge { display: flex; align-items: center; gap: 7px; color: #687a90; background: #fff; border: 1px solid var(--line); padding: 6px 10px; border-radius: 20px; font-size: 11px; }
.local-badge span { width: 7px; height: 7px; border-radius: 50%; background: #23a878; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 34px 0 22px; }
.eyebrow { color: #5274a6; font-size: 10px; font-weight: 700; letter-spacing: 1.25px; margin-bottom: 5px; }
h1, h2, p { margin: 0; }
h1 { font: 700 27px 'Segoe UI', sans-serif; letter-spacing: -.7px; }
.page-heading p, .panel-heading p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.heading-actions { display: flex; gap: 9px; }
.button { border: 1px solid transparent; border-radius: 7px; padding: 9px 13px; font-weight: 600; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: .15s; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-light { background: #fff; border-color: #e3e9ef; color: #485c74; }
.button-light:hover:not(:disabled) { background: #f8fafc; border-color: #cbd5e0; }
.button-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 5px #2968d725; }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.upload-button input { display: none; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 17px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: #68778b; font-size: 11px; font-weight: 600; }
.stat-card > strong { display: block; font: 700 25px 'Segoe UI'; margin: 9px 0 0; }
.stat-card > small { display: block; color: #98a3b1; font-size: 10px; margin-top: 2px; }
.stat-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.blue { background: #edf3ff; color: #386dc7; }
.orange { background: #fff5e6; color: #bd781e; }
.green { background: #e9f7f1; color: #258360; }
.red { background: #fff0ef; color: #bf5550; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 17px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 17px 19px 14px; }
.panel-heading h2 { font: 700 14px 'Segoe UI'; letter-spacing: -.1px; }
.secure-note { font-size: 10px; color: #4f876e; background: #edf8f3; padding: 6px 9px; border-radius: 20px; }
.secure-note span { font-weight: 700; }
.servers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 18px 18px; }
.server-card { border: 1px solid #e8edf2; border-radius: 8px; padding: 13px; }
.server-title { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.server-symbol { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.source-symbol { color: #5276ad; background: #eff4fb; }
.destination-symbol { color: #168369; background: #eaf7f3; }
.server-title strong, .server-title small { display: block; }
.server-title strong { font-size: 11px; }
.server-title small { font-size: 10px; color: #929eac; margin-top: 1px; }
.server-fields { display: grid; grid-template-columns: minmax(150px,1fr) 74px 145px; gap: 9px; }
.field { display: flex; flex-direction: column; gap: 5px; color: #788598; font-size: 10px; font-weight: 600; }
.field input, .field select { height: 34px; min-width: 0; border: 1px solid #e2e8ee; border-radius: 6px; padding: 0 9px; background: #fff; color: #27384d; font-size: 11px; outline: none; }
.field input:focus, .field select:focus, .account-input:focus { border-color: #84a9e8; box-shadow: 0 0 0 3px #eaf1ff; }
.field input::placeholder { color: #b0bac5; }
.accounts-heading { padding-bottom: 15px; }
.title-with-count { display: flex; align-items: center; gap: 8px; }
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 20px; background: #edf3ff; color: #3c69b3; font-size: 10px; font-weight: 700; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 790px; }
thead { background: #fafbfd; }
th { height: 38px; text-align: left; padding: 0 11px; color: #929eac; font-size: 9px; font-weight: 700; letter-spacing: .55px; border-top: 1px solid #f0f2f5; border-bottom: 1px solid #edf0f3; }
th:first-child, td:first-child { padding-left: 20px; width: 38px; }
td { padding: 10px 11px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.account-row:last-child td { border-bottom: 0; }
.account-input { height: 33px; width: 100%; min-width: 150px; padding: 0 9px; border: 1px solid #e5eaf0; border-radius: 6px; color: #283a50; font-size: 11px; outline: none; }
.mail-cell { display: flex; align-items: center; gap: 6px; }
.password-input { min-width: 80px; max-width: 105px; }
.eye-button { border: 0; background: transparent; color: #8491a2; cursor: pointer; padding: 4px; }
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: #7e8b9c; font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #b4bec9; }
.status-running { color: #a56c1d; }
.status-running .status-dot { background: #e1a43f; animation: pulse 1.2s infinite; }
.status-complete { color: #178765; }
.status-complete .status-dot { background: #28a77c; }
.status-failed { color: #bd4e4b; }
.status-failed .status-dot { background: #d46a67; }
.status-queued { color: #647996; }
.status-queued .status-dot { background: #7591b5; }
.progress-text { font-size: 10px; color: #758397; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.icon-button { border: 0; background: transparent; color: #79889a; padding: 5px 6px; border-radius: 5px; cursor: pointer; font-size: 11px; }
.icon-button:hover { background: #f1f4f7; color: #345577; }
.icon-button.remove:hover { background: #fff0ef; color: #bf5550; }
.empty-state { text-align: center; padding: 36px 15px 34px; }
.empty-icon { margin: 0 auto 10px; width: 37px; height: 37px; border-radius: 12px; background: #eff4fb; color: #6585b6; display: grid; place-items: center; font-size: 19px; }
.empty-state strong { font: 700 12px 'Segoe UI'; }
.empty-state p { font-size: 11px; color: #8c98a7; margin: 4px 0 14px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #edf0f3; padding: 12px 18px; color: #8a96a5; font-size: 10px; }
.footer-actions { display: flex; gap: 8px; }
.security-banner { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border: 1px solid #e2ede7; border-radius: 9px; background: #f4faf7; }
.shield { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; background: #e5f3eb; color: #3c8667; display: grid; place-items: center; font-size: 18px; }
.security-banner strong { font-size: 11px; color: #426d5a; }
.security-banner p { font-size: 10px; color: #779084; margin-top: 2px; line-height: 1.55; }
footer { text-align: right; color: #a0aab6; font-size: 9px; letter-spacing: .75px; margin-top: 18px; }
footer span { padding: 0 5px; color: #c2cad2; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 360px; background: #172b43; color: #fff; padding: 12px 16px; border-radius: 8px; box-shadow: 0 8px 25px #14263a33; font-size: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s; z-index: 5; }
.toast.visible { opacity: 1; transform: translateY(0); }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 1150px) {
  .main { padding: 0 25px 25px; }
  .sidebar { width: 215px; }
  .main { margin-left: 215px; }
  .servers-grid { grid-template-columns: 1fr; }
  .server-fields { grid-template-columns: minmax(160px,1fr) 85px 160px; }
}
@media (max-width: 820px) {
  .sidebar { width: 65px; padding: 20px 9px; }
  .brand { padding: 0 7px 39px; }
  .brand > span:not(.brand-mark), .side-label, .workspace:not(.workspace-dot), .nav-item:not(.active), .sidebar-bottom > div:not(.avatar), .more { display: none; }
  .workspace { justify-content: center; padding: 10px 0; border: 0; }
  .nav-item.active { font-size: 0; justify-content: center; padding: 0; }
  .nav-icon { font-size: 17px; }
  .main { margin-left: 65px; padding: 0 18px 24px; }
  .page-heading { align-items: flex-start; gap: 15px; flex-direction: column; }
  .heading-actions { align-self: flex-start; }
  .stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 560px) {
  .main { padding: 0 12px 22px; }
  .topbar { height: 54px; }
  .page-heading { margin: 25px 0 17px; }
  h1 { font-size: 23px; }
  .page-heading p { max-width: 330px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .stats { gap: 8px; }
  .stat-card { padding: 13px; }
  .stat-card > strong { font-size: 22px; }
  .panel-heading { padding: 15px 13px; }
  .servers-grid { padding: 0 11px 12px; }
  .server-fields { grid-template-columns: 1fr 74px; }
  .server-fields .security-field { grid-column: 1 / -1; }
  .accounts-heading { align-items: flex-start; gap: 8px; }
  .accounts-heading > .button { padding: 8px 9px; font-size: 10px; }
  .panel-footer { align-items: flex-start; gap: 10px; flex-direction: column; }
  .footer-actions { width: 100%; }
  .footer-actions .button { flex: 1; }
  .security-banner { padding: 12px; }
  .breadcrumb { font-size: 10px; }
  .local-badge { font-size: 0; padding: 7px; }
  .local-badge span { margin: 0; }
}


@media (max-width: 560px) {
  body { overflow-x: hidden; }
  .layout { min-width: 0; }
  .sidebar {
    position: sticky;
    inset: 0 auto auto 0;
    width: 100%;
    min-height: 56px;
    height: auto;
    padding: 9px 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { flex: 1 1 auto; min-width: 0; gap: 8px; padding: 0; }
  .brand > span:not(.brand-mark) { display: block; font-size: 12px; }
  .brand-mark { flex: 0 0 31px; }
  .side-label, .workspace, .sidebar-bottom { display: none; }
  .nav-item, .nav-item.active, .nav-item:not(.active) {
    display: flex;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }
  .nav-icon { width: auto; font-size: 17px; }
  .main { width: 100%; min-width: 0; margin-left: 0; padding: 0 14px 22px; }
  .topbar { min-width: 0; gap: 8px; }
  .breadcrumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logout-button { flex: 0 0 auto; margin-left: 0; padding: 8px 10px; }
  .page-heading, .panel, .security-banner { min-width: 0; }
  .heading-actions { flex-wrap: wrap; }
  .heading-actions .button { min-width: 0; padding: 9px 8px; font-size: 11px; }
  .panel-heading:not(.accounts-heading) { align-items: flex-start; gap: 8px; flex-direction: column; }
  .servers-grid { min-width: 0; }
  .server-card { min-width: 0; }
  .server-fields { grid-template-columns: minmax(0, 1fr) 68px; }
  .table-scroll { -webkit-overflow-scrolling: touch; }
  .panel-footer { padding-right: 13px; padding-left: 13px; }
  .footer-actions { flex-wrap: wrap; }
  .footer-actions .button { min-width: 0; padding: 9px 7px; font-size: 10px; }
  .toast { right: 12px; bottom: 12px; left: 12px; max-width: none; }
  .login-screen { min-height: 100vh; min-height: 100dvh; padding: 20px 16px; }
  .login-card { padding: 24px; }
}