/* ==================================================================
   app.css — Papanikolas3D design system
   Fonts loaded via Google Fonts <link> tags in each page's <head>:
   Chakra Petch (display/headings) + IBM Plex Sans (body/UI text)

   Palette is drawn from the Papanikolas3D logo:
     - graphite background
     - signal blue  (Papa / 3D)
     - kiln orange  (nikolas / printing)
   ================================================================== */

:root {
  --color-bg: #141517;
  --color-surface: #1b1c1f;
  --color-surface-raised: #24252a;
  --color-border: #34363c;
  --color-text: #f5f4f1;
  --color-text-muted: #9a9ba1;

  --color-accent: #ed6a4b;        /* kiln orange — primary CTA */
  --color-accent-hover: #e94720;
  --color-blue: #01b5f2;          /* signal blue — brand / secondary accent */
  --color-blue-hover: #019ace;

  --color-error: #ef4444;
  --color-error-bg: #2a1a19;
  --color-success: #22c55e;

  --font-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

p {
  margin: 0 0 1rem;
  max-width: 46ch;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------
   Wordmark — small logo mark + colored brand text, used in the
   app header (dashboard + admin panel)
   ------------------------------------------------------------ */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.wordmark__icon {
  height: 48px; /* Increased from 32px */
  width: 48px;  /* Increased from 32px */
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  transform: scale(1.2); /* Adds the slight zoom effect */
}

.brand-blue {
  color: var(--color-blue);
}

.brand-orange {
  color: var(--color-accent);
}

/* ------------------------------------------------------------
   Auth layout: split screen — brand/hero panel + form panel
   ------------------------------------------------------------ */

.auth-shell {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-panel {
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.hero-panel__inner {
  max-width: 380px;
  text-align: center;
}

.hero-panel h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.hero-panel p {
  color: var(--color-text-muted);
  margin: 0 auto;
}

/* Full logo mark shown on the hero panel */
.hero-logo {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto 2rem;
  border-radius: 22px;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.6);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-logo {
    animation: hero-logo-reveal 0.6s ease-out both;
  }
}

@keyframes hero-logo-reveal {
  from {
    opacity: 0;
    transform: scale(0.86) translateY(10px);
  }
}

@media (max-width: 899px) {
  .hero-panel {
    padding: 2.5rem 1.5rem 1.5rem;
  }
  .hero-logo {
    width: 104px;
    height: 104px;
    border-radius: 18px;
    margin-bottom: 1.25rem;
  }
  .hero-panel h1 { font-size: 1.5rem; }
  .hero-panel p { display: none; }
}

/* ------------------------------------------------------------
   Form panel
   ------------------------------------------------------------ */

.form-panel {
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.form-panel__inner {
  width: 100%;
  max-width: 380px;
}

.form-panel h2 {
  font-size: 1.5rem;
}

.form-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}

@media (min-width: 480px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.15s ease;
}

input::placeholder {
  color: var(--color-text-muted);
}

input:focus {
  outline: none;
  border-color: var(--color-blue);
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 2.75rem;
}

.toggle-visibility {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--color-text-muted);
  display: flex;
}

.toggle-visibility:hover {
  color: var(--color-text);
}

.toggle-visibility svg {
  width: 20px;
  height: 20px;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0.4rem 0 0;
  max-width: none;
}

.field-hint--match.is-good {
  color: var(--color-success);
}

.password-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin-top: 0.6rem;
  overflow: hidden;
}

.password-strength__bar {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength[data-level="weak"] .password-strength__bar   { width: 25%;  background: var(--color-error); }
.password-strength[data-level="fair"] .password-strength__bar   { width: 50%;  background: #f59e0b; }
.password-strength[data-level="good"] .password-strength__bar   { width: 75%;  background: #eab308; }
.password-strength[data-level="strong"] .password-strength__bar { width: 100%; background: var(--color-success); }

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.checkbox-field input {
  margin-top: 0.2rem;
}

.btn-primary {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

/* Compact, inline version of the primary button — used in the
   header and in action rows, where a full-width button doesn't fit */
.btn-primary-sm {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  background: var(--color-accent);
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-primary-sm:hover {
  background: var(--color-accent-hover);
  text-decoration: none;
}

.alert {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.alert--error {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error);
  color: #fca5a5;
}

.alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* ------------------------------------------------------------
   Dashboard / admin panel
   ------------------------------------------------------------ */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--color-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-main {
  flex: 1 0 auto;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  width: 100%;
}

.welcome-card h1 {
  font-size: 1.75rem;
}

.welcome-card p {
  color: var(--color-text-muted);
  max-width: 60ch;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-secondary {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-secondary:hover {
  text-decoration: none;
  border-color: var(--color-blue);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
}

.stat-card__label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}
