@font-face { font-family: "Riseria Font"; src: url("../fonts/Riseria-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
.brand { position: relative; display: inline-flex; align-items: center; gap: 12px; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-mark-link { flex: 0 0 auto; display: inline-grid; color: inherit; }
.brand-mark { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; color: white; background: var(--blue); border-radius: 12px; font-size: 1.05rem; font-weight: 800; box-shadow: 0 7px 18px rgba(8,102,255,.24); }
.brand-mark-img { display: block; object-fit: contain; color: transparent; background: transparent; box-shadow: 0 7px 18px rgba(16,19,31,.18); }
.brand-copy { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 38px; line-height: 1.2; white-space: nowrap; transform: translateY(1px); }
.brand-title { display: block; color: var(--navy); font-family: "Riseria Font", Inter, system-ui, sans-serif; font-size: 1.28rem; font-weight: 400; letter-spacing: .02em; line-height: .9; }
.brand-title:hover { color: var(--blue); }
.brand-copy strong { font-size: .97rem; }
.brand-copy small { margin-top: 0; color: var(--subtle); font-family: Inter, system-ui, sans-serif; font-size: .68rem; }
.brand-developer a { color: var(--blue); font-weight: 700; }
.brand-developer a:hover { text-decoration: underline; }
.sidebar { position: sticky; z-index: 50; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--border); overflow: hidden; transition: width var(--transition), transform var(--transition); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 5px 23px; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: var(--transition); }
.icon-button:hover { color: var(--blue); background: var(--blue-soft); border-color: #bbd3ff; }
.nav-list { display: flex; flex-direction: column; gap: 6px; }
.nav-link { position: relative; display: flex; align-items: center; width: 100%; min-height: 44px; gap: 12px; padding: 9px 12px; color: #52627a; border-radius: 11px; font-size: .88rem; font-weight: 600; white-space: nowrap; transition: var(--transition); }
.nav-link:hover { color: var(--blue); background: #f3f7fd; }
.nav-link.is-active { color: var(--blue); background: var(--blue-soft); }
.nav-link.is-active::before { content: ""; position: absolute; left: -14px; height: 24px; width: 3px; background: var(--blue); border-radius: 0 4px 4px 0; }
.nav-icon { flex: 0 0 auto; display: grid; place-items: center; width: 22px; font-size: 1.12rem; }
.nav-icon svg { display: block; width: 20px; height: 20px; }
.nav-icon-image img { display: block; width: 20px; height: 20px; object-fit: contain; }
.nav-icon-sprite { width: 20px; height: 20px; background-repeat: no-repeat; background-size: auto; }
.nav-icon-dashboard { background-image: url("../images/dashboard-icon-sprite.webp"); background-position: 0 0; width: 24px; height: 24px; transform: scale(.84); transform-origin: center; }
.nav-icon-history { background-image: url("../images/history-icon-sprite.webp"); background-position: 0 -1184px; width: 36px; height: 36px; transform: scale(.56); transform-origin: center; }
.sidebar-footer { margin-top: auto; }
.sidebar-security { display: flex; align-items: center; gap: 12px; margin: 0 7px 13px; padding: 12px 8px; border-bottom: 1px solid var(--border); }
.sidebar-security .nav-label { display: flex; flex-direction: column; font-size: .75rem; }
.sidebar-security small { color: var(--muted); }
.security-dot { flex: 0 0 auto; width: 9px; height: 9px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 4px var(--success-soft); }
.nav-button { border: 0; background: transparent; cursor: pointer; }
.app-shell.is-collapsed .brand-copy, .app-shell.is-collapsed .nav-label { opacity: 0; pointer-events: none; }
.app-shell.is-collapsed .sidebar-collapse { transform: rotate(180deg); }
.app-shell.is-collapsed .nav-link { justify-content: center; padding-inline: 8px; }
.app-shell.is-collapsed .brand-row { justify-content: center; flex-wrap: wrap; }
.app-shell.is-collapsed .sidebar-collapse { width: 30px; height: 30px; }
.topbar { position: sticky; z-index: 40; top: 0; height: var(--topbar-height); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 3vw, 48px); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-title .eyebrow { margin: 0; font-size: .61rem; }
.mobile-menu { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; color: var(--blue); background: var(--blue-soft); border: 1px solid #cfe0ff; border-radius: 50%; font-weight: 700; }
.user-chip-copy { display: flex; flex-direction: column; max-width: 190px; line-height: 1.25; }
.user-chip-copy strong, .user-chip-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-copy strong { font-size: .83rem; }.user-chip-copy small { color: var(--muted); font-size: .7rem; }
.drawer-scrim { display: none; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.panel-heading h3, .panel-heading p { margin-bottom: 0; }.panel-heading p { font-size: .83rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 9px 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .86rem; transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition); }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.button-primary { color: white; background: var(--blue); box-shadow: 0 7px 16px rgba(8,102,255,.18); }
.button-primary:hover { color: white; background: var(--blue-dark); box-shadow: 0 10px 20px rgba(8,102,255,.24); }
.button-secondary { color: var(--navy); background: var(--surface); border-color: var(--border-strong); }
.button-secondary:hover { color: var(--blue); border-color: var(--blue); }
.button-danger-quiet { color: var(--error); background: var(--error-soft); border-color: #ffd0ca; }
.button-full { width: 100%; }
.text-link { flex: 0 0 auto; font-size: .82rem; font-weight: 700; }
.field-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; min-width: 0; }
.field-group label { color: #344054; font-size: .81rem; font-weight: 700; }
.form-control { width: 100%; min-height: 44px; padding: 10px 13px; color: var(--navy); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.form-control:hover { border-color: #9eb5d1; }
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(8,102,255,.1); }
textarea.form-control { resize: vertical; }
.password-field { position: relative; }
.password-field .form-control { padding-right: 58px; }
.password-field button { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 5px 7px; color: var(--blue); background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-size: .73rem; font-weight: 700; }
.check-row { display: flex; align-items: center; gap: 9px; margin: -2px 0 20px; color: var(--muted); font-size: .82rem; cursor: pointer; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--blue); }
.field-error { color: var(--error); font-size: .76rem; }
.form-hint { margin: -7px 0 20px; font-size: .76rem; }
.form-grid { display: grid; gap: 0 20px; }.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }.field-span { grid-column: 1 / -1; }
.warning-callout, .error-callout, .result-callout { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 22px; padding: 14px 16px; border-radius: 11px; }
.warning-callout { color: #8c5200; background: var(--warning-soft); border: 1px solid #f3d99e; }
.warning-callout > span { flex: 0 0 auto; display: grid; place-items: center; width: 23px; height: 23px; color: white; background: var(--warning); border-radius: 50%; font-weight: 800; }
.warning-callout p, .warning-callout strong { color: inherit; }.warning-callout p { margin: 2px 0 0; font-size: .81rem; }.warning-callout.compact { align-items: center; padding: 11px 13px; }.warning-callout.compact p { margin: 0; }
.error-callout { color: var(--error); background: var(--error-soft); border: 1px solid #ffc9c4; }.error-callout p { color: #9f251b; margin: 3px 0 0; }
.result-callout { color: var(--success); background: var(--success-soft); border: 1px solid #b9e8cf; }.result-callout > span { font-weight: 800; }.result-callout p { color: #306b4e; margin: 3px 0 0; }
.toast-stack { position: fixed; z-index: 100; top: 90px; right: 22px; display: grid; gap: 10px; width: min(390px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 13px 14px; color: var(--navy); background: white; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); }
.toast-dot { width: 9px; height: 9px; background: var(--blue); border-radius: 50%; }.toast-success .toast-dot { background: var(--success); }.toast-warning .toast-dot { background: var(--warning); }.toast-error .toast-dot { background: var(--error); }
.toast-close { padding: 3px 6px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 1.1rem; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 5px 9px; color: var(--muted); background: #f2f4f7; border-radius: 999px; font-size: .69rem; font-weight: 700; white-space: nowrap; }.status-dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }.status-queued { color: var(--warning); background: var(--warning-soft); }.status-running { color: var(--blue); background: var(--blue-soft); }.status-completed { color: var(--success); background: var(--success-soft); }.status-failed, .status-cancelled { color: var(--error); background: var(--error-soft); }
.progress-track { height: 7px; overflow: hidden; background: #e9eef5; border-radius: 99px; }.progress-track span { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .35s ease; }
.progress-large { height: 11px; }
.empty-state { display: grid; place-items: center; padding: 60px 20px; text-align: center; }.empty-state.compact { padding: 30px 18px; }.empty-state h3 { margin: 12px 0 5px; }.empty-state p { max-width: 460px; margin-bottom: 20px; }.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; color: var(--blue); background: var(--blue-soft); border-radius: 14px; font-size: 1.25rem; }
.error-page { min-height: calc(100vh - 160px); display: grid; place-content: center; justify-items: center; padding: 40px 20px; text-align: center; }.error-page > span { color: var(--blue); font-size: 4rem; font-weight: 800; }.error-page p { max-width: 480px; }
@media (max-width: 720px) {
  .sidebar { position: fixed; width: min(280px, 88vw); transform: translateX(-105%); box-shadow: var(--shadow-md); }
  .app-shell.drawer-open .sidebar { transform: translateX(0); }
  .app-shell.drawer-open .drawer-scrim { position: fixed; z-index: 45; inset: 0; display: block; background: rgba(23,43,77,.34); }
  .sidebar-collapse { display: none; }.mobile-menu { display: inline-grid; }
  .topbar { height: 68px; padding: 0 16px; }.user-chip-copy { display: none; }.topbar-title .eyebrow { display: none; }
  .form-grid.two-columns { grid-template-columns: 1fr; }
  .toast-stack { top: 78px; right: 16px; }
}

/* Card-add success overlay */
.card-success-overlay {
  position: fixed; z-index: 5000; inset: 0;
  display: grid; place-items: center;
  background: rgba(23,43,77,.45);
}
.card-success-dialog {
  background: white; border-radius: 16px;
  padding: 32px 36px; text-align: center;
  max-width: 400px; width: calc(100vw - 40px);
  box-shadow: 0 20px 50px rgba(23,43,77,.25);
}
.card-success-heading {
  margin: 0 0 8px; font-size: 1.2rem; color: var(--success);
}
.card-success-message {
  margin: 0 0 20px; color: var(--subtle); font-size: .92rem;
}
.card-success-timer {
  display: inline-block; padding: 8px 18px;
  background: var(--blue-soft); color: var(--blue);
  border-radius: 999px; font-size: .82rem; font-weight: 700;
}
