/* Sistem vizual comun, etapa 6. Încărcat după stilurile istorice. */
:root {
  --green: #429a84;
  --green-dark: #287864;
  --green-soft: #ddf3e9;
  --cream: #fffbf4;
  --surface: #fff;
  --canvas: #fffbf4;
  --ink: #293d38;
  --muted: #536960;
  --line: #dce7e1;
  --radius: 22px;
  --button-radius: 16px;
  --shadow: 0 4px 20px #293d3808;
  --space: 16px;
  --header-height: 100px;
  --bottom-height: 76px;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
body {
  background: var(--canvas);
  color: var(--ink);
  overflow-x: clip;
}
main,
#content,
section,
form,
fieldset,
header > * {
  min-width: 0;
}
#content {
  padding: 24px;
  max-width: 1200px;
}
h1,
h2,
h3,
.card h2,
.contact-card h2,
.brand span,
.mobile-brand span {
  font-family: inherit;
  letter-spacing: normal;
}
h1 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 650;
  line-height: 1.2;
}
h2,
.card h2 {
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
  margin: 0 0 12px;
}
h3 {
  font-size: 16px;
  line-height: 1.4;
}
p,
.info-detail,
.detail-row p,
.demo-footnote,
.meta,
small {
  color: var(--muted);
  line-height: 1.55;
}
p {
  font-size: 14px;
}
.page-heading {
  margin-bottom: 20px;
}
.page-heading p {
  margin-top: 8px;
}
.card,
.info-card,
.child-header,
.real-panel,
.state-panel,
.module-link,
.stat,
.legal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}
.dashboard-grid,
.contact-grid,
.module-list,
.settings-form,
.editor,
.real-form,
.grid,
.children-overview,
.legal-grid {
  gap: 16px;
}
.card,
.real-panel {
  margin-block: 16px;
}
.child-header {
  gap: 16px;
  margin-bottom: 16px;
}
.child-avatar {
  background: var(--green-soft);
  color: var(--green-dark);
  border-radius: 18px;
}
.info-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 12px;
  min-height: 168px;
  height: auto;
}
.info-top {
  font-size: 14px;
  align-items: center;
  gap: 10px;
}
.info-top .ui-icon {
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 12px;
  background: var(--module-tone, var(--green-soft));
  color: var(--green-dark);
  flex-shrink: 0;
}
.info-card strong {
  font-size: 20px;
  color: var(--ink);
}
.card-action {
  font-size: 12px;
  color: var(--green-dark);
}
.info-card,
.detail-row {
  border-color: var(--line);
}
.meal-summary-row {
  gap: 10px;
  padding-block: 4px;
  font-size: 14px;
}
.detail-row {
  padding: 16px;
  border-radius: 18px;
  background: var(--cream);
  margin-block: 12px;
}
.detail-row > .ui-icon {
  background: var(--module-tone, var(--green-soft));
  border-radius: 12px;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.ui-icon {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.info-card[data-module="calendar"] {
  --module-tone: #eee5fa;
}
.info-card[data-module="media"] {
  --module-tone: #ffe8e2;
}
.info-card[data-module="activities"] {
  --module-tone: #fff2cb;
}
.info-card[data-module="messages"] {
  --module-tone: #e2f1fc;
}
.info-card[data-module="menu"] {
  --module-tone: #e3f4e5;
}
.info-card[data-module="announcements"] {
  --module-tone: #fff0dc;
}
.info-card[data-module="documents"] {
  --module-tone: #e9eff5;
}
button,
a.button,
.contact-action,
.primary,
.link-button,
.back-button,
.profile-link {
  min-height: 44px;
  min-width: 44px;
  border-radius: var(--button-radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
  padding: 10px 16px;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:not(.info-card):not(.module-link):not(#navigation button):not(
    #mobile-navigation button
  ),
a.button,
.contact-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.primary,
.real-form button[type="submit"] {
  background: var(--green-dark);
  border: 1px solid var(--green-dark);
  color: white;
}
.contact-action,
.back-button,
.link-button,
.profile-link {
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--green-dark);
  text-decoration: none;
  margin: 0;
}
.action-group,
.admin-actions,
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-block: 16px;
}
.action-group > button,
.action-group > a {
  margin: 0;
}
.settings-form > .primary {
  justify-self: start;
}
input,
select,
textarea,
header .role-label select {
  min-height: 44px;
  height: auto;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #8ea89b;
  border-radius: 12px;
  max-width: 100%;
  color: var(--ink);
  background: white;
  margin: 0;
}
label,
.settings-form label,
.edit-row label,
.real-form label {
  font-size: 14px;
  gap: 8px;
}
input[type="checkbox"],
input[type="radio"] {
  min-width: 22px;
  min-height: 22px;
  accent-color: var(--green-dark);
}
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
  min-height: 44px;
  align-items: center;
}
.edit-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.roles {
  gap: 12px;
}
.notice,
.real-message {
  border-radius: 14px;
  background: var(--green-soft);
  padding: 14px;
  color: var(--ink);
  font-size: 14px;
}
.gallery-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
img,
video {
  max-width: 100%;
  height: auto;
}
.card img:not(.brand-mark),
.card video {
  border-radius: 16px;
}
.module-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  min-height: 72px;
  width: 100%;
  font-size: 15px;
}
.module-link > .ui-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  padding: 9px;
  background: var(--green-soft);
  flex-shrink: 0;
}
.module-link .chevron {
  margin-left: auto;
}
.more-group {
  margin: 24px 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: 20px;
}
.quick-grid button {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 10px;
  gap: 10px;
  font-size: 13px;
}
.quick-grid .ui-icon {
  width: 28px;
  height: 28px;
  color: var(--green-dark);
}
aside {
  background: var(--cream);
  border-color: var(--line);
}
#navigation button {
  min-height: 44px;
  padding: 12px;
  font-size: 14px;
  border-radius: 14px;
  margin-block: 4px;
}
#navigation button.active,
#navigation a[aria-current="page"] {
  background: var(--green-soft);
  color: var(--green-dark);
}
header {
  height: auto;
  min-height: var(--header-height);
  background: var(--green-dark);
  padding: 16px 24px;
  gap: 16px;
  color: white;
  border: 0;
  position: sticky;
  top: 0;
  z-index: 12;
}
.breadcrumb,
.breadcrumb b {
  color: #fff;
}
.mobile-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: white;
}
.mobile-brand span,
.mobile-brand .brand-name-line {
  font-size: 20px;
  line-height: 1.2;
  color: white;
  font-weight: 600;
}
.mobile-brand small {
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
  letter-spacing: 0;
}
.mobile-brand .brand-mark {
  width: 50px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  background: white;
  border-radius: 12px;
  padding: 3px;
}
.brand .brand-mark {
  object-fit: contain;
}
.brand span {
  font-size: 19px;
}
.brand small {
  letter-spacing: 0;
  font-size: 12px;
}
.brand-name-line {
  display: block;
}
#header-actions {
  margin-left: auto;
  flex-shrink: 0;
}
header .notification-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  background: #ffffff1c;
  color: white;
  border: 1px solid #ffffff40;
  border-radius: 14px;
}
header .notification-button .ui-icon {
  width: 22px;
  height: 22px;
}
.notification-count {
  background: #ffefcf;
  color: #293d38;
}
.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.demo-controls .role-label {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.demo-controls select {
  min-width: 130px;
}
.demo-controls label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.demo-controls p {
  font-size: 12px;
  margin: 0;
}
.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.legal-card {
  margin: 0;
}
.legal-card dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.legal-card dt {
  font-size: 12px;
  color: var(--muted);
}
.legal-card dd {
  margin: 0 0 12px;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.legal-card a {
  color: var(--green-dark);
}
.legal-card .action-group {
  margin-bottom: 0;
}
.legal-icon {
  width: 250px;
  height: 50px;
  object-fit: contain;
}
footer {
  color: var(--muted);
  font-size: 12px;
  padding: 24px;
}
.skip-link:focus {
  z-index: 100;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #aa6500;
  outline-offset: 3px;
}
button:hover {
  box-shadow: 0 3px 10px #293d3810;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.real-panel > button + .real-panel > button {
  margin: 0;
}
#session-actions {
  gap: 12px;
  color: white;
}
@media (max-width: 700px) {
  aside {
    display: none;
  }
  main {
    margin: 0;
    width: 100%;
  }
  header {
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: nowrap;
    border-radius: 0 0 18px 18px;
    min-height: 94px;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-brand span,
  .mobile-brand .brand-name-line {
    font-size: 19px;
  }
  .demo-controls {
    padding: 12px 16px;
  }
  .demo-controls .role-label {
    width: 100%;
    justify-content: space-between;
  }
  .demo-controls select {
    width: 150px;
  }
  #content {
    padding: 20px 16px
      calc(var(--bottom-height) + env(safe-area-inset-bottom) + 24px);
  }
  .dashboard-grid,
  .contact-grid,
  .edit-row,
  .legal-grid {
    grid-template-columns: 1fr;
  }
  .action-group {
    flex-direction: column;
    align-items: stretch;
  }
  .action-group > button,
  .action-group > a {
    width: 100%;
  }
  .card,
  .info-card,
  .real-panel {
    padding: 18px;
  }
  .settings-form > .primary {
    justify-self: stretch;
    width: 100%;
  }
  .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #mobile-navigation {
    position: fixed;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    background: var(--cream);
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    z-index: 20;
    margin: 0;
    overflow: visible;
    box-shadow: 0 -4px 20px #293d3808;
  }
  #mobile-navigation button,
  #mobile-navigation a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 56px;
    padding: 6px 2px;
    margin: 0;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
    color: var(--muted);
    text-decoration: none;
    border-radius: 14px;
    border: 0;
    background: transparent;
    white-space: normal;
  }
  #mobile-navigation .ui-icon {
    width: 23px;
    height: 23px;
  }
  #mobile-navigation .selected,
  #mobile-navigation [aria-current="page"] {
    background: var(--green-soft);
    color: var(--green-dark);
    font-weight: 650;
  }
  footer {
    padding-bottom: calc(
      var(--bottom-height) + env(safe-area-inset-bottom) + 24px
    );
  }
  .real-login {
    margin: 12px 0;
  }
  .real-form > button {
    width: 100%;
  }
}
@media (max-width: 360px) {
  .mobile-brand span,
  .mobile-brand .brand-name-line {
    font-size: 17px;
  }
  .mobile-brand .brand-mark {
    width: 42px;
    height: 54px;
  }
  .mobile-brand small {
    font-size: 11px;
  }
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  header {
    gap: 8px;
  }
  .child-header {
    flex-wrap: wrap;
  }
  .profile-link {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
/* Prioritate explicită față de ajustările istorice ale antetului. */
body main,
body #content {
  background: var(--canvas);
}
body header .mobile-brand span,
body header .mobile-brand .brand-name-line,
body aside .brand span {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
body .demo-controls .role-label select,
body .demo-controls .demo-account select {
  min-height: 44px;
  height: 44px;
  font-size: 14px;
  width: 150px;
  max-width: 100%;
  padding: 10px 12px;
}
body .demo-controls .demo-account {
  font-size: 13px;
  color: var(--muted);
  width: 100%;
  justify-content: space-between;
}
body .demo-controls .role-label {
  font-size: 13px;
}
body .demo-controls .demo-account select {
  margin: 0;
}
body .privacy-check input {
  min-height: 22px;
  width: 22px !important;
  min-width: 22px !important;
}
body .directory-filters {
  gap: 16px;
}
body .page-heading h1 {
  font:
    650 28px/1.25 Inter,
    system-ui,
    sans-serif;
  letter-spacing: normal;
}
body .contact-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (min-width: 701px) {
  body .demo-controls .demo-account {
    width: auto;
  }
  body #mobile-navigation {
    display: none;
  }
  body .mobile-brand {
    flex: none;
  }
  body header .mobile-brand {
    display: flex;
  }
  body .demo-controls .role-label {
    width: auto;
  }
}
body .demo-controls {
  display: flex;
  flex-direction: row;
}
body .demo-controls .role-label {
  order: 0;
}
body .demo-controls .demo-account {
  order: 1;
}
body .privacy-media {
  padding: 16px;
  border-radius: 18px;
  background: var(--cream);
}
body[data-module="calendar"] .detail-row {
  --module-tone: #eee5fa;
}
body[data-module="messages"] .detail-row {
  --module-tone: #e2f1fc;
}
body[data-module="activities"] .detail-row {
  --module-tone: #fff2cb;
}
body[data-module="menu"] .detail-row {
  --module-tone: #e3f4e5;
}
body[data-module="announcements"] .detail-row {
  --module-tone: #fff0dc;
}
body[data-module="documents"] .detail-row {
  --module-tone: #e9eff5;
}
body[data-module="media"] .privacy-media {
  background: #ffe8e240;
}
body #session-actions.session-controls {
  background: var(--cream);
  color: var(--ink);
  padding: 12px 16px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
body #session-actions.session-controls:empty {
  display: none;
}
body .real-panel a.module-link {
  display: flex;
  margin-block: 16px;
}
body #content > .module-link {
  margin-block: 16px;
}
body .real-panel button {
  border: 1px solid var(--line);
}
body .child-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
body .child-header > .action-group {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}
body .child-header > .action-group button {
  margin: 0;
  width: 100%;
  font-size: 13px;
}
body .child-header .child-avatar {
  width: 48px;
  height: 48px;
}
body .child-header h2 {
  margin-bottom: 4px;
}
body .child-header p {
  margin: 3px 0;
}
body .quick-grid [data-module="messages"] {
  background: #e2f1fc;
}
body .quick-grid [data-module="calendar"] {
  background: #eee5fa;
}
body .quick-grid [data-module="media"] {
  background: #ffe8e2;
}
body .quick-grid [data-module="activities"] {
  background: #fff2cb;
}
body .quick-grid [data-module="menu"] {
  background: #e3f4e5;
}
body .quick-grid [data-module="announcements"] {
  background: #fff0dc;
}
body summary {
  min-height: 44px;
  padding: 12px 8px;
  cursor: pointer;
}
body summary:focus-visible {
  outline: 3px solid #aa6500;
  outline-offset: 3px;
}
body .status-badge {
  color: var(--ink);
  font-size: 12px;
  border-radius: 10px;
  padding: 6px 10px;
}
body .preview-states {
  margin-block: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream);
  padding: 4px 12px;
}
body .preview-states select {
  margin-bottom: 12px;
}
body .contact-grid > .card,
body .directory-list > .card,
body .grid > .card,
body .dashboard-grid > .card {
  margin: 0;
}
body .admin-tools {
  display: grid;
  gap: 16px;
}
body .admin-tools > .action-group {
  margin: 0;
}
body .admin-tools > h2 {
  margin: 0;
}
body[data-module="media"] #content > .card .privacy-media img,
body[data-module="media"] #content > .card .privacy-media video {
  max-height: 320px;
  object-fit: contain;
}
body .album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin-block: 16px;
}
body .album-grid > .card {
  margin: 0;
  min-width: 0;
}
body .album-groups {
  font-size: 13px;
  color: var(--green-dark);
}
body .archive-dialog button {
  margin: 6px;
}
body .privacy-media .action-group {
  gap: 12px;
}

.camera-panel{display:grid;gap:12px}.camera-actions{display:flex;flex-wrap:wrap;gap:10px}.camera-green{background:#dceee3!important;color:#174e3f!important}.camera-yellow{background:#fff0bd!important;color:#5c451b!important}.camera-panel select,.camera-panel input:not([hidden]){width:100%;min-height:44px}.camera-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.camera-grid img{width:100%;height:140px;object-fit:contain;border-radius:12px}.camera-panel video,.camera-panel>div>img{width:100%;max-height:360px;object-fit:contain}.camera-panel [hidden]{display:none!important}.camera-panel button:disabled{opacity:.65;cursor:not-allowed}.camera-panel progress{width:100%}

/* Aliniere comună pentru formularele și acțiunile portalului real. */
#content .real-form { min-width: 0; gap: 12px; }
#content .real-form label { min-width: 0; display: grid; }
#content .real-form input:not([type="checkbox"]):not([type="radio"]),
#content .real-form select,
#content .real-form textarea { width: 100%; min-width: 0; font-size: 16px; }
#content .real-form > button { justify-self: start; margin: 0; }
#content .action-group, #content .real-actions, #content .camera-actions {
  gap: 10px; align-items: stretch;
}
#content .action-group > button, #content .action-group > a.button { margin: 0; }
#content button, #content a.button { max-width: 100%; white-space: normal; text-align: center; }
#content button + button, #content a.button + button,
#content button + a.button, #content a.button + a.button { margin-inline-start: 10px; }
#content .action-group > button + button,
#content .action-group > a.button + button,
#content .action-group > button + a.button,
#content .action-group > a.button + a.button { margin-inline-start: 0; }
#content .real-form + button, #content .real-panel + button { margin-top: 10px; }
#content .real-actions { margin-block: 12px; }
#content .real-actions > input, #content .real-actions > select { flex: 1 1 160px; min-width: 0; }
#content .real-panel .action-group { width: 100%; }
@media (max-width: 600px) {
  #content .real-form > button { width: 100%; justify-self: stretch; }
  #content button + button, #content a.button + button,
  #content button + a.button, #content a.button + a.button {
    margin-inline-start: 0; margin-top: 10px;
  }
  #content .action-group > button, #content .action-group > a.button { margin: 0; }
  #content .real-panel > button, #content .real-panel > a.button,
  #content .gallery-item > button, #content > button { display: flex; width: 100%; margin-inline: 0; }
}
