@import './catalan-theme.css';

* { box-sizing: border-box; }
body { margin: 0; background: var(--edumo-bg-page); color: var(--edumo-text); }
[hidden] { display: none !important; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid transparent; background: var(--edumo-accent); color: white; padding: 11px 17px; border-radius: var(--edumo-radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background-color .15s ease; }
button:hover, .button:hover { background: var(--edumo-accent-hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
.quiet { border-color: var(--edumo-border); background: var(--edumo-surface); color: var(--edumo-text); }
.quiet:hover { background: var(--edumo-surface-subtle); border-color: var(--edumo-border-strong); }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; border: 1px solid var(--edumo-border-strong); border-radius: var(--edumo-radius-sm); background: var(--edumo-surface); color: var(--edumo-text); font-size: 16px; margin-top: 8px; }
input::placeholder { color: var(--edumo-text-faint); }
label { display: block; font-size: 13px; font-weight: 600; margin: 18px 0; }
header { background: var(--edumo-surface); border-bottom: 1px solid var(--edumo-border); padding: 18px max(24px, calc((100% - 1200px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand b { font-weight: 400; color: var(--edumo-text-muted); }
#session { display: flex; align-items: center; gap: 16px; font-size: 13px; }
#employee { overflow-wrap: anywhere; }
main { max-width: 1200px; margin: 0 auto; padding: 40px 24px 64px; }
.login { max-width: 880px; margin: 40px auto; display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; align-items: start; }
.login > .eyebrow, .login > h1, .login > .intro, .login > .hint { grid-column: 1; }
.login > .eyebrow { margin-top: 48px; align-self: end; }
.login > .intro { align-self: start; }
.login > .hint { align-self: start; margin-top: 24px; }
.login .panel { grid-column: 2; grid-row: 1 / 6; box-shadow: var(--edumo-shadow); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: var(--edumo-accent-text); }
h1 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -1.2px; font-weight: 650; line-height: 1.2; margin: 12px 0; }
h2 { font-size: 21px; letter-spacing: -.5px; line-height: 1.35; margin: 0 0 8px; }
h3 { font-size: 16px; margin: 0; line-height: 1.5; }
p { color: var(--edumo-text-muted); line-height: 1.65; font-size: 14px; margin: 8px 0; }
.intro { font-size: 16px; }
.panel { min-width: 0; background: var(--edumo-surface); border: 1px solid var(--edumo-border); border-radius: var(--edumo-radius-lg); padding: 24px; }
#login-button { width: 100%; margin-top: 8px; }
.hint { font-size: 12px; color: var(--edumo-text-muted); }
#login-error, .error { color: var(--edumo-danger); }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.heading .button { font-size: 13px; }
.notice { padding: 14px 0; margin: 20px 0 28px; border-top: 1px solid var(--edumo-border); border-bottom: 1px solid var(--edumo-border); color: var(--edumo-text-muted); font-size: 13px; line-height: 1.6; }
.layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.layout aside label { margin-top: 0; margin-bottom: 0; }
.customers { margin-top: 20px; max-height: 580px; overflow: auto; overscroll-behavior: contain; }
.customer { display: block; width: 100%; text-align: left; background: transparent; color: var(--edumo-text); border: 1px solid transparent; border-bottom-color: var(--edumo-border); padding: 14px 12px; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.customer:hover { background: var(--edumo-surface-subtle); }
.customer small { display: block; color: var(--edumo-text-muted); margin-top: 6px; font-size: 12px; font-weight: 400; }
.customer.selected { border-color: var(--edumo-accent-soft); background: var(--edumo-accent-soft); color: var(--edumo-accent-text); }
.empty { text-align: center; padding: 100px 24px; }
.empty-icon { font-size: 30px; color: var(--edumo-accent); display: block; margin-bottom: 20px; }
.detail { scroll-margin-top: 20px; overflow-wrap: anywhere; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.detail-head h2 { max-width: 480px; }
.detail-head button { flex-shrink: 0; font-size: 13px; }
.person { border: 1px solid var(--edumo-border); border-radius: var(--edumo-radius-md); padding: 20px; margin: 16px 0; }
.person-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.badge { font-size: 12px; font-weight: 600; color: var(--edumo-success); background: var(--edumo-success-soft); padding: 5px 9px; border-radius: 6px; white-space: nowrap; height: fit-content; }
.badge.off { background: var(--edumo-bg-page); color: var(--edumo-text-muted); }
.person strong { font-weight: 600; }
.person .quiet { font-size: 13px; margin-top: 12px; color: var(--edumo-danger); }
.warning { background: var(--edumo-warning-soft); border: 1px solid #eedfc3; color: var(--edumo-warning); padding: 18px; border-radius: var(--edumo-radius-sm); font-size: 14px; line-height: 1.65; }
.add { border-top: 1px solid var(--edumo-border); margin-top: 24px; padding-top: 24px; }
.add details summary { cursor: pointer; color: var(--edumo-accent-text); font-weight: 600; min-height: 44px; padding-top: 10px; }
.history { margin-top: 24px; }
.history summary { font-size: 13px; cursor: pointer; color: var(--edumo-text-muted); padding: 12px 0; }
.back-to-customers { display: none; }
footer { max-width: 1152px; margin: 0 auto; border-top: 1px solid var(--edumo-border); padding: 22px 0; color: var(--edumo-text-muted); font-size: 12px; display: flex; justify-content: space-between; gap: 20px; }
@media (max-width: 760px) {
  main { padding: 28px 16px 40px; }
  header { padding: 16px; }
  .login { display: block; max-width: 430px; margin: 12px auto; }
  .login .panel { margin-top: 28px; }
  .login > .hint { margin: 20px 8px; }
  .heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .customers { max-height: 260px; }
  .panel { padding: 20px; }
  .empty { padding: 40px 12px; }
  .person-top { flex-wrap: wrap; }
  #employee { max-width: 80px; font-size: 12px; }
  .notice { margin: 20px 0; font-size: 12px; }
  footer { margin: 0 16px; }
  footer span { display: none; }
  .brand .catalan-brand-name { font-size: 16px; }
  .brand .catalan-mark { width: 32px; height: 32px; }
  .detail-head { flex-wrap: wrap; }
  .back-to-customers { display: inline-flex; margin-bottom: 20px; }
}
@media (max-width: 380px) {
  header { flex-wrap: wrap; }
  #session { width: 100%; justify-content: space-between; }
  #employee { max-width: none; flex: 1; min-width: 0; line-height: 1.4; }
}
