@layer reset, tokens, base, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { min-height: 100%; }
  body { margin: 0; min-width: 320px; min-height: 100vh; }
  button, input, select, textarea { font: inherit; }
  button { border: 0; cursor: pointer; }
}

@layer tokens {
  :root {
    --navy: #10233f;
    --navy-2: #203f67;
    --canvas: #f4f6fa;
    --surface: #fff;
    --ink: #14243b;
    --muted: #5f6e82;
    --muted-light: #8fa1b7;
    --line: #e3e8ee;
    --coral: #f26f61;
    --coral-dark: #b94238;
    --green: #3eaa86;
    --orange: #d38a2c;
    --shadow: 0 10px 28px rgba(16, 35, 63, .06);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
  }
}

@layer base {
  body { background: var(--canvas); color: var(--ink); font: 400 14px/1.5 'DM Sans', sans-serif; }
  h1, h2, h3, p { margin: 0; }
  h1, h2, h3, strong, b { font-family: Manrope, sans-serif; }
  button, select, input, textarea { color: inherit; }
  input::placeholder, textarea::placeholder { color: #aeb9c8; opacity: 1; }
  button:disabled { cursor: default; opacity: .65; }
  :focus-visible { outline: 3px solid rgba(242, 111, 97, .45); outline-offset: 2px; }
  .hidden { display: none !important; }
  .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
}

@layer components {
  .boot-view { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; gap: var(--space-3); background: var(--navy); color: #c6d5e7; text-align: center; font-size: 12px; }
  .boot-brand, .auth-brand, .brand { display: flex; align-items: center; gap: 11px; }
  .brand { color: inherit; text-decoration: none; }
  .boot-brand { justify-content: center; color: #fff; }
  .boot-brand strong { font: 800 25px/1 Manrope, sans-serif; letter-spacing: -.8px; }
  .brand-mark { display: flex; align-items: end; gap: 3px; height: 22px; }
  .brand-mark i { width: 5px; display: block; border-radius: 4px; background: var(--coral); }
  .brand-mark i:nth-child(1) { height: 12px; opacity: .7; }
  .brand-mark i:nth-child(2) { height: 19px; }
  .brand-mark i:nth-child(3) { height: 15px; opacity: .85; }
  .brand-wordmark { white-space: nowrap; }
  .brand-ap { color: var(--coral); }
  .brand-yon { color: #aebed0; }

  .auth-view { position: relative; min-height: 100vh; overflow: hidden; background: var(--navy); }
  .auth-art { position: absolute; inset: 0; display: flex; min-height: 100vh; flex-direction: column; overflow: hidden; padding: var(--space-8) 10%; color: #f4f8fe; background: var(--navy); }
  .auth-art::before { content: ''; position: absolute; width: 500px; height: 500px; right: -190px; bottom: -220px; border: 1px solid rgba(242, 111, 97, .35); border-radius: 50%; box-shadow: 0 0 0 35px rgba(242, 111, 97, .05), 0 0 0 70px rgba(242, 111, 97, .04), 0 0 0 105px rgba(242, 111, 97, .03); }
  .auth-art::after { content: ''; position: absolute; width: 230px; height: 230px; left: -130px; top: 46%; border-radius: 50%; background: rgba(65, 126, 180, .18); filter: blur(2px); }
  .auth-brand, .auth-art-footer { position: relative; z-index: 1; }
  .auth-brand strong { font: 800 24px/1 Manrope, sans-serif; letter-spacing: -.8px; }
  .auth-intro { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; animation: auth-intro-out .65s 2.1s ease forwards; }
  .auth-intro h1 { margin: 0; color: #f4f8fe; font: 800 clamp(40px, 5vw, 70px)/1.03 Manrope, sans-serif; letter-spacing: -3px; text-align: center; }
  .auth-intro h1 em { color: var(--coral); font-style: normal; }
  .auth-intro p { max-width: 430px; margin: 20px 0 0; color: #adc0d5; font-size: 14px; line-height: 1.7; text-align: center; }
  .auth-art-footer { display: flex; justify-content: flex-end; color: #8097b2; font-size: 11px; }
  .art-spark { color: var(--coral); font-size: 19px; }
  .auth-card-wrap { position: relative; z-index: 1; display: grid; min-height: 100vh; place-items: center; padding: var(--space-8); opacity: 0; animation: auth-form-in .65s 2.45s ease forwards; }
  .auth-card { position: relative; width: min(390px, 100%); padding: 34px; border: 1px solid #e5eaf0; border-radius: 16px; background: rgba(255, 255, 255, .97); box-shadow: 0 18px 50px rgba(16, 35, 63, .08); }
  .auth-card-heading h2 { margin: 0 0 30px; font: 800 28px/1.2 Manrope, sans-serif; letter-spacing: -1px; }
  .auth-card:has(.otp-form) .auth-card-heading { margin-top: 22px; }
  .auth-form { display: grid; gap: var(--space-2); }
  .auth-form label, .modal-form label { color: #64748a; font-size: 13px; font-weight: 700; }
  .input-wrap { position: relative; }
  .input-prefix { position: absolute; top: 11px; left: 14px; color: var(--coral); font-weight: 700; }
  .auth-form input { width: 100%; padding: 12px; border: 1px solid #dbe3eb; border-radius: var(--radius-sm); background: #fff; }
  .auth-form input:focus, .modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px #fff0ed; outline: 0; }
  .auth-submit { width: 100%; margin-top: var(--space-2); }
  .auth-copyright { position: absolute; bottom: 20px; left: 50%; z-index: 3; margin: 0; color: #a8b3c1; font-size: 10px; transform: translateX(-50%); }

  @keyframes auth-intro-out { to { opacity: 0; transform: translateY(-16px); visibility: hidden; } }
  @keyframes auth-form-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

  .app-view { display: flex; min-height: 100vh; }
  .sidebar-close, .sidebar-backdrop { display: none; }
  .mobile-menu { display: none; }
  .modal-open, .menu-open { overflow: hidden; }
  .sidebar { position: sticky; top: 0; display: flex; width: 258px; height: 100dvh; flex: 0 0 258px; flex-direction: column; overflow-y: auto; padding: 30px 18px 18px; color: #eef4fd; background: var(--navy); }
  .sidebar .brand { padding: 0 14px var(--space-6); }
  .brand-name { font: 800 24px/1 Manrope, sans-serif; letter-spacing: -.8px; }
  .building-select { width: 100%; min-width: 0; margin-bottom: 26px; padding: 10px 34px 10px 8px; border: 1px solid #526680; border-radius: var(--radius-sm); color: #fff; background: #1b3558 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='6' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23dce9f7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; }
  .building-select.single-option { background-image: none; }
  .main-nav { display: flex; flex-direction: column; gap: var(--space-1); }
  .nav-item { display: flex; width: 100%; height: 42px; align-items: center; gap: var(--space-3); padding: 0 12px; border-radius: var(--radius-sm); color: #aebed0; background: transparent; font-size: 13px; text-align: left; transition: background .18s, color .18s; }
  .nav-item:hover, .nav-item.active { color: #fff; background: #1b385d; }
  .nav-item.active { box-shadow: inset 3px 0 var(--coral); }
  .nav-symbol { width: 18px; color: #7890ae; font-size: 17px; text-align: center; }
  .nav-item.active .nav-symbol { color: #ff8577; }
  .sidebar-footer { margin-top: auto; padding-top: var(--space-6); }
  .profile-row { display: flex; align-items: center; gap: var(--space-3); padding: 18px 6px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
  .profile-row > div:nth-child(2) { min-width: 0; flex: 1; }
  .profile-row strong { display: block; overflow-wrap: anywhere; font-size: 12px; }
  .profile-row .role-switch, .logout-button { flex: 0 0 auto; color: #9bb0c8; background: transparent; font-size: 17px; }
  .profile-row .role-switch { margin-left: auto; text-decoration: none; }
  .logout-button { margin-left: 0; font-size: 18px; }

  .main-content { width: calc(100% - 258px); min-width: 0; }
  .topbar { display: flex; height: 74px; align-items: center; justify-content: space-between; padding: 0 45px; border-bottom: 1px solid var(--line); background: #fff; }
  .breadcrumb { display: flex; min-width: 0; align-items: center; color: #93a0b1; font-size: 12px; }
  .breadcrumb > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .breadcrumb i { padding: 0 10px; color: #ccd3dc; font-style: normal; }
  .breadcrumb strong { color: var(--ink); font-weight: 600; white-space: nowrap; }
  .topbar-actions { display: flex; flex: 0 0 auto; gap: var(--space-4); align-items: center; }
  .notification-button { position: relative; min-width: 36px; min-height: 36px; color: #718096; background: transparent; font-size: 21px; }
  .notification-button b { position: absolute; top: 0; right: -5px; display: grid; min-width: 18px; height: 18px; place-items: center; padding: 2px; border: 1px solid #fff; border-radius: 50%; color: #fff; background: var(--coral); font-size: 10px; }

  .page-content { max-width: none; margin: 0 auto; padding: 38px 45px 24px; }
  .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-5); margin-bottom: 29px; }
  .page-heading > div { min-width: 0; }
  .date-line { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
  .page-heading h1 { font: 800 28px/1.2 Manrope, sans-serif; letter-spacing: -.9px; }
  .heading-subtitle { margin-top: 9px; color: var(--muted); font-size: 13px; }
  .stat-grid, .content-grid, .lower-grid, .notes-grid { display: grid; gap: var(--space-4); }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
  .content-grid, .lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
  .notes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-card, .panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
  .stat-card { padding: 19px 20px 16px; }
  .stat-card.accent-card { border-color: transparent; color: #fff; background: var(--navy-2); }
  .stat-card-top, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
  .stat-label { color: var(--muted); font-size: 12px; }
  .accent-card .stat-label { color: #bdd0e7; }
  .stat-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 7px; color: var(--coral); background: #fff1ef; font-size: 15px; font-weight: 700; }
  .stat-value { margin-top: 15px; font: 800 24px/1 Manrope, sans-serif; letter-spacing: -.8px; }
  .stat-card p { margin-top: 7px; color: var(--muted); font-size: 11px; }
  .accent-card p { color: #aec1d9; }
  .panel { overflow: hidden; }
  .panel-heading { padding: 20px 21px 16px; }
  .panel-heading h2 { font: 700 15px/1.3 Manrope, sans-serif; letter-spacing: -.3px; }
  .panel-heading p { margin-top: 6px; color: var(--muted); font-size: 11px; }
  .data-list { padding: 0 21px 21px; }
  .data-row { display: flex; min-height: 66px; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid #f0f2f5; font-size: 13px; }
  .data-list > .data-row:last-child { padding-bottom: 0; }
  .data-row > div:first-child { min-width: 0; flex: 1 1 auto; }
  .data-row > b, .data-row > span:not(.user-status), .data-row > button, .data-row > .data-actions { flex: 0 0 auto; }
  .data-row > button, .data-row > .data-actions, .data-row > .user-status { margin-left: auto; }
  .user-row > .data-actions { margin-left: 0; }
  .data-row strong { display: block; overflow-wrap: anywhere; color: var(--ink); font-size: 14px; }
  .data-row div span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
  .data-row div .user-role-label { color: var(--muted); font-size: 12px; font-weight: 400; }
  .data-row > b { color: var(--ink); font-size: 14px; white-space: nowrap; }
  .data-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: flex-end; }
  .outline-button, .text-button, .primary-button, .cancel-button { transition: background .18s, color .18s, border-color .18s, transform .18s; }
  .primary-button { padding: 11px 16px; border-radius: 7px; color: #fff; background: var(--coral-dark); box-shadow: 0 6px 14px rgba(242, 111, 97, .2); font-weight: 700; }
  .primary-button:hover { transform: translateY(-1px); background: #a3362e; }
  .primary-button span { font-size: 17px; vertical-align: -1px; }
  .outline-button { padding: 7px 10px; border: 1px solid #f2c6c1; border-radius: var(--radius-sm); color: var(--coral-dark); background: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
  .text-button { min-height: 32px; padding: 0; color: var(--coral-dark); background: transparent; font-size: 12px; font-weight: 700; }
  .icon-only-back { position: absolute; top: 14px; left: 24px; width: 32px; justify-self: start; font-size: 22px; line-height: 1; }
  .otp-input { padding: 12px !important; text-align: center; letter-spacing: 4px; }
  .text-button:hover, .outline-button:hover { color: #8d2e27; border-color: #eaa39c; }
  .pill { display: inline-flex; width: fit-content; align-items: center; justify-content: center; padding: 5px 10px; border-radius: 12px; font-size: 10px; line-height: 1.4; }
  .pill.success { color: #287f65; background: #e5f7ef; }
  .pill.warning { color: #805712; background: #fff1dc; }
  .pill.danger { color: #b4574d; background: #fff0ed; }
  .pill.muted { color: #526174; background: #edf1f6; }
  .empty-card { padding: 35px; border: 1px dashed #d9e1e9; border-radius: var(--radius-md); color: var(--muted); background: #fff; text-align: center; }
  .empty-copy { padding: 12px 0 24px; color: var(--muted); }
  .page-footer { display: flex; justify-content: space-between; gap: var(--space-3); padding: 2px 1px; color: #a2adbb; font-size: 10px; }
  .page-state { display: grid; min-height: 280px; place-content: center; justify-items: center; gap: var(--space-3); text-align: center; }
  .page-state p { max-width: 55ch; line-height: 1.6; }
  .page-state h1, .page-state h2, .page-state p { margin: 0; }

  .notice-panel .panel-heading { padding-bottom: 11px; }
  .notice-item { display: flex; gap: 10px; align-items: flex-start; padding: 13px 21px; border-top: 1px solid #f0f2f5; }
  .notice-item > div { flex: 1; }
  .notice-bullet { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; }
  .notice-bullet.coral { background: var(--coral); }
  .notice-bullet.blue { background: #70a5db; }
  .notice-item strong { display: block; font-size: 11px; }
  .notice-item p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
  .notice-item span:last-child { display: block; margin-top: 6px; color: #a2adbb; font-size: 9px; }
  .full-width-button { width: calc(100% - 42px); margin: 4px 21px 17px; padding: 9px; border-radius: var(--radius-sm); color: var(--coral-dark); background: #fff7f5; font-size: 10px; font-weight: 700; }
  .announcement-list { padding: 0 21px 21px; }
  .announcement-card { display: flex; align-items: flex-start; gap: 14px; padding: 19px 0; border-top: 1px solid #f0f2f5; }
  .announcement-card .notice-bullet { width: 9px; height: 9px; margin-top: 6px; }
  .announcement-card > div:last-child { min-width: 0; flex: 1; }
  .announcement-card h3 { color: var(--ink); font: 700 15px/1.35 Manrope, sans-serif; letter-spacing: -.2px; }
  .announcement-card p { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
  .announcement-card span { display: block; margin-top: 12px; color: #9aa7b7; font-size: 11px; }
  .announcement-list > .empty-card { margin-top: 4px; }
  .collection-body { display: flex; min-height: 175px; align-items: center; padding: 4px 24px 20px; }
  .donut-wrap { display: grid; width: 48%; place-items: center; }
  .donut { position: relative; width: 144px; height: 144px; border-radius: 50%; background: conic-gradient(var(--coral) 0 78%, #f8d4d0 78% 89%, #f4ecd8 89% 100%); }
  .donut::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
  .donut-center { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; }
  .donut-center strong { font: 800 23px Manrope, sans-serif; }
  .donut-center span { margin-top: 2px; color: var(--muted); font-size: 10px; }
  .legend-list { display: flex; flex: 1; flex-direction: column; gap: 17px; }
  .legend-row { display: grid; grid-template-columns: 8px 1fr auto; gap: 9px; align-items: center; }
  .legend-dot { display: block; width: 7px; height: 7px; border-radius: 50%; }
  .legend-dot.paid { background: var(--coral); }
  .legend-dot.pending { background: #f6c47c; }
  .legend-dot.late { background: #efd8d4; }
  .legend-row > div strong { display: block; font-size: 11px; }
  .legend-row > div span { color: var(--muted); font-size: 10px; }
  .legend-row > b { font-size: 11px; }
  .mini-progress { height: 5px; margin: 15px 0 6px; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .14); }
  .mini-progress span { display: block; height: 100%; border-radius: 10px; background: #f58070; }
  .progress-meta { display: flex; justify-content: space-between; color: #a7bbd1; font-size: 10px; }
  .progress-meta b { color: #fff; }
  .table-header, .table-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-4); align-items: center; }
  .table-header { padding: 0 21px 8px; color: var(--muted); font-size: 10px; }
  .table-row { min-height: 58px; padding: 0 21px; border-top: 1px solid #f0f2f5; }
  .table-name strong, .table-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .table-name strong { color: var(--ink); font-size: 11px; }
  .table-name span { margin-top: 4px; color: var(--muted); font-size: 9px; }
  .payment-list { padding: 4px 21px 9px; }
  .payment-row { display: flex; min-height: 58px; align-items: center; gap: 10px; border-bottom: 1px solid #f0f2f5; }
  .payment-person { min-width: 0; flex: 1; }
  .payment-person strong { display: block; font-size: 11px; }
  .payment-person span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
  .payment-amount { color: var(--green); font-size: 12px; }
  .status-dot { width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--green); }

  .notes-grid { margin-bottom: 22px; }
  .note-card { position: relative; min-height: 164px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow); }
  .note-card.pinned { padding-top: 15px; border-top: 3px solid var(--coral); }
  .note-card-top { display: flex; justify-content: space-between; gap: 10px; }
  .note-category { padding: 4px 7px; border-radius: 20px; color: var(--coral-dark); background: #fff0ed; font-size: 9px; }
  .note-card h3 { margin: 17px 0 8px; font: 700 15px/1.3 Manrope, sans-serif; }
  .note-card p, .dashboard-note p, .request-description { color: var(--muted); font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
  .note-card-footer { position: absolute; right: 17px; bottom: 14px; left: 17px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: #9aa7b7; font-size: 11px; }
  .note-lock { color: #98601a; }
  .dashboard-note { padding: 16px 0; border-top: 1px solid var(--line); }
  .dashboard-note strong { font-size: 14px; }
  .dashboard-note p { margin-bottom: 0; }
  .collection-summary { padding: 10px 0 20px; }
  .collection-summary strong { font: 800 26px Manrope, sans-serif; }
  .collection-summary progress { display: block; width: 100%; height: 12px; margin-top: 16px; accent-color: var(--green); }
  .collection-summary p { margin-top: 8px; color: var(--muted); font-size: 13px; }
  .data-panel { min-height: 125px; }
  .data-row .paid-caption { color: var(--muted); font-size: 10px; white-space: nowrap; }
  .user-filters { align-items: center; }
  .filter-group { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
  .filter-group input, .filter-group select { min-width: 0; padding: 9px 34px 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); background: #fff; font-size: 11px; }
  .filter-group input { min-width: 190px; padding-right: 10px; }
  .modal-form select, .filter-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='6' viewBox='0 0 14 8'%3E%3Cpath d='m1 1 6 6 6-6' fill='none' stroke='%23748197' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; appearance: none; }
  .notification-list { display: grid; max-height: 470px; overflow-y: auto; gap: var(--space-2); }
  .notification-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
  .notification-row.unread { border-color: #ffd9d2; background: #fff8f6; }
  .notification-mark { width: 18px; color: var(--coral); font-size: 18px; line-height: 1; text-align: center; }
  .notification-row.read .notification-mark { margin-top: 2px; color: var(--green); font-size: 14px; }
  .notification-content { min-width: 0; flex: 1; }
  .notification-content > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .notification-content strong { color: var(--ink); font-size: 12px; }
  .notification-type { padding: 3px 6px; border-radius: 12px; color: var(--coral-dark); background: #fff0ed; font-size: 9px; }
  .notification-content p { margin: 6px 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
  .notification-content time { color: #9aa7b7; font-size: 9px; }
  .notification-row > .text-button { margin-left: auto; }

  .modal-backdrop { display: none; position: fixed; inset: 0; z-index: 10; align-items: center; justify-content: center; overflow-y: auto; padding: var(--space-5); opacity: 1; background: rgba(16, 35, 63, .48); }
  .modal-backdrop.open { display: flex; }
  .modal-backdrop .modal { position: relative; top: auto; left: auto; z-index: auto; display: block; width: 100%; height: auto; max-width: 470px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 26px; opacity: 1; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 24px 70px rgba(16, 35, 63, .25); animation: modal-in .22s ease-out; }
  .small-modal { max-width: 360px; }
  .notification-modal { max-width: 560px; }
  .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: 22px; }
  .modal h2 { margin-top: 6px; font: 800 21px/1.2 Manrope, sans-serif; }
  .modal-close { display: grid; width: 36px; min-width: 36px; height: 36px; place-items: center; border-radius: var(--radius-sm); color: #78879a; background: #f3f5f8; font-size: 20px; }
  .modal-form { display: flex; flex-direction: column; gap: var(--space-4); }
  .modal-form label { display: block; }
  .modal-form input, .modal-form select, .modal-form textarea { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid #dfe5ec; border-radius: var(--radius-sm); color: var(--ink); background: #fff; font-size: 14px; resize: vertical; }
  .modal-form select { padding-right: 34px; }
  .form-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
  .check-label { display: flex !important; align-items: center; gap: var(--space-2); color: var(--muted) !important; font-weight: 500 !important; }
  .check-label input { width: 15px; height: 15px; margin: 0; accent-color: var(--coral); }
  .modal-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: 5px; }
  .cancel-button { padding: 10px 12px; color: #748197; background: transparent; font-weight: 600; }
  .role-options { display: grid; gap: var(--space-2); }
  .role-option { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #f7f8fa; text-align: left; }
  .role-option:hover { border-color: var(--coral); background: #fff8f6; }
  .role-option strong { display: block; font-size: 12px; }
  .role-option span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
  .role-option b { color: var(--coral); font-size: 18px; }
  .detail-block, .manager-list { display: grid; gap: 10px; }
  .detail-label { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
  .manager-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
  .manager-row strong, .manager-row span { display: block; }
  .manager-row span { margin-top: 4px; color: var(--muted); font-size: 10px; }
  .manager-row .text-button { color: var(--coral-dark); font-size: 10px; }
  .form-hint { margin: 0; padding: 10px 12px; border-radius: 7px; color: var(--muted); background: #f7f8fa; font-size: 12px; line-height: 1.65; }
  .request-description { margin: 8px 0; }
  .toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(480px, calc(100vw - 32px)); padding: 13px 17px; transform: translateY(20px); opacity: 0; pointer-events: none; border-radius: 7px; color: #fff; background: var(--navy); box-shadow: 0 12px 30px rgba(16, 35, 63, .2); font-size: 12px; line-height: 1.5; transition: .25s; }
  .toast.show { transform: translateY(0); opacity: 1; }
  @keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
}

@layer responsive {
  @media (max-width: 1100px) {
    .sidebar { width: 220px; flex-basis: 220px; }
    .main-content { width: calc(100% - 220px); }
    .topbar, .page-content { padding-right: 28px; padding-left: 28px; }
    .content-grid, .lower-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card:first-child { grid-column: 1 / -1; }
    .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 760px) {
    .auth-art { padding: 26px 28px; }
    .auth-intro h1 { font-size: 40px; letter-spacing: -2px; }
    .auth-art-footer { display: none; }
    .auth-card-wrap { min-height: 100vh; padding: 24px; }
    .sidebar { position: fixed; left: -258px; z-index: 8; width: 258px; height: 100dvh; padding-top: 22px; transition: left .2s; }
    .sidebar.open { left: 0; box-shadow: 12px 0 35px rgba(16, 35, 63, .2); }
    .sidebar-close { display: block; position: absolute; top: 18px; right: 12px; width: 36px; height: 36px; color: inherit; background: transparent; font-size: 24px; }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 7; display: block; background: rgba(16, 35, 63, .45); }
    .main-content { width: 100%; }
    .topbar { height: 63px; gap: 4px; padding: 0 18px; }
    .mobile-menu { display: block; margin-right: 12px; color: var(--navy); background: transparent; font-size: 20px; }
    .breadcrumb { flex: 1; font-size: 11px; }
    .breadcrumb i { padding: 0 6px; }
    .page-content { padding: 27px 17px 18px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: var(--space-5); }
    .page-heading h1 { font-size: 24px; }
    .page-heading > button { width: 100%; }
    .stat-grid, .notes-grid { grid-template-columns: 1fr; }
    .stat-card:first-child { grid-column: auto; }
    .data-row { flex-wrap: wrap; gap: 6px 12px; padding: 13px 0; }
    .data-row > div:first-child { flex: 1 1 100%; }
    .data-row > button, .data-row > .data-actions, .data-row > .user-status { margin-left: 0; }
    .data-actions { justify-content: flex-start; }
    .table-header { display: none; }
    .table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 0; }
    .table-row > span:nth-child(2) { grid-column: 2; grid-row: 1; }
    .table-row > b { grid-column: 2; grid-row: 2; }
    .table-row > .pill { grid-column: 1; grid-row: 2; justify-self: start; }
    .collection-body { padding-right: 14px; padding-left: 14px; }
    .donut-wrap { width: 43%; }
    .donut { width: 120px; height: 120px; }
    .data-list { padding-right: 15px; padding-left: 15px; }
    .announcement-list { padding-right: 15px; padding-left: 15px; }
    .announcement-card { padding: 16px 0; }
    .user-filters { align-items: stretch; flex-direction: column; }
    .filter-group { justify-content: flex-start; }
    .filter-group input { width: 100%; min-width: 0; }
    .filter-group select { min-width: 0; flex: 1; }
    .form-two { grid-template-columns: 1fr; }
    .modal { max-height: calc(100vh - 24px); padding: 22px; }
    .notification-modal { max-width: 100%; }
    .notification-content > div { align-items: flex-start; flex-direction: column; gap: 4px; }
    .notification-row > button { margin-left: 28px; }
    .page-footer { flex-direction: column; gap: var(--space-3); }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  }
}
