/* Admin visual system. Screen styles retain their responsive layout and behavior. */
@import url('./commerce-ui.css');
@import url('./workspace-ui.css');

:root {
  color: #1a1a1a;
  background: #f7f7f7;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e7e7e7;
  --surface: #fff;
  --accent: #1a1a1a;
  --sidebar-width: 252px;
  --radius: 16px;
  --shadow: none;
  --control-height: 44px;
}
body { background: #f7f7f7; }
h1 { color: #151515; font-size: 32px; font-weight: 720; letter-spacing: -1.05px; line-height: 1.2; }
h2 { color: #1a1a1a; font-size: 18px; font-weight: 650; letter-spacing: -.35px; }
h3 { color: #1a1a1a; font-size: 15px; font-weight: 600; }

/* A quiet white navigation rail with clear, neutral selection. */
.sidebar { padding: 18px 12px 20px; background: #fff; border-right-color: var(--border); }
.sidebar-brand { min-height: 90px; gap: 10px; padding: 0 14px 20px; margin-bottom: 12px; border-bottom: 1px solid #eee; }
.sidebar-brand .logo { width: 112px; height: auto; }
.sidebar-brand .admin-label { padding: 4px 9px; border: 0; border-radius: 999px; background: #f0f0f0; color: #555; font-size: 11px; letter-spacing: .1px; text-transform: none; }
.sidebar-nav { gap: 4px; }
.nav-link { min-height: 46px; gap: 12px; padding: 10px 14px; border-radius: 9px; color: #222; font-size: 15px; font-weight: 550; }
.nav-link .icon { width: 21px; height: 21px; color: #292929; }
.nav-link:hover { background: #f6f6f6; color: #151515; }
.nav-link[aria-current='page'] { background: #efefef; color: #111; box-shadow: none; font-weight: 650; }
.nav-link[aria-current='page'] .icon { color: #161616; }
.sidebar-footer { margin-top: auto; padding: 10px 0 0; border-top-color: #ebebeb; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #f0f0f0; color: #3a3a3a; }
/* Account details and session actions appear only when the profile is opened. */
.staff-account { position: relative; }
.account-trigger { width: 100%; min-height: 64px; gap: 10px; margin: 0; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: #222; text-align: left; }
.account-trigger:hover, .account-trigger[aria-expanded='true'] { background: #f3f3f3; }
.account-trigger .signed-in-text { flex: 1; }
.account-trigger .signed-in-name { display: block; font-size: 13px; font-weight: 600; }
.account-caption { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; color: var(--muted); }
.account-trigger > .icon { width: 16px; height: 16px; color: #777; transform: rotate(-90deg); }
.account-trigger[aria-expanded='true'] > .icon { transform: rotate(90deg); }
.account-panel { position: absolute; z-index: 2; bottom: calc(100% + 8px); inset-inline: 0; max-height: min(360px, calc(100dvh - 90px)); overflow-y: auto; padding: 6px; border: 1px solid #dedede; border-radius: 12px; background: #fff; box-shadow: 0 8px 28px #00000014; }
.account-identity { padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid #eee; }
.account-role { font-size: 12px; font-weight: 600; color: #333; }
.account-panel .signed-in-email { margin-top: 4px; font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.account-panel .logout-button { min-height: 44px; gap: 10px; padding: 10px; border-radius: 7px; font-size: 13px; color: #333; text-decoration: none; }
.account-panel .logout-button:hover:not(:disabled) { background: #f3f3f3; }
#account-alert .alert { gap: 8px; margin: 0 4px 8px; padding: 10px; border-radius: 8px; font-size: 12px; overflow-wrap: anywhere; }

.main { padding: 32px clamp(24px, 3vw, 44px) 48px; }
.page-heading { gap: 16px; align-items: center; margin-bottom: 26px; }
.page-heading p { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.heading-actions { gap: 10px; }
.breadcrumb { margin-bottom: 16px; font-size: 13px; }
.breadcrumb a { min-height: 32px; color: #666; }
.company-tabs { gap: 28px; margin-bottom: 26px; border-bottom-color: #e3e3e3; }
.company-tabs a { min-height: 48px; padding: 10px 0 12px; border-bottom-width: 2px; color: #656565; font-size: 14px; font-weight: 550; }
.company-tabs a[aria-current='page'] { color: #171717; border-bottom-color: #171717; font-weight: 650; }

/* Consistent controls: clear primary actions and light secondary buttons. */
.button { min-height: var(--control-height); gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 999px; background: #ededed; color: #222; box-shadow: none; font-size: 14px; font-weight: 600; line-height: 1.35; }
.button:hover:not(:disabled) { border-color: transparent; background: #e4e4e4; }
.button.primary { border-color: #1a1a1a; background: #1a1a1a; color: #fff; box-shadow: none; }
.button.primary:hover:not(:disabled) { border-color: #333; background: #333; }
.button.danger { border-color: transparent; color: #a72419; background: #fff0ee; }
.button.danger:hover:not(:disabled) { background: #fce4e0; }
.button.small-button, .button.small { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.button .icon { width: 18px; height: 18px; }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #272727; box-shadow: none; }
.icon-button:hover:not(:disabled) { background: #eaeaea; }
.text-button { min-height: 40px; font-weight: 550; color: #333; text-underline-offset: 3px; }
input:where(:not([type='checkbox']):not([type='radio'])), select, textarea { border-color: #d5d5d5; border-radius: 10px; background: #fff; color: #1a1a1a; font-size: 14px; box-shadow: none; }
input:where(:not([type='checkbox']):not([type='radio'])), select { min-height: var(--control-height); }
input:where(:not([type='checkbox']):not([type='radio'])) { padding: 10px 13px; }
textarea { padding: 12px 14px; }
input::placeholder, textarea::placeholder { color: #777; }
input:focus, select:focus, textarea:focus { border-color: #333; }
input[type='checkbox'], input[type='radio'] { accent-color: #1a1a1a; }
.field label { color: #333; font-size: 13px; font-weight: 600; }
.form-hint { color: var(--muted); line-height: 1.6; }

.panel { border-color: var(--border); border-radius: var(--radius); background: #fff; box-shadow: none; }
.panel-heading { padding: 20px 24px; border-bottom-color: #ededed; }
.panel-heading h2 { font-size: 17px; }
.panel-heading p { font-size: 13px; }
.count-badge { min-width: 24px; padding: 3px 8px; border-radius: 999px; background: #f0f0f0; color: #555; font-size: 12px; }
.alert { padding: 14px 16px; border-radius: 12px; line-height: 1.6; }
.empty-state { min-height: 240px; gap: 12px; padding: 36px 24px; }
.empty-state .empty-icon { width: 52px; height: 52px; border: 0; border-radius: 50%; background: #f2f2f2; }
.empty-state p { font-size: 14px; line-height: 1.6; }

.pricing-dialog, .team-dialog { border-color: #e1e1e1; border-radius: 20px; box-shadow: 0 20px 64px #0002; }
.pricing-dialog::backdrop, .team-dialog::backdrop { background: #16161655; }
.pricing-dialog-heading { padding: 24px; border-bottom-color: #eee; }
.pricing-dialog-heading h2 { font-size: 22px; letter-spacing: -.55px; }
.pricing-dialog-heading > .icon-button { width: 40px; height: 40px; margin: -6px -8px 0 0; }
.pricing-dialog-content { gap: 20px; padding: 24px; }
.pricing-dialog-actions { gap: 10px; padding: 18px 24px; border-top-color: #eee; background: #fff; }

/* A small brand header and a spacious, two-step sign-in form. */
.auth-page { grid-template-rows: auto 1fr; align-items: stretch; justify-items: stretch; gap: 32px; padding: 36px clamp(24px, 4vw, 56px); background: #fff; }
.auth-page .auth-brand { justify-content: flex-start; align-items: center; gap: 10px; margin: 0; color: #171717; font-size: 24px; font-weight: 700; letter-spacing: -.7px; line-height: 1; }
.auth-page .auth-brand .logo { width: 132px; height: auto; }
.auth-page .auth-wrap { justify-self: center; align-self: center; width: min(100%, 440px); padding: 32px 0 72px; }
.auth-page .auth-heading { margin-bottom: 28px; }
.auth-page .auth-card h1 { font-size: 32px; font-weight: 720; letter-spacing: -1px; line-height: 1.2; }
.auth-page .auth-intro { margin-top: 14px; font-size: 16px; line-height: 1.5; }
.auth-page .auth-form { gap: 28px; }
.auth-page .auth-form .field { gap: 0; }
.auth-page .auth-form input:not([type='hidden']) { min-height: 60px; height: 60px; padding: 16px 18px; border: 1px solid #d5d5d5; border-radius: 8px; font-size: 16px; }
.auth-page .auth-form input::placeholder { color: #757575; }
.auth-page .auth-form input:focus { border-color: #171717; box-shadow: 0 0 0 1px #171717; outline: none; }
.auth-page .auth-form .button { min-height: 50px; padding: 12px 24px; border-radius: 999px; font-size: 16px; font-weight: 600; }
.auth-page .auth-form .button.primary { border-color: #111; background: #111; }
.auth-page .auth-form .button.primary:hover:not(:disabled) { background: #333; border-color: #333; }
.auth-page .auth-form .password-wrap input { padding: 25px 58px 7px 18px; }
.auth-page .auth-form .password-wrap label { position: absolute; top: 9px; left: 18px; color: #444; font-size: 13px; line-height: 1; }
.auth-page .password-toggle { top: 5px; right: 5px; width: 50px; height: 50px; border-radius: 6px; }
.auth-page .password-toggle .icon { width: 21px; height: 21px; }
.auth-page .auth-identity { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-top: 18px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.auth-page .auth-identity > span { min-width: 0; overflow-wrap: anywhere; }
.auth-page .text-button { min-height: 44px; padding: 8px 0; color: #171717; font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.auth-page .auth-identity .text-button { flex: none; margin: -8px 0; }
.auth-page .auth-password-step .auth-form { gap: 16px; }
.auth-page .auth-forgot { margin: 0; }
.auth-page .auth-password-step .auth-submit { justify-self: end; min-width: 104px; margin-top: 12px; }
.auth-page .auth-link { margin-top: 18px; }
.auth-page .auth-divider { display: flex; align-items: center; gap: 20px; margin: 24px 0; color: #444; font-size: 15px; line-height: 1; }
.auth-page .auth-divider::before, .auth-page .auth-divider::after { content: ''; flex: 1; height: 1px; background: #ededed; }
.auth-page .passkey-signin { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; margin: 0; padding: 12px 20px; border: 1px solid transparent; border-radius: 999px; background: #f0f0f0; color: #171717; font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.4; text-decoration: none; }
.auth-page .passkey-signin:hover { background: #e7e7e7; }
.auth-page .passkey-signin .icon { width: 22px; height: 22px; }

@media (max-width: 1000px) and (min-width: 761px) {
  :root { --sidebar-width: 228px; }
  .main { padding: 28px 24px 40px; }
  .nav-link { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 760px) {
  :root { --control-height: 48px; }
  h1 { font-size: 28px; letter-spacing: -.85px; }
  h2 { font-size: 17px; }
  .main { padding: 20px 16px 32px; }
  .mobile-bar { background: #fff; border-bottom-color: #e9e9e9; }
  .mobile-bar > a { position: absolute; left: 50%; transform: translateX(-50%); }
  .mobile-bar .logo { width: 124px; height: auto; }
  .sidebar { width: min(316px, calc(100% - 40px)); background: #fff; padding: 16px 12px max(20px, env(safe-area-inset-bottom)); }
  .sidebar-brand { min-height: 78px; padding: 0 10px 16px; }
  .sidebar-brand .logo { width: 112px; height: auto; }
  .sidebar-close { width: 44px; height: 44px; }
  .nav-link { min-height: 48px; font-size: 15px; }
  .sidebar-footer { padding-top: 10px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .page-heading p { font-size: 13px; }
  .page-heading .button { min-height: 44px; padding: 9px 14px; font-size: 13px; }
  .heading-actions { gap: 8px; }
  .company-tabs { gap: 24px; margin-bottom: 20px; }
  .company-tabs a { min-height: 48px; font-size: 13px; }
  .breadcrumb { margin-top: -4px; margin-bottom: 10px; }
  .breadcrumb a { min-height: 44px; }
  .button { min-height: 48px; padding: 11px 16px; font-size: 14px; }
  .button.small-button, .button.small, .text-button { min-height: 44px; }
  .icon-button { width: 44px; height: 44px; }
  input:where(:not([type='checkbox']):not([type='radio'])), select, textarea { font-size: 16px; }
  .panel-heading { padding: 18px 16px; }
  .panel-heading h2 { font-size: 16px; }
  .empty-state { padding: 30px 20px; }
  .pricing-dialog, .team-dialog { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border-radius: 18px; }
  .pricing-dialog-heading { padding: 20px 18px; }
  .pricing-dialog-heading h2 { font-size: 20px; }
  .pricing-dialog-heading > .icon-button { width: 44px; height: 44px; }
  .pricing-dialog-content { padding: 20px 18px; }
  .pricing-dialog-actions { padding: 16px 18px; }
  .auth-page { gap: 28px; padding: max(32px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
  .auth-page .auth-wrap { padding: 24px 0 40px; }
  .auth-page .auth-card h1 { font-size: 28px; letter-spacing: -.85px; }
  .auth-page .auth-form input:not([type='hidden']) { height: 58px; min-height: 58px; }
  .auth-page .password-toggle { top: 4px; right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .icon-button, .nav-link { transition: none; }
}
