:root {
  color-scheme:light;
  --brand:#4f46e5;
  --brand-hover:#4338ca;
  --brand-light:#eef2ff;
  --background:#f8fafc;
  --surface:#fff;
  --text:#1e293b;
  --muted:#64748b;
  --line:#e2e8f0;
  --danger:#dc2626;
  --radius:12px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
  font-size:14px;
  line-height:1.5;
  color:var(--text);
  background:var(--background)
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
a {
  color:inherit;
  text-decoration:none
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
button:disabled {
  cursor:not-allowed;
  opacity:.55
}
svg {
  width:20px;
  height:20px;
  flex-shrink:0
}
h1,h2,p {
  margin:0
}
h1 {
  font-size:24px;
  line-height:1.25;
  letter-spacing:-.6px;
  font-weight:750;
  color:#0f172a
}
h2 {
  font-size:17px;
  font-weight:650
}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible {
  outline:3px solid #a5b4fc;
  outline-offset:3px
}
.muted {
  color:var(--muted);
  margin-top:5px
}
.card {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 1px 3px #0f172a06,0 1px 2px #0f172a04;
  padding:24px
}
.btn-primary,.btn-secondary,.btn-danger {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  border:1px solid transparent;
  border-radius:8px;
  padding:9px 16px;
  font-size:14px;
  font-weight:600;
  transition:background .15s,border-color .15s,box-shadow .15s;
  white-space:nowrap
}
.btn-primary {
  background:var(--brand);
  color:white;
  box-shadow:0 1px 2px #0f172a10
}
.btn-primary:hover:not(:disabled) {
  background:var(--brand-hover);
  box-shadow:0 2px 4px #0f172a15
}
.btn-primary svg {
  width:16px;
  height:16px
}
.btn-secondary {
  background:white;
  border-color:#cbd5e1;
  color:#334155;
  font-weight:500;
  box-shadow:0 1px 2px #0f172a06
}
.btn-secondary:hover:not(:disabled) {
  background:#f8fafc
}
.btn-danger {
  background:var(--danger);
  color:white
}
.btn-danger:hover:not(:disabled) {
  background:#b91c1c
}
.text-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:0;
  background:transparent;
  min-height:44px;
  padding:8px;
  color:var(--muted);
  font-weight:500
}
.text-button:hover {
  color:var(--brand)
}
.danger-text {
  color:var(--danger)
}
.danger-text:hover {
  color:#b91c1c
}
.input {
  display:block;
  width:100%;
  min-height:42px;
  padding:10px 13px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  color:#0f172a;
  background:white;
  box-shadow:0 1px 2px #0f172a03;
  transition:border-color .15s,box-shadow .15s
}
.input:focus {
  outline:0;
  border-color:#818cf8;
  box-shadow:0 0 0 3px #6366f124
}
.input::placeholder {
  color:#94a3b8
}
.input[aria-invalid=true] {
  border-color:#f87171
}
select.input {
  padding-right:30px
}
textarea.input {
  resize:vertical;
  min-height:112px
}
.label {
  display:block;
  margin-bottom:6px;
  font-size:14px;
  font-weight:550;
  color:#334155
}
.form-field {
  margin-bottom:20px
}
.required {
  color:#94a3b8
}
.field-help {
  color:#64748b;
  font-size:12px;
  margin-top:6px
}
.field-error {
  color:#dc2626;
  font-size:12px;
  margin-top:6px
}
.alert,.success,.info-message {
  border-radius:9px;
  padding:12px 15px;
  margin:0 0 20px;
  font-size:14px;
  border:1px solid
}
.alert {
  background:#fef2f2;
  border-color:#fecaca;
  color:#b91c1c
}
.success {
  background:#ecfdf5;
  border-color:#a7f3d0;
  color:#047857
}
.info-message {
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1d4ed8
}
.icon-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  padding:10px;
  border:0;
  border-radius:8px;
  color:#64748b;
  background:transparent;
  transition:color .15s,background .15s
}
.icon-button:hover {
  color:var(--brand);
  background:var(--brand-light)
}
.logout:hover {
  color:#dc2626;
  background:#fef2f2
}
.brand {
  display:flex;
  align-items:center;
  gap:11px
}
.brand-mark {
  display:flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  color:white;
  background:linear-gradient(135deg,#6366f1,#4338ca);
  border-radius:10px;
  box-shadow:0 4px 8px #6366f121
}
.brand-mark svg {
  width:23px;
  height:23px
}
.brand strong {
  display:block;
  font-size:19px;
  line-height:1.15;
  letter-spacing:-.5px;
  color:#0f172a
}
.brand small {
  display:block;
  margin-top:4px;
  color:#94a3b8;
  font-size:10px;
  letter-spacing:.1px
}
.app-shell {
  display:flex;
  min-height:100dvh
}
.sidebar {
  display:flex;
  flex-direction:column;
  width:240px;
  min-height:100dvh;
  position:fixed;
  inset:0 auto 0 0;
  background:white;
  border-right:1px solid var(--line);
  z-index:20
}
.brand-link {
  padding:24px 22px 21px;
  border-bottom:1px solid #f1f5f9
}
.company-box {
  padding:20px 15px;
  border-bottom:1px solid #f1f5f9
}
.company-box label {
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:9px;
  padding-left:3px;
  font-size:10px;
  font-weight:650;
  letter-spacing:1px;
  color:#94a3b8;
  text-transform:uppercase
}
.company-box label svg {
  width:13px;
  height:13px
}
.company-box select {
  font-size:12px;
  font-weight:600;
  border-color:#e2e8f0;
  min-height:42px;
  background:#f8fafc
}
.sidebar nav {
  padding:24px 12px
}
.nav-caption {
  padding:0 12px;
  margin-bottom:10px;
  font-size:9px;
  font-weight:700;
  color:#94a3b8;
  letter-spacing:1.3px
}
.nav-item {
  display:flex;
  align-items:center;
  gap:11px;
  padding:11px 12px;
  border-radius:8px;
  font-size:13px;
  font-weight:600
}
.nav-item svg {
  width:18px;
  height:18px
}
.nav-item.active {
  background:var(--brand-light);
  color:var(--brand)
}
.sidebar-footer {
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:auto;
  padding:20px 19px;
  border-top:1px solid #f1f5f9;
  font-size:9px;
  color:#94a3b8
}
.version-dot {
  width:5px;
  height:5px;
  background:#a5b4fc;
  border-radius:50%
}
.workspace {
  display:flex;
  flex-direction:column;
  width:calc(100% - 240px);
  min-height:100dvh;
  margin-left:240px
}
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:72px;
  padding:0 32px;
  background:#ffffffed;
  border-bottom:1px solid var(--line)
}
.breadcrumb {
  display:flex;
  align-items:center;
  gap:13px;
  font-size:12px;
  color:#94a3b8
}
.breadcrumb strong {
  color:#475569;
  font-weight:500
}
.user-area {
  display:flex;
  align-items:center;
  gap:12px
}
.user-name {
  text-align:right
}
.user-name strong {
  display:block;
  font-size:12px;
  font-weight:600;
  color:#334155
}
.user-name small {
  display:block;
  font-size:10px;
  color:#94a3b8;
  margin-top:2px
}
.avatar {
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  background:linear-gradient(135deg,#6366f1,#4338ca);
  border-radius:50%;
  font-size:12px;
  font-weight:650;
  color:white
}
.user-area .logout {
  border-left:1px solid #e2e8f0;
  border-radius:0;
  padding-left:16px;
  margin-left:1px
}
.user-area .logout svg {
  width:17px;
  height:17px
}
.mobile-toggle {
  display:none
}
main {
  flex:1;
  width:100%;
  max-width:1600px;
  margin:0 auto;
  padding:36px 36px 48px;
  outline:none
}
.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:25px
}
.page-heading .muted {
  font-size:13px
}
.filters {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:22px
}
.search-field {
  position:relative;
  flex:1;
  max-width:330px;
  min-width:180px
}
.search-field>svg {
  position:absolute;
  left:12px;
  top:12px;
  width:17px;
  height:17px;
  color:#94a3b8
}
.search-field .input {
  padding-left:38px
}
.filters select {
  font-size:13px
}
.filters>div:nth-child(2) {
  min-width:135px
}
.filters>div:nth-child(3) {
  min-width:200px
}
.table-wrapper {
  overflow:auto;
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 1px 3px #0f172a05
}
table {
  border-collapse:collapse;
  width:100%;
  font-size:13px
}
th {
  text-align:left;
  padding:13px 20px;
  background:#f8fafccc;
  border-bottom:1px solid var(--line);
  font-size:10px;
  letter-spacing:.8px;
  text-transform:uppercase;
  color:#64748b;
  font-weight:650;
  white-space:nowrap
}
td {
  padding:13px 20px;
  border-bottom:1px solid #f1f5f9;
  color:#475569;
  height:66px
}
tr:last-child td {
  border:0
}
tbody tr:hover {
  background:#eef2ff30
}
td.publication-name {
  font-weight:550;
  color:#0f172a
}
.actions-cell {
  text-align:right;
  width:100px
}
.edit-button {
  min-height:36px;
  min-width:36px;
  border:1px solid #e2e8f0;
  background:white;
  padding:8px
}
.edit-button svg {
  width:15px;
  height:15px
}
.badge {
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border-radius:20px;
  font-size:11px;
  font-weight:600
}
.badge-green {
  background:#d1fae5;
  color:#047857
}
.badge-red {
  background:#fee2e2;
  color:#b91c1c
}
.pagination {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:19px;
  gap:20px;
  color:#64748b;
  font-size:12px
}
.pagination-controls {
  display:flex;
  align-items:center;
  gap:14px
}
.pagination .btn-secondary {
  font-size:12px;
  min-height:36px;
  padding:6px 12px
}
.empty-state {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:64px 24px
}
.empty-state>svg {
  width:42px;
  height:42px;
  color:#cbd5e1;
  margin-bottom:16px
}
.empty-state h2 {
  font-size:14px;
  color:#64748b
}
.empty-state p {
  margin-top:7px;
  font-size:12px;
  color:#94a3b8
}
.loading {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:160px;
  font-size:13px;
  color:#64748b
}
.spinner {
  width:19px;
  height:19px;
  border:2px solid #e2e8f0;
  border-top-color:#6366f1;
  border-radius:50%;
  animation:spin .7s linear infinite
}
.workspace-footer {
  padding:18px 36px;
  color:#a1adbd;
  font-size:10px;
  text-align:center
}
.back-link {
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#64748b;
  font-size:12px;
  min-height:32px;
  margin-bottom:14px
}
.back-link:hover {
  color:var(--brand)
}
.back-link svg {
  width:15px;
  height:15px
}
.form-page {
  max-width:620px;
  margin:0 auto
}
.publication-form {
  padding:28px
}
.publication-form fieldset {
  padding:0;
  margin:0;
  border:0;
  min-width:0
}
.publication-form fieldset:disabled {
  opacity:.8
}
.checkbox-field {
  display:flex;
  align-items:center;
  gap:8px;
  margin:3px 0 22px
}
.checkbox-field input {
  width:16px;
  height:16px;
  accent-color:var(--brand)
}
.checkbox-field label {
  font-size:13px;
  color:#475569
}
.form-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  padding-top:8px
}
.form-actions .danger-text {
  margin-left:auto;
  font-size:12px
}
.publication-logo {
  width:160px;
  height:70px;
  object-fit:contain;
  border:1px solid var(--line);
  border-radius:8px;
  padding:8px
}
.delete-confirm {
  border-color:#fecaca;
  margin-top:20px
}
.delete-confirm p {
  margin-top:8px;
  font-size:13px;
  color:#64748b
}
.delete-confirm .form-actions {
  margin-top:16px
}
.login-page,.selection-page {
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:radial-gradient(ellipse at 85% 20%,#eef2ff75,transparent 65%),#f8fafc;
  padding:40px 24px
}
.login-content {
  width:100%;
  max-width:395px
}
.login-content>.brand {
  flex-direction:column;
  gap:16px;
  text-align:center;
  margin-bottom:30px
}
.login-content>.brand .brand-mark {
  height:60px;
  width:60px;
  border-radius:16px;
  box-shadow:0 12px 20px #6366f128
}
.login-content>.brand .brand-mark svg {
  height:32px;
  width:32px
}
.login-content>.brand strong {
  font-size:25px
}
.login-content>.brand small {
  font-size:13px;
  color:#64748b;
  margin-top:6px
}
.login-card {
  padding:30px;
  border-radius:16px;
  box-shadow:0 16px 24px #cbd5e130
}
.login-card h1 {
  font-size:19px;
  text-align:center;
  letter-spacing:-.2px
}
.login-card>.muted {
  text-align:center;
  font-size:12px;
  margin-bottom:25px;
  margin-top:7px
}
.login-card .form-field {
  margin-bottom:18px
}
.login-card .label {
  font-size:12px
}
.login-submit {
  width:100%;
  margin-top:6px
}
.login-footer {
  margin-top:25px;
  text-align:center;
  font-size:10px;
  color:#94a3b8
}
.startup-overlay {
  position:fixed;
  inset:0;
  z-index:50;
  background:#f8fafcf7;
  display:flex;
  align-items:center;
  justify-content:center
}
.screen-center {
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px
}
.recovery {
  max-width:480px;
  display:flex;
  flex-direction:column;
  gap:16px
}
.recovery .alert {
  margin:0
}
.selection-content {
  width:100%;
  max-width:480px
}
.selection-content>.brand {
  justify-content:center;
  margin-bottom:32px
}
.selection-heading {
  text-align:center;
  margin-bottom:28px
}
.selection-heading h1 {
  font-size:24px
}
.selection-heading p {
  font-size:13px
}
.company-list {
  display:flex;
  flex-direction:column;
  gap:12px
}
.company-choice {
  display:flex;
  align-items:center;
  gap:16px;
  text-align:left;
  width:100%;
  padding:19px 20px;
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:0 1px 3px #0f172a05;
  transition:box-shadow .15s,border-color .15s,transform .15s
}
.company-choice:hover {
  border-color:#a5b4fc;
  box-shadow:0 4px 8px #0f172a08;
  transform:translateY(-1px)
}
.company-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  flex-shrink:0;
  border-radius:11px;
  background:#f1f5f9;
  color:#64748b
}
.company-choice strong {
  display:block;
  font-size:14px;
  color:#0f172a
}
.company-choice small {
  display:block;
  font-size:11px;
  color:#94a3b8;
  margin-top:5px
}
.company-chevron {
  margin-left:auto;
  color:#94a3b8;
  font-size:24px
}
.selection-logout {
  display:flex;
  margin:24px auto 0;
  font-size:12px
}
.selection-logout svg {
  height:16px;
  width:16px
}
.sr-only,.skip-link {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}
.skip-link:focus {
  position:fixed;
  top:12px;
  left:12px;
  z-index:100;
  width:auto;
  height:auto;
  clip:auto;
  background:white;
  color:var(--brand);
  padding:12px;
  border:1px solid var(--brand);
  border-radius:6px
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
@media(min-width:1500px) {
  main {
    padding:42px 48px
  }
}
@media(max-width:1000px) {
  .sidebar {
    width:214px
  }
  .workspace {
    margin-left:214px;
    width:calc(100% - 214px)
  }
  main {
    padding:28px 24px
  }
  .topbar {
    padding:0 24px
  }
  .filters {
    gap:10px
  }
  .filters>div:nth-child(3) {
    min-width:180px
  }
  .search-field {
    max-width:unset
  }
}
@media(max-width:760px) {
  .sidebar {
    display:none;
    position:fixed;
    top:64px;
    bottom:0;
    width:240px;
    min-height:unset;
    box-shadow:8px 0 18px #0f172a0c
  }
  .sidebar.mobile-open {
    display:flex
  }
  .sidebar .brand-link {
    display:none
  }
  .workspace {
    margin-left:0;
    width:100%
  }
  .topbar {
    height:64px;
    padding:0 15px;
    gap:10px
  }
  .mobile-toggle {
    display:inline-flex
  }
  .breadcrumb {
    margin-right:auto;
    font-size:11px;
    gap:8px
  }
  .breadcrumb>span:first-child {
    display:none
  }
  .breadcrumb>span:nth-child(2) {
    display:none
  }
  .user-name {
    display:none
  }
  .user-area {
    gap:8px
  }
  .user-area .logout {
    padding-left:10px
  }
  .avatar {
    width:30px;
    height:30px;
    font-size:10px
  }
  main {
    padding:26px 18px
  }
  .page-heading {
    align-items:flex-start;
    gap:14px;
    margin-bottom:23px
  }
  .page-heading h1 {
    font-size:22px
  }
  .page-heading .btn-primary {
    padding:9px 12px;
    font-size:12px;
    min-height:40px
  }
  .page-heading .muted {
    font-size:12px;
    max-width:210px
  }
  .filters>.search-field {
    flex-basis:100%;
    max-width:100%
  }
  .filters>div:nth-child(2) {
    flex:1;
    min-width:110px
  }
  .filters>div:nth-child(3) {
    flex:1;
    min-width:175px
  }
  .filters .input {
    font-size:12px
  }
  th,td {
    padding-left:14px;
    padding-right:14px
  }
  table {
    min-width:510px
  }
  .pagination {
    flex-direction:column;
    gap:12px;
    align-items:flex-start
  }
  .pagination-controls {
    width:100%;
    justify-content:space-between;
    gap:7px
  }
  .pagination-controls>span {
    font-size:11px
  }
  .publication-form {
    padding:21px
  }
  .form-actions .danger-text {
    width:100%;
    margin-left:0;
    justify-content:flex-start;
    padding-left:0
  }
  .form-page {
    max-width:100%
  }
  .workspace-footer {
    padding:20px 18px
  }
  .login-page,.selection-page {
    padding:30px 20px
  }
  .login-card {
    padding:25px
  }
  .login-content {
    max-width:380px
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms!important;
    transition-duration:.01ms!important
  }
}

.sidebar nav{flex:1;overflow-y:auto;min-height:0;padding-bottom:20px;scrollbar-width:thin}
.sidebar{display:flex;flex-direction:column}.sidebar .nav-caption{margin-top:24px}.sidebar-footer{flex-shrink:0}
.nav-item{min-height:40px}.topbar{gap:14px}.topbar .breadcrumb{margin-right:auto;min-width:0}.topbar .user-area{gap:10px}
.language-select{width:145px;font-size:12px;padding:7px 9px;min-height:34px}.language-control{display:block}
.public-controls{position:absolute;right:24px;top:20px;display:flex;gap:8px;align-items:center}
.provider-login{margin-top:24px;text-align:center}.provider-login>p{margin-bottom:14px}.provider-login>div{display:flex;justify-content:center}
.global-search{position:relative}.search-trigger{display:flex;gap:9px;align-items:center;width:auto;padding:7px 10px;font-size:12px}.search-trigger kbd{color:var(--muted);font-size:10px;border:1px solid var(--line);border-radius:4px;padding:1px 4px}
.global-search-panel{position:absolute;right:0;top:45px;width:440px;max-height:70vh;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:16px;box-shadow:0 12px 40px #0f172a25;z-index:90}.global-search-panel h3{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:16px 0 5px}.search-result{display:block;border-radius:6px;padding:9px 8px}.search-result:hover,.search-result:focus{background:var(--brand-light)}
.notification-link{position:relative;font-size:24px}.notification-count{position:absolute;top:-2px;right:-3px;min-width:17px;height:17px;padding:0 4px;background:var(--danger);color:#fff;font-size:10px;line-height:17px;border-radius:9px}
.dark{color-scheme:dark;--brand:#a5b4fc;--brand-hover:#c7d2fe;--brand-light:#252f52;--background:#101726;--surface:#192235;--text:#e2e8f0;--muted:#a5b1c6;--line:#344056;--danger:#fb7185}
.dark body,.dark .workspace{background:var(--background);color:var(--text)}.dark .topbar,.dark .sidebar,.dark .card,.dark .modal{background:var(--surface);color:var(--text);border-color:var(--line)}
.dark h1,.dark h2,.dark h3,.dark strong,.dark td,.dark th,.dark .label{color:var(--text)}.dark .input,.dark input,.dark textarea,.dark select{background:#101a2c;color:var(--text);border-color:var(--line)}.dark .btn-secondary,.dark .icon-button{background:var(--surface);color:var(--text);border-color:var(--line)}.dark .btn-primary{background:#6366f1;color:#fff}.dark .btn-primary:hover{background:#818cf8}.dark table thead,.dark .filters,.dark .company-box{background:#172031}.dark tbody tr:hover{background:#212e45}.dark .nav-item.active{background:#303557;color:#c7d2fe}.dark .alert{background:#40212c;color:#fda4af;border-color:#7f3149}.dark .success{background:#133d36;color:#a7f3d0;border-color:#286052}.dark .login-page,.dark .selection-page{background:var(--background)}
@media(max-width:1200px){.topbar .user-name{display:none}.search-trigger kbd{display:none}.topbar .breadcrumb{display:none}}
@media(max-width:700px){.topbar{gap:6px;padding-left:12px;padding-right:12px}.topbar .user-area{gap:4px}.topbar .avatar{display:none}.language-select{width:116px;font-size:11px}.search-trigger span{display:none}.search-trigger{padding:7px}.global-search-panel{position:fixed;left:12px;right:12px;top:70px;width:auto}.public-controls{position:static;justify-content:flex-end;margin-bottom:18px}.login-page{display:block}.sidebar nav{max-height:calc(100vh - 225px)}}

/* Keep the collapsed mobile drawer hidden after the shared desktop layout. */
@media(max-width:760px){.sidebar{display:none}.sidebar.mobile-open{display:flex}}
