/* Rules the admin screens and the shared /login page take from a customer
   site's public stylesheets: copied from the first host's components.css,
   pages.css and premium.css at commit 032b1dd (gisc-website docs 14, section 2),
   kept in the same cascade layers so they rank exactly as they did there.

   A host links this file GLOBALLY in App.razor, after its own tokens.css and
   base.css: /login renders in BareLayout, which never loads admin.css.

   Not copied: premium's :root palette and body background (that site's
   marketing skin, not part of the admin) and "figure figcaption" (no figure
   in the admin). The ".article-content" rules in the pages layer came later,
   with the article editor; see the note above them. */
@layer components {
  .icon-button { width: 2.6rem; height: 2.6rem; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink-700); transition: color var(--transition), border-color var(--transition), background var(--transition); }
  .icon-button:hover { border-color: color-mix(in srgb, var(--brand-green) 35%, var(--line)); color: var(--brand-green-700); background: var(--brand-green-100); }
  .button { min-height: 2.7rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .68rem 1.1rem; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--brand-green); color: white; font-size: .93rem; font-weight: 600; line-height: 1; letter-spacing: -.005em; box-shadow: var(--shadow-xs); transition: transform var(--transition), background var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition); }
  .button:hover { color: white; background: var(--brand-green-700); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
  .button:active { transform: translateY(0); }
  .button:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: var(--shadow-xs); }
  .button .icon { flex: 0 0 auto; }
  .button--ghost { color: var(--ink-700); background: var(--surface); border-color: var(--line); box-shadow: none; }
  .button--ghost:hover { color: var(--brand-green-700); background: var(--brand-green-100); border-color: color-mix(in srgb, var(--brand-green) 35%, var(--line)); }
  .button--sm { min-height: 2.3rem; padding: .5rem .8rem; font-size: .875rem; }
  .eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: var(--brand-green-700); font-size: .92rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .eyebrow::before { content: ""; width: 1.7rem; height: 2px; background: var(--brand-gold); }
  .badge { display: inline-flex; align-items: center; gap: .4rem; padding: .36rem .68rem; border-radius: 999px; color: var(--brand-green-700); background: var(--brand-green-100); font-size: .78rem; font-weight: 800; }
  .badge--gold { color: #74590b; background: var(--brand-gold-100); }
  .form-shell { padding: clamp(1.4rem, 4vw, 2.5rem); background: white; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
  .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
  .form-field { display: grid; gap: .45rem; }
  .form-field--full { grid-column: 1/-1; }
  .form-field label { color: var(--ink-800); font-size: .875rem; font-weight: 600; letter-spacing: -.005em; }
  .input, input:not([type="checkbox"]):not([type="radio"]), select, textarea { width: 100%; min-height: 2.7rem; padding: .62rem .8rem; color: var(--ink-950); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .93rem; line-height: 1.5; transition: border-color var(--transition), box-shadow var(--transition); }
  input::placeholder, textarea::placeholder { color: var(--ink-500); }
  textarea { min-height: 7.5rem; resize: vertical; }
  select { appearance: none; padding-right: 2.4rem; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7067' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 1.05rem; }
  input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brand-green) 30%, var(--line)); }
  input:focus, select:focus, textarea:focus { border-color: var(--brand-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 16%, transparent); outline: 0; }
  input:not([type="checkbox"]):not([type="radio"]):disabled, select:disabled, textarea:disabled { color: var(--ink-500); background: var(--surface-muted); cursor: not-allowed; }
  .field-hint { color: var(--ink-600); font-size: .82rem; line-height: 1.5; }
  .alert { display: flex; align-items: flex-start; gap: .6rem; padding: .85rem 1rem; border-radius: var(--radius-sm); border: 1px solid; font-size: .9rem; line-height: 1.55; }
  .alert--success { color: #05603a; background: #ecfdf3; border-color: #abefc6; }
  .alert--error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
  .app-toast { position: fixed; top: calc(var(--header-height) + 1rem); right: 1.5rem; z-index: 1200; display: flex; align-items: center; gap: .55rem; max-width: min(28rem, calc(100vw - 3rem)); padding: .7rem 1rem; border: 1px solid; border-radius: var(--radius-sm); font-size: .88rem; line-height: 1.5; font-weight: 600; box-shadow: var(--shadow-md); animation: app-toast-in .18s ease-out; }
  .app-toast--success { color: #05603a; background: #ecfdf3; border-color: #abefc6; }
  .app-toast--error { color: #b42318; background: #fef3f2; border-color: #fecdca; }
  .app-toast .icon { flex-shrink: 0; }
  @media (prefers-reduced-motion: reduce) { .app-toast { animation: none; } }
  .media-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .75rem; }
  .media-gallery a { overflow: hidden; border-radius: var(--radius-md); background: var(--surface-muted); }
  .media-gallery img { width: 100%; height: 100%; object-fit: cover; }
  .media-gallery a:first-child { grid-row: span 2; }
  .auth-shell { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: var(--space-5); padding: var(--space-8) var(--space-4); background: linear-gradient(160deg, var(--brand-green-100), var(--surface-soft) 45%, var(--brand-gold-100)); }
  .auth-card { width: min(430px, 100%); display: grid; gap: var(--space-6); padding: clamp(1.75rem, 4vw, 2.5rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
  .auth-card__head { display: grid; gap: .5rem; }
  .auth-card__head h1 { font-family: var(--font-sans); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
  .auth-card__head p { color: var(--ink-600); font-size: .9rem; line-height: 1.55; }
  .auth-card__submit { width: 100%; margin-top: .25rem; }
  .auth-shell__foot { font-size: .88rem; }
  .auth-shell__foot a { color: var(--ink-600); }
  .auth-shell__foot a:hover { color: var(--brand-green-700); }
  @media (max-width: 680px) { .form-grid { grid-template-columns: 1fr; } }
  @media (max-width: 680px) { .media-gallery { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 680px) { .media-gallery a:first-child { grid-column: span 2; grid-row: auto; } }
  @keyframes app-toast-in { from { opacity: 0; transform: translateY(-.4rem); } to { opacity: 1; transform: none; } }
}
@layer pages {
  .empty-state { padding: 3rem; text-align: center; background: var(--surface-soft); border: 1px dashed #b7c8bd; border-radius: var(--radius-lg); }

  /* Editing area of the article editor (Gisc.Ui.Editor gives it the class "article-content"). The API refuses
     style attributes, so alignment, picture placement and tables are stored as classes (normalize-html.js) and
     only these rules show them. Copied from the first host's pages.css at commit 701d361, without the public
     page's typography and video player: the editing area draws a video as a card (editor.css of Gisc.Ui.Editor). */
  .article-content { display: flow-root; } /* keeps a floated picture inside the box */
  .article-content h2, .article-content h3, .article-content h4, .article-content hr, .article-content .video-embed { clear: both; }
  .article-content hr { border: 0; border-top: 1px solid var(--line); }
  .article-content .align-center { text-align: center; }
  .article-content .align-right { text-align: right; }
  .article-content .align-justify { text-align: justify; }
  .article-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
  .article-content img.img-center { margin-inline: auto; }
  .article-content img.img-left { float: left; max-width: 50%; margin: .35rem 1.5rem .75rem 0; }
  .article-content img.img-right { float: right; max-width: 50%; margin: .35rem 0 .75rem 1.5rem; }
  .article-content table { width: 100%; border-collapse: collapse; font-size: .96rem; line-height: 1.6; }
  .article-content th, .article-content td { min-width: 5.5rem; padding: .6rem .85rem; vertical-align: top; text-align: left; border: 1px solid var(--line); }
  .article-content th { color: var(--ink-950); background: var(--surface-muted); font-weight: 700; }
  @media (max-width: 640px) {
    .article-content img.img-left, .article-content img.img-right { float: none; max-width: 100%; margin: 1rem auto; }
  }
}
@layer premium {
  .button { border-radius:999px; padding-inline:1.25rem; }
  .form-shell .button, .admin-shell .button, .auth-card .button { border-radius: var(--radius-sm); padding-inline: 1.1rem; }
}
