:root {
  --ink: #13253b;
  --muted: #6c7c90;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --line: #e4eaf1;
  --navy: #0b2a4a;
  --blue: #1677d2;
  --blue-soft: #eaf4ff;
  --green: #14815d;
  --green-soft: #e5f7f0;
  --amber: #ae7100;
  --amber-soft: #fff5dc;
  --red: #bd3a49;
  --red-soft: #fff0f1;
  --shadow: 0 12px 32px rgba(21, 47, 75, .08);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Tahoma, Arial, sans-serif; font-size: 14px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { width: 252px; flex: 0 0 252px; min-height: 100vh; padding: 28px 16px 18px; background: var(--navy); color: #dbe9f7; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 30px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #f2b653; color: var(--navy); font-weight: 800; font-size: 20px; }
.brand-logo { width: 62px; height: 50px; display: block; object-fit: contain; border-radius: 12px; background: #121212; }
.brand strong, .brand span { display: block; }
.brand strong { color: #fff; font-size: 17px; letter-spacing: .2px; }
.brand span { margin-top: 3px; color: #b7c9dc; font-size: 13px; font-weight: 700; }
.nav-list { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 10px; padding: 12px; color: #c6d6e7; background: transparent; text-align: right; transition: .18s; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.12); }
.nav-link > span { width: 17px; text-align: center; font-size: 16px; }
.nav-link b { margin-right: auto; min-width: 20px; border-radius: 99px; padding: 2px 6px; background: #f2b653; color: #1b3651; font-size: 11px; text-align: center; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.14); margin-top: auto; padding: 18px 9px 0; display: flex; align-items: center; gap: 9px; }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer strong { color: #fff; font-size: 12px; }
.sidebar-footer span { color: #acc0d3; font-size: 11px; margin-top: 3px; }
.user-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #2e567c; color: #fff; font-weight: 700; }
.more-button { margin-right: auto; border: 0; color: #b9cde0; background: transparent; font-size: 20px; }

.main-area { min-width: 0; flex: 1; }
.topbar { min-height: 88px; padding: 19px 38px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 21px; font-weight: 700; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.eyebrow { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.role-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.role-picker select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: var(--ink); }
.notification-button { position: relative; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy); font-size: 22px; }
.notification-button i { position: absolute; top: -5px; left: -5px; min-width: 17px; height: 17px; border-radius: 20px; background: var(--red); color: #fff; font-style: normal; font-size: 10px; line-height: 17px; }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--navy); font-size: 24px; }

.content { max-width: 1400px; padding: 30px 38px 45px; margin: 0 auto; }
.content-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.content-heading p { margin-top: 7px; color: var(--muted); }
.primary-button, .secondary-button, .link-button { border-radius: 9px; padding: 10px 14px; border: 1px solid transparent; font-weight: 700; }
.primary-button { background: var(--navy); color: #fff; }
.primary-button:hover { background: #123d68; }
.secondary-button { background: #fff; color: var(--navy); border-color: var(--line); }
.link-button { background: transparent; color: var(--blue); padding: 5px 0; }

.alert { display: flex; align-items: center; gap: 12px; padding: 13px 15px; margin-bottom: 22px; border: 1px solid #f4cfd4; border-radius: 11px; background: var(--red-soft); color: #8d2635; }
.alert strong { display: block; font-size: 13px; }
.alert span { display: block; font-size: 12px; margin-top: 2px; }
.alert button { margin-right: auto; border: 0; color: inherit; background: transparent; font-weight: 700; }
.alert-symbol { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #ffe0e3; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 6px rgba(19, 37, 59, .02); }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { margin: 8px 0 5px; color: var(--navy); font-size: 26px; font-weight: 700; }
.metric-caption { color: var(--muted); font-size: 11px; }
.metric-caption.negative { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 2px 6px rgba(19, 37, 59, .02); }
.panel-header { padding: 18px 19px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 9px; background: #edf2f7; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--blue); }

.auction-list { border-top: 1px solid var(--line); }
.auction-row { display: grid; grid-template-columns: minmax(175px, 1.3fr) minmax(160px, 1.1fr) minmax(120px, .75fr) 78px; align-items: center; gap: 12px; padding: 15px 19px; border-bottom: 1px solid var(--line); }
.auction-row:last-child { border-bottom: 0; }
.auction-name { font-weight: 700; }
.auction-meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.stage-block strong { display: block; font-size: 12px; }
.stage-block .progress-track { margin-top: 7px; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; width: max-content; padding: 5px 8px; border-radius: 7px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-waiting { background: var(--blue-soft); color: #1264ad; }
.status-late { background: var(--red-soft); color: var(--red); }
.status-ready { background: var(--amber-soft); color: var(--amber); }
.status-done { background: var(--green-soft); color: var(--green); }
.row-menu { border: 0; background: transparent; color: var(--muted); font-size: 20px; }

.workflow-head { display: grid; grid-template-columns: 1.1fr repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.workflow-head div { color: var(--muted); font-size: 12px; font-weight: 700; }
.workflow-card { display: grid; grid-template-columns: 1.1fr repeat(4, 1fr); gap: 10px; align-items: stretch; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.workflow-auction { padding: 15px; border-left: 1px solid var(--line); }
.workflow-auction strong { display: block; }
.workflow-auction span { color: var(--muted); font-size: 11px; }
.workflow-step { position: relative; padding: 15px 11px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.workflow-step::before { content: ''; width: 9px; height: 9px; display: inline-block; margin-left: 6px; border-radius: 50%; background: #ccd7e3; }
.workflow-step.active { background: var(--blue-soft); color: #145f9f; font-weight: 700; }
.workflow-step.active::before { background: var(--blue); }
.workflow-step.finished { color: var(--green); }
.workflow-step.finished::before { background: var(--green); }
.workflow-step.overdue { background: var(--red-soft); color: var(--red); font-weight: 700; }
.workflow-step.overdue::before { background: var(--red); }

.task-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(290px, .8fr); gap: 20px; }
.task-card { padding: 20px; }
.task-card + .task-card { border-top: 1px solid var(--line); }
.task-topline { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.task-card p { color: var(--muted); font-size: 12px; margin-top: 6px; }
.task-detail { margin: 15px 0; padding: 12px; border-radius: 9px; background: #f6f9fc; color: #53677f; font-size: 12px; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file-label { display: inline-flex; align-items: center; gap: 7px; border: 1px dashed #b7c8db; border-radius: 9px; padding: 9px 11px; color: var(--navy); font-weight: 700; cursor: pointer; }
.file-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-state { color: var(--green); font-size: 12px; }
.side-summary { padding: 20px; }
.side-summary h3 { margin-bottom: 16px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.summary-line span { color: var(--muted); }
.timeline { margin-top: 18px; }
.timeline-item { position: relative; padding: 0 22px 15px 0; color: #53677f; font-size: 12px; }
.timeline-item::before { content: ''; position: absolute; top: 5px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #cbd8e5; }
.timeline-item.done::before { background: var(--green); }
.timeline-item.current::before { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.timeline-item::after { content: ''; position: absolute; top: 15px; right: 8px; height: 18px; border-right: 1px solid #d5e0ea; }
.timeline-item:last-child::after { display: none; }
.timeline-item small { display: block; color: var(--muted); margin-top: 3px; }

.files-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.file-card { display: block; padding: 17px; min-height: 132px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; }
.file-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.file-card strong { display: block; margin-top: 12px; }
.file-card span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.empty-state { padding: 42px 22px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; }

.settings-box { max-width: 720px; padding: 21px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.duration { display: flex; align-items: center; gap: 8px; }
.duration input { width: 64px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.switch { appearance: none; position: relative; width: 40px; height: 23px; border-radius: 99px; border: 0; background: #c8d4df; transition: .2s; }
.switch::after { content: ''; position: absolute; width: 17px; height: 17px; top: 3px; right: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(-17px); }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; padding: 18px; display: grid; place-items: center; background: rgba(11,42,74,.38); }
.modal-backdrop.hidden, .toast.hidden { display: none; }
.modal { position: relative; width: min(520px, 100%); padding: 26px; border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.close-modal { position: absolute; top: 13px; left: 13px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef3f8; color: var(--navy); font-size: 22px; line-height: 1; }
.modal h2 { margin-bottom: 7px; }
.modal .modal-intro { color: var(--muted); margin-bottom: 18px; }
.form-grid { display: grid; gap: 13px; }
.form-grid label { display: grid; gap: 6px; color: #52667c; font-size: 12px; font-weight: 700; }
.form-grid input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--ink); }
.form-actions { display: flex; justify-content: flex-start; gap: 9px; margin-top: 20px; }
.toast { position: fixed; z-index: 30; left: 25px; bottom: 25px; max-width: min(390px, calc(100vw - 50px)); padding: 12px 15px; border-radius: 10px; color: #fff; background: var(--navy); box-shadow: var(--shadow); }
.toast.error { background: #ad3343; }
.role-badge { padding: 7px 10px; border-radius: 8px; background: var(--blue-soft); color: #1764aa; font-size: 12px; font-weight: 700; }
.file-link { color: var(--blue); text-decoration: none; font-weight: 700; }
.file-link:hover { text-decoration: underline; }
.task-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.task-files span, .modal-files a { padding: 7px 9px; border-radius: 7px; background: #eef5fb; color: #2d5b85; font-size: 12px; }
.modal-files { display: grid; gap: 7px; margin-bottom: 18px; }
.modal-section-title { margin: 20px 0 9px; }
.event-list { display: grid; gap: 9px; }
.event-list > div, .notification-item { padding: 10px; border-right: 3px solid #d8e3ee; background: #f8fafc; }
.event-list strong, .notification-item strong { display: block; font-size: 12px; }
.event-list span, .notification-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.notification-list { display: grid; gap: 8px; }
.notification-item.unread { border-right-color: var(--blue); background: var(--blue-soft); }
.login-screen { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #eaf3fb, #f9fbfd); }
.login-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin-top: 26px; }
.login-card > div > p, .login-card > p { margin-top: 8px; color: var(--muted); line-height: 1.7; }
.login-brand { display: grid; justify-items: start; gap: 7px; }
.login-brand .brand-mark { width: 43px; height: 43px; }
.login-brand .brand-logo { width: 126px; height: 96px; border-radius: 15px; }
.login-brand strong { color: var(--navy); font-size: 20px; }
.login-brand span { color: var(--muted); font-size: 14px; font-weight: 700; }
.login-form { margin-top: 22px; }
.login-form .primary-button { margin-top: 4px; }
.demo-accounts { margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); }
.demo-accounts strong { color: var(--navy); font-size: 13px; }
.demo-accounts p { margin: 5px 0 11px; color: var(--muted); font-size: 12px; }
.account-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.account-chips button { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; background: #fff; color: var(--navy); font-size: 12px; }
.account-chips button:hover { border-color: var(--blue); color: var(--blue); }

@media (max-width: 1000px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .task-layout { grid-template-columns: 1fr; }
  .workflow-head { display: none; }
  .workflow-card { grid-template-columns: 1fr; }
  .workflow-auction, .workflow-step { border-left: 0; border-bottom: 1px solid var(--line); }
  .workflow-step:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 15; top: 0; right: 0; width: 252px; min-height: 100vh; transform: translateX(105%); transition: .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: block; }
  .topbar { padding: 15px 18px; }
  .topbar-actions { gap: 8px; }
  .role-picker span { display: none; }
  .content { padding: 24px 18px 35px; }
  .content-heading { align-items: start; }
  .content-heading .primary-button { white-space: nowrap; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { padding: 13px; }
  .metric-value { font-size: 22px; }
  .auction-row { grid-template-columns: 1fr auto; gap: 10px; }
  .auction-row > :nth-child(2), .auction-row > :nth-child(3) { grid-column: 1; }
  .auction-row > :nth-child(4) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .files-grid { grid-template-columns: 1fr; }
  .task-topline { display: block; }
  .task-topline .status-badge { margin-top: 9px; }
  .login-card { padding: 25px 20px; }
}

/* Qemah — modern brand theme */
:root {
  --ink: #15231c;
  --muted: #68766e;
  --surface: #ffffff;
  --canvas: #f3f6f3;
  --line: #dfe7e1;
  --navy: #102019;
  --blue: #23864c;
  --blue-soft: #e9f6ed;
  --green: #23864c;
  --green-soft: #e9f6ed;
  --amber: #987126;
  --amber-soft: #fbf4e5;
  --red: #b83e4c;
  --red-soft: #fff0f1;
  --gold: #c7a65b;
  --gold-soft: #faf4e7;
  --shadow: 0 18px 50px rgba(24, 54, 38, .10);
  --shadow-soft: 0 8px 28px rgba(24, 54, 38, .07);
}

html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  background:
    radial-gradient(circle at 7% 2%, rgba(199, 166, 91, .10), transparent 24rem),
    var(--canvas);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font-family: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(35, 134, 76, .22);
  outline-offset: 2px;
}

.app-shell { background: transparent; }
.sidebar {
  position: sticky;
  top: 0;
  width: 282px;
  height: 100vh;
  min-height: 100vh;
  flex-basis: 282px;
  overflow-y: auto;
  padding: 25px 18px 20px;
  background:
    radial-gradient(circle at 15% 0%, rgba(62, 151, 93, .23), transparent 18rem),
    linear-gradient(165deg, #14271e 0%, #0d1813 70%, #101e18 100%);
  border-left: 1px solid rgba(255, 255, 255, .06);
  box-shadow: -14px 0 40px rgba(13, 35, 23, .08);
}
.brand {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 168px;
  margin: 0 0 26px;
  padding: 8px 10px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  text-align: center;
}
.brand-logo {
  width: 126px;
  height: 94px;
  padding: 5px;
  border: 1px solid rgba(199, 166, 91, .22);
  border-radius: 15px;
  background: #101211;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.brand strong { color: #fff; font-size: 18px; font-weight: 800; }
.brand span { color: #9eb2a5; font-size: 13px; font-weight: 600; }
.nav-list { gap: 7px; }
.nav-link {
  position: relative;
  min-height: 48px;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #b8c8be;
  font-weight: 650;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.nav-link > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #d8c486;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); transform: translateX(-2px); }
.nav-link.active {
  color: #fff;
  border-color: rgba(112, 190, 137, .14);
  background: linear-gradient(90deg, rgba(41, 139, 77, .34), rgba(255, 255, 255, .07));
  box-shadow: inset -3px 0 0 #61b87d;
}
.nav-link.active > span { background: #277e49; color: #fff; }
.nav-link b { background: var(--gold); color: #13241b; }
.sidebar-footer { margin-top: auto; padding: 19px 6px 0; border-color: rgba(255, 255, 255, .09); }
.sidebar-footer strong { font-size: 13px; }
.sidebar-footer span { color: #91a79a; }
.sidebar-backdrop { display: none; }
.clickable-card { cursor: pointer; }
.clickable-card:focus-visible { outline: 3px solid rgba(45, 146, 84, .32); outline-offset: 2px; }
.row-action { color: #237b48; font-size: 12px; font-weight: 800; white-space: nowrap; }
.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(145deg, #3c9d60, #1e6840);
  box-shadow: 0 7px 16px rgba(0, 0, 0, .18);
}
.more-button { color: #a8bcae; transition: color .18s, transform .18s; }
.more-button:hover { color: #fff; transform: translateX(-2px); }

.main-area { background: transparent; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 92px;
  padding: 19px 40px;
  border-color: rgba(214, 225, 217, .86);
  background: rgba(250, 252, 250, .88);
  box-shadow: 0 5px 22px rgba(26, 55, 39, .035);
  backdrop-filter: blur(15px);
}
.topbar h1 { color: #17271e; font-size: 23px; letter-spacing: -.25px; }
.eyebrow { color: #748279; font-weight: 600; }
.topbar-actions { gap: 10px; }
.role-badge {
  padding: 8px 12px;
  border: 1px solid #d9eadf;
  border-radius: 99px;
  background: rgba(233, 246, 237, .9);
  color: #277d48;
}
.notification-button {
  width: 42px;
  height: 42px;
  border-color: #dce6df;
  border-radius: 13px;
  color: #2a7747;
  box-shadow: 0 5px 16px rgba(29, 69, 44, .05);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.notification-button:hover {
  transform: translateY(-2px);
  border-color: #a9cdb5;
  box-shadow: 0 9px 22px rgba(29, 69, 44, .09);
}
.notification-button i { background: var(--red); box-shadow: 0 0 0 3px #fff; }
.mobile-menu { color: #1e5d38; }

.content { max-width: 1500px; padding: 35px 40px 56px; }
.content-heading { margin-bottom: 24px; }
.content-heading h2 { color: #15251b; font-size: 22px; letter-spacing: -.2px; }
.content-heading p { margin-top: 8px; line-height: 1.8; }
.primary-button, .secondary-button, .link-button {
  border-radius: 11px;
  transition: transform .17s ease, box-shadow .17s ease, background .17s ease, border-color .17s ease;
}
.primary-button {
  min-height: 42px;
  padding: 10px 17px;
  background: linear-gradient(135deg, #2a8e51, #1e6f41);
  box-shadow: 0 8px 18px rgba(31, 115, 67, .18);
}
.primary-button:hover {
  background: linear-gradient(135deg, #30995a, #237c49);
  box-shadow: 0 11px 23px rgba(31, 115, 67, .24);
  transform: translateY(-1px);
}
.secondary-button {
  min-height: 42px;
  padding: 10px 16px;
  border-color: #d9e4dc;
  color: #245f3b;
  background: #fff;
}
.secondary-button:hover { border-color: #9fc5ac; background: #f8fbf9; transform: translateY(-1px); }
.link-button { color: #287e49; }
.link-button:hover { color: #195d35; }

.alert {
  padding: 15px 17px;
  border-color: #f1cdd2;
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(184, 62, 76, .05);
}
.alert-symbol { width: 28px; height: 28px; }
.metrics { gap: 17px; margin-bottom: 27px; }
.metric {
  position: relative;
  min-height: 137px;
  overflow: hidden;
  padding: 21px;
  border-color: rgba(219, 229, 222, .9);
  border-radius: 19px;
  background: linear-gradient(145deg, #fff, #fbfdfb);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}
.metric::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  border-radius: 0 19px 19px 0;
  background: #5aac76;
}
.metric:nth-child(2)::after { background: #7cb48c; }
.metric:nth-child(3)::after { background: var(--gold); }
.metric:nth-child(4)::after { background: #b66c70; }
.metric:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(24, 54, 38, .11); }
.metric-label { font-weight: 700; }
.metric-value { margin: 10px 0 7px; color: #1c7040; font-size: 32px; line-height: 1; }
.metric-caption { line-height: 1.55; }

.dashboard-grid, .task-layout { gap: 22px; }
.panel {
  overflow: hidden;
  border-color: rgba(218, 228, 221, .95);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}
.panel-header { padding: 21px 22px 16px; }
.panel-header h3, .side-summary h3 { color: #17271d; font-size: 16px; }
.progress-track { height: 6px; background: #e9efeb; }
.progress-bar { background: linear-gradient(90deg, #3fa665, #257e4a); }
.auction-list { border-color: var(--line); }
.auction-row { padding: 18px 22px; border-color: #e7ede9; transition: background .17s ease; }
.auction-row:hover { background: #f8fbf9; }
.auction-name { color: #17271d; font-size: 14px; }
.auction-meta { margin-top: 6px; }
.stage-block strong { color: #314b3b; }
.row-menu { color: #7d8b82; }
.status-badge { padding: 6px 10px; border-radius: 99px; }
.status-waiting { background: #eaf6ed; color: #277a47; }
.status-ready { background: var(--gold-soft); color: #8a6722; }

.workflow-card {
  margin-bottom: 14px;
  border-color: #dce6df;
  border-radius: 17px;
  box-shadow: 0 7px 22px rgba(23, 56, 36, .05);
  transition: transform .18s, box-shadow .18s;
}
.workflow-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.workflow-auction, .workflow-step { padding: 18px 14px; border-color: #e5ece7; }
.workflow-step.active { background: linear-gradient(135deg, #eff9f2, #e5f4ea); color: #227545; }
.workflow-step.active::before { background: #2d9657; box-shadow: 0 0 0 4px rgba(45, 150, 87, .12); }

.task-card { padding: 23px; }
.task-card + .task-card { border-color: #e5ece7; }
.task-card h3 { color: #17271d; font-size: 16px; }
.task-detail {
  margin: 17px 0;
  padding: 14px 15px;
  border: 1px solid #e2ebe5;
  border-radius: 13px;
  background: #f7faf8;
  color: #496154;
  line-height: 1.75;
}
.task-actions { gap: 10px; }
.file-label {
  min-height: 42px;
  border-color: #a8c8b3;
  border-radius: 11px;
  color: #286f45;
  background: #fbfdfb;
  transition: background .17s, border-color .17s;
}
.file-label:hover { border-color: #4b9968; background: #f1f8f3; }
.side-summary { padding: 23px; }
.summary-line { padding: 12px 0; border-color: #e5ece7; }
.timeline-item { color: #496154; }
.timeline-item.current::before { background: #2b9254; box-shadow: 0 0 0 4px #e6f4eb; }

.files-grid { gap: 17px; }
.file-card {
  min-height: 151px;
  padding: 20px;
  border-color: #dce6df;
  border-radius: 18px;
  box-shadow: 0 7px 24px rgba(24, 54, 38, .055);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.file-card:hover { transform: translateY(-3px); border-color: #bad2c1; box-shadow: var(--shadow-soft); }
.file-icon {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: #e8f5ec;
  color: #277e49;
}
.settings-box { padding: 24px; }
.setting-row { padding: 18px 0; border-color: #e4ebe6; }
.push-settings { margin-bottom: 20px; }
.push-settings .setting-row { border-bottom: 0; }
.notification-toggle {
  min-width: 142px;
  min-height: 43px;
  padding: 10px 16px;
  border: 1px solid #2e9255;
  border-radius: 11px;
  background: #2e9255;
  color: #fff;
  font-weight: 800;
}
.notification-toggle.enabled { border-color: #d6a3a8; background: #fff4f4; color: #a53843; }
.notification-toggle:disabled { border-color: #d7e1da; background: #eef3ef; color: #718078; cursor: not-allowed; }
.notification-help { padding: 13px 15px; border-radius: 11px; background: #f1f7f3; color: #52675a; font-size: 12px; line-height: 1.8; }
.duration input, .form-grid input, .form-grid select, .role-picker select {
  min-height: 43px;
  border: 1px solid #d6e1d9;
  border-radius: 11px;
  background: #fff;
  color: #173021;
  transition: border-color .17s, box-shadow .17s;
}
.form-grid input, .form-grid select { padding: 11px 12px; }
.duration input:focus, .form-grid input:focus, .form-grid select:focus, .role-picker select:focus {
  border-color: #56a774;
  box-shadow: 0 0 0 4px rgba(49, 148, 86, .10);
  outline: 0;
}
.form-grid label { color: #425a4b; }
.switch:checked { background: #2a8d52; }

.modal-backdrop { background: rgba(10, 24, 16, .58); backdrop-filter: blur(7px); }
.modal {
  width: min(550px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(7, 30, 16, .24);
}
.close-modal { top: 15px; left: 15px; background: #eef4f0; color: #245e3b; }
.toast {
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  background: #153c28;
  box-shadow: 0 16px 40px rgba(9, 42, 23, .2);
}
.task-files span, .modal-files a { border-radius: 9px; background: #eef7f1; color: #286e44; }
.event-list > div, .notification-item { border-right-color: #b9d2c1; border-radius: 9px; background: #f7faf8; }
.notification-item.unread { border-right-color: #2e9255; background: #ebf7ef; }

.login-screen {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 30px;
  background:
    radial-gradient(circle at 18% 18%, rgba(199, 166, 91, .18), transparent 25rem),
    radial-gradient(circle at 90% 90%, rgba(56, 144, 86, .20), transparent 28rem),
    linear-gradient(145deg, #102019, #0a1510 72%);
}
.login-screen::before, .login-screen::after {
  content: '';
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 50%;
}
.login-screen::before { width: 420px; height: 420px; top: -230px; right: -120px; }
.login-screen::after { width: 540px; height: 540px; bottom: -330px; left: -170px; }
.login-card {
  position: relative;
  width: min(480px, 100%);
  padding: 39px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 25px;
  background: rgba(255, 255, 255, .965);
  box-shadow: 0 35px 90px rgba(0, 0, 0, .27);
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #2d9254 0 68%, #c7a65b 68% 100%);
}
.login-brand { justify-items: center; text-align: center; gap: 6px; }
.login-brand .brand-logo {
  width: 140px;
  height: 106px;
  padding: 5px;
  border-color: #d5c18c;
  border-radius: 19px;
  box-shadow: 0 15px 32px rgba(13, 31, 20, .16);
}
.login-brand strong { margin-top: 5px; color: #173421; font-size: 23px; font-weight: 800; }
.login-brand span { color: #4f6758; font-size: 16px; }
.login-card h1 { margin-top: 27px; color: #142a1c; font-size: 23px; text-align: center; }
.login-card > div > p, .login-card > p { text-align: center; }
.login-form { margin-top: 25px; }
.login-form .primary-button { width: 100%; min-height: 47px; margin-top: 8px; font-size: 15px; }
.install-button {
  width: 100%;
  min-height: 45px;
  margin-top: 12px;
  border: 1px solid #c8b06f;
  border-radius: 12px;
  background: #fbf6e9;
  color: #75591e;
  font-weight: 800;
  transition: transform .17s ease, border-color .17s ease, background .17s ease;
}
.install-button:hover { transform: translateY(-1px); border-color: #a98a43; background: #f7edcf; }
.install-app-nav {
  margin-top: 10px;
  border-color: rgba(216, 189, 115, .24);
  color: #ead89f;
  background: rgba(199, 166, 91, .08);
}
.install-app-nav:hover { border-color: rgba(216, 189, 115, .42); background: rgba(199, 166, 91, .14); }
.install-button.hidden, .install-app-nav.hidden { display: none; }
.demo-accounts { border-color: #e2e9e4; }
.account-chips button { border-color: #d8e4dc; border-radius: 10px; color: #286a43; }
.account-chips button:hover { border-color: #56a274; color: #1e7442; background: #f2f8f4; }

@media (max-width: 1100px) {
  .sidebar { width: 260px; flex-basis: 260px; }
  .content { padding-inline: 28px; }
  .topbar { padding-inline: 28px; }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    z-index: 15;
    top: 0;
    right: 0;
    width: min(282px, 88vw);
    height: 100vh;
    flex-basis: auto;
    transform: translateX(105%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open + .sidebar-backdrop {
    position: fixed;
    z-index: 14;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(7, 18, 12, .42);
    backdrop-filter: blur(2px);
  }
  .topbar { min-height: 79px; padding: 13px 17px; }
  .topbar h1 { font-size: 19px; }
  .role-badge { display: none; }
  .content { padding: 25px 16px 40px; }
  .content-heading { align-items: flex-start; gap: 13px; }
  .content-heading h2 { font-size: 20px; }
  .metrics { gap: 11px; }
  .metric { min-height: 126px; padding: 17px; border-radius: 16px; }
  .metric-value { font-size: 27px; }
  .panel { border-radius: 17px; }
  .auction-row { padding: 16px; }
  .login-screen { padding: 17px; }
  .login-card { padding: 30px 22px; border-radius: 21px; }
  .login-brand .brand-logo { width: 122px; height: 92px; }
  .modal { padding: 26px 20px; border-radius: 19px; }
}

@media (max-width: 480px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: auto; }
  .content-heading { display: grid; }
  .content-heading .primary-button { width: 100%; }
  .topbar-actions { margin-right: auto; }
  .push-settings .setting-row { align-items: stretch; }
  .notification-toggle { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
