/* Общий визуальный слой кабинетов. Сетки медиа, чатов и финансовая логика
   остаются в своих компонентах; здесь — фирменный стиль и читаемость. */
.auth-page {
  --radius-card: 22px;
  --radius-control: 12px;
  --shadow-soft: 0 8px 32px rgba(38, 72, 112, 0.055);
  background: #f5f8fc;
}
.auth-page .auth-header { background: rgba(255, 255, 255, .85); }
.auth-page .auth-intro h1 { font-size: clamp(28px, 3.3vw, 42px); line-height: 1.2; letter-spacing: -.025em; }
.auth-page .auth-intro p:not(.eyebrow) { font-size: 15px; line-height: 1.65; }
.auth-page .btn { border-radius: 12px; }
.auth-page :is(input, select, textarea) { border-radius: 12px; }
.auth-page .registration-type { border-radius: 16px; }
.auth-page .contact-note { border-radius: 14px; }

.cabinet-page {
  --radius-card: 18px;
  --radius-control: 12px;
  --color-border: #e4ebf4;
  --shadow-soft: 0 5px 22px rgba(38, 72, 112, 0.045);
  background: #f5f8fc;
  font-size: 15px;
}

.cabinet-page [hidden] { display: none !important; }

.cabinet-page .cabinet-topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: #e8eef6;
}

.cabinet-page :is(.cabinet-sidebar-toggle, .cabinet-rules-button, .cabinet-notifications-button, .cabinet-top-logout) {
  box-shadow: none;
  background: #f6f9fd;
  border-color: transparent;
  border-radius: 14px;
}

.cabinet-page .cabinet-notifications-button.is-active {
  background: var(--color-blue-soft);
  border-color: #c8ddfa;
}

.cabinet-page .header-notification-badge {
  background: #a84f24;
  box-shadow: none;
}

.cabinet-page .cabinet-sidebar {
  background: #fff;
  box-shadow: none;
}

.cabinet-page .cabinet-nav { gap: 5px; }
.cabinet-page .cabinet-nav button {
  padding: 12px 14px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 12px;
  transition: background 150ms ease, border-color 150ms ease;
}
.cabinet-page .cabinet-nav button strong { font-size: 14px; line-height: 1.4; }
.cabinet-page .cabinet-nav button > span { margin-top: 3px; font-size: 11px; line-height: 1.45; font-weight: 500; }
.cabinet-page .cabinet-nav button:hover { background: #f5f8fd; }
.cabinet-page .cabinet-nav button.is-active { background: var(--color-blue-soft); border-color: #dbe9fc; }
.cabinet-page .cabinet-nav button.is-active strong { color: var(--color-primary); }

.cabinet-page .cabinet-profile-card { background: white; }
.cabinet-page .cabinet-profile-card h1 { font-size: clamp(25px, 2.6vw, 38px); line-height: 1.2; letter-spacing: -0.025em; }
.cabinet-page .cabinet-nickname { font-size: 16px; }
.cabinet-page .cabinet-contact-grid > div { background: #f8fafd; border-color: transparent; border-radius: 12px; }
.cabinet-page .cabinet-contact-grid strong { font-size: 15px; overflow-wrap: anywhere; }
.cabinet-page .cabinet-contact-grid > div > span { font-size: 10px; letter-spacing: .05em; }
.cabinet-page .eyebrow { font-size: 11px; line-height: 1.5; letter-spacing: .035em; font-weight: 800; }
.cabinet-page .section-heading { margin-bottom: 24px; }
.cabinet-page :is(.cabinet-panel, .partner-page) > .section-heading { margin-bottom: 0; }
.cabinet-page :is(.cabinet-panel, .partner-page) > .section-heading > p:last-child { margin-bottom: 0; }
.cabinet-page .cabinet-panel > .purchase-grid { margin-top: 0; }
.cabinet-page .section-heading h2 { max-width: 100%; font-size: clamp(26px, 3vw, 36px); line-height: 1.22; letter-spacing: -.03em; }
.cabinet-page .section-heading p:not(.eyebrow) { font-size: 15px; line-height: 1.65; }
.cabinet-page .cabinet-panel-block h2 { font-size: clamp(23px, 2vw, 28px); line-height: 1.3; letter-spacing: -.02em; }
.cabinet-page .cabinet-panel-block h3 { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.35; letter-spacing: -.015em; }
.cabinet-page .panel-heading { gap: 14px; align-items: center; }
.cabinet-page :is(.cabinet-mini-card, .hobby-card, .project-card, .kopilka-card, .purchase-card, .teaching-course-card, .teaching-review-card, .notification-card) {
  border-color: var(--color-border);
  border-radius: var(--radius-card);
}
.cabinet-page :is(.hobby-card, .parent-child-card, .purchase-card) { box-shadow: 0 3px 14px rgba(38,72,112,.025); }
.cabinet-page .hobby-card { transition: background 150ms ease, border-color 150ms ease; }
.cabinet-page .hobby-card:hover { background: #f6faff; border-color: #bcd6f7; }

.cabinet-page .btn {
  min-height: 42px;
  padding-inline: 16px;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  border-radius: 12px;
  font-weight: 800;
}
.cabinet-page .btn.primary { box-shadow: 0 3px 9px rgba(47,128,237,.13); }
.cabinet-page .btn.primary:hover { background: #2674de; }
.cabinet-page .btn.secondary { border-color: #dce8f8; background: #f7faff; }
.cabinet-page .btn.secondary:hover { background: var(--color-blue-soft); border-color: #bdd6f8; }
.cabinet-page .btn.subtle { box-shadow: none; }
.cabinet-page .btn.compact { min-height: 36px; padding-inline: 13px; font-size: 13px; }
.cabinet-page .btn:disabled { box-shadow: none; }
.cabinet-page :is(button, a, input, select, textarea, summary):focus-visible {
  outline: none;
  outline-offset: 0;
  box-shadow: none;
  filter: brightness(.96);
}
.cabinet-page :is(.form-field, .auth-form) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]), select, textarea) {
  border-color: #dce5f0;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.cabinet-page :is(.form-field, .auth-form) :is(input, select, textarea):focus { border-color: #8ab7f2; box-shadow: 0 0 0 3px rgba(47,128,237,.08); }
.cabinet-page :is(input, select, textarea):focus,
.cabinet-page :is(input, select, textarea):focus-visible,
.cabinet-page :is(.form-field, .auth-form) :is(input, select, textarea):focus {
  outline: none;
  outline-offset: 0;
  box-shadow: none;
  border-color: #bdcfe5;
}
.cabinet-page .form-field > span:first-child { color: #4b5d75; font-size: 13px; font-weight: 750; }
.cabinet-page :is(.feed-tab, .hobby-tab, .child-tab) { font-size: 13px; border-radius: 10px; }
.cabinet-page .empty-state { border-style: dashed; border-color: #dbe5f1; background: #f9fbfe; box-shadow: none; line-height: 1.65; }
.cabinet-page .empty-state strong { font-size: 17px; }
.cabinet-page .empty-state span { font-size: 14px; }
.cabinet-page .notification-card { padding: 20px; gap: 18px; }
.cabinet-page .notification-card.is-unread { background: #f4f8ff; border-color: #d3e3fb; }
.cabinet-page .notification-card-heading strong { font-size: 16px; line-height: 1.45; }
.cabinet-page .notification-card p { font-size: 14px; line-height: 1.65; }
.cabinet-page .notification-status { border-radius: 6px; font-size: 10px; }
.cabinet-page .notification-card-actions { max-width: 300px; }
.cabinet-page .admin-shell .admin-overview strong,
.cabinet-page .teaching-stats strong { font-size: 28px; }
.cabinet-page .admin-shell :is(th, td) { padding: 12px; font-size: 13px; line-height: 1.5; }
.cabinet-page .admin-shell th { background: #f5f8fd; font-size: 11px; letter-spacing: .02em; }
.cabinet-page .partner-product-card { border-radius: 18px; overflow: hidden; }
.cabinet-page .partner-section-band { border-radius: 20px; }
.cabinet-page .partner-product-card-body { padding: 22px; }
.cabinet-page .partner-product-card-body h4 { font-size: 22px; line-height: 1.3; }
.cabinet-page .partner-contest-prize { background: var(--color-peach-soft); border-radius: 14px; }
.cabinet-page .teaching-status { border-radius: 7px; font-size: 11px; }
.cabinet-page .teaching-course-heading h3 { line-height: 1.3; }
.cabinet-page .kreakoin-tabs { border-radius: 14px; padding: 5px; gap: 5px; }
.cabinet-page .kreakoin-tabs button { border-radius: 10px; font-size: 14px; }
.cabinet-page .achievement-award.is-earned { background: #fff8f2; border-color: #f5dac8; }
.cabinet-page .achievement-award.is-earned > span { background: var(--color-peach-soft); color: #a64e21; }

@media (min-width: 981px) {
  .cabinet-page .cabinet-app-shell:not(.is-sidebar-collapsed) { grid-template-columns: 246px minmax(0, 1fr); }
  .cabinet-page .cabinet-main { padding: 24px clamp(24px, 3vw, 44px) 48px; gap: 22px; }
  .cabinet-page .cabinet-app-shell.is-chat-section .cabinet-main { padding: 0; gap: 0; }
  .cabinet-page .cabinet-sidebar { padding: 18px 12px 24px; }
  .cabinet-page .cabinet-section-panel:not(.is-messenger-panel) { padding: 28px; }
}

@media (max-width: 760px) {
  .cabinet-page .notification-card { grid-template-columns: 1fr; padding: 16px; gap: 14px; }
  .cabinet-page .notification-card-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; max-width: none; }
  .cabinet-page .notification-read-button { margin-left: auto; }
}

@media (max-width: 640px) {
  .cabinet-page .cabinet-profile-card h1 { font-size: 25px; }
  .cabinet-page .cabinet-topbar :is(.cabinet-sidebar-toggle, .cabinet-rules-button, .cabinet-notifications-button, .cabinet-top-logout) { border-radius: 12px; }
  .cabinet-page .cabinet-topbar-actions { gap: 8px; }
  .cabinet-page .section-heading h2 { font-size: 27px; overflow-wrap: break-word; }
  .cabinet-page .cabinet-panel-block h2 { font-size: 23px; }
  .cabinet-page .cabinet-panel-block h3 { font-size: 20px; }
  .cabinet-page .section-heading { margin-bottom: 20px; }
  .cabinet-page .btn { min-height: 42px; font-size: 13px; }
  .cabinet-page .btn.compact { min-height: 38px; }
  .cabinet-page .parent-welcome { gap: 20px; padding: 18px; }
  .cabinet-page .parent-welcome h2 { font-size: 27px; }
  .cabinet-page .parent-attention-card { padding: 16px; }
  .cabinet-page .parent-attention-card > strong { font-size: 16px; }
  .cabinet-page .parent-attention-card > span:not(:first-child) { font-size: 12px; }
  .cabinet-page .partner-product-card-body { padding: 16px; }
  .cabinet-page .child-tabs { position: relative; }
  .cabinet-page .notification-friend-actions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cabinet-page *, .cabinet-page *::before, .cabinet-page *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
