/* 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: 14px; padding: 0 14px 20px; margin-bottom: 12px; border-bottom: 1px solid #eee; }
.sidebar-brand .logo { width: 86px; height: 62px; }
.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; }
.sidebar-settings { margin: 0 0 6px; }
.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; }
.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; }

/* Sign-in uses the same typography and controls, with the centered Ooowee mark. */
.auth-page { background: #fff; }
.auth-wrap { width: min(100%, 400px); }
.auth-brand { margin-bottom: 28px; }
.auth-card h1 { font-size: 32px; font-weight: 720; letter-spacing: -1px; }
.auth-form { gap: 20px; }
.auth-form input { min-height: 50px; padding: 12px 14px; border-color: #ccc; border-radius: 10px; }
.auth-form input::placeholder { color: #777; }
.auth-form .button { min-height: 48px; border-radius: 999px; font-size: 15px; }
.auth-form .password-wrap input { padding-right: 52px; }
.password-toggle { width: 48px; height: 48px; }

@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: 62px; height: 45px; }
  .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: 78px; height: 57px; }
  .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 { padding: 36px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .icon-button, .nav-link { transition: none; }
}
