:root {
  --color-primary: #7a4b99;
  --color-primary-dark: #5e3578;
  --color-primary-light: #a77cc2;
  --color-secondary: #b48fcc;
  --color-accent: #a77cc2;
  --violet-50: #faf7fc;
  --violet-100: #f3ecf8;
  --violet-200: #e7daf0;
  --violet-300: #d3bde3;
  --violet-400: #b58fcf;
  --violet-500: #9867b8;
  --violet-600: #7a4b99;
  --violet-700: #663d82;
  --violet-800: #54306b;
  --violet-900: #3f2352;
  --text-dark: #2f2a38;
  --text-muted: #6e6679;
  --gray-light: #f3eff6;
  --border-color: #e9e1ef;
  --surface: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(63, 35, 82, 0.06);
  --shadow-md: 0 8px 24px rgba(63, 35, 82, 0.09);
  --shadow-lg: 0 16px 40px rgba(63, 35, 82, 0.12);
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: #fdfcfe;
  color: var(--text-dark);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.25; }
img { max-width: 100%; }
a { color: inherit; transition: color var(--transition); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--violet-600); color: #fff; padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

:root { --header-h: calc(var(--logo-size, 56px) + 29px); --sidebar-w: 250px; }
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--violet-800), var(--violet-900));
  padding: 14px 0;
  overflow-y: auto;
  z-index: 250;
  box-shadow: 4px 0 18px rgba(43,39,52,0.12);
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ead9f2;
  padding: 12px 22px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 4px solid transparent;
  transition: background .18s ease, color .18s ease;
}
.sidebar a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar a.active { background: rgba(255,255,255,0.14); color: #fff; border-left-color: #e3c9f0; }

.layout-admin main > .container[style*="margin-left:230px"],
.layout-admin main > .container { margin-left: calc(var(--sidebar-w) + 10px) !important; }
.layout-admin .site-footer { margin-left: var(--sidebar-w); }
.layout-user main > .container[style*="margin-left:230px"] { margin-left: auto !important; margin-right: auto; max-width: 1180px; }
.layout-user main > .container { max-width: 1180px; margin-left: auto; margin-right: auto; }
.layout-user .guest-strip, .layout-guest .flash-wrap { max-width: 1180px; }

.container { padding: 28px; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.page-header h2 { color: var(--violet-800); font-size: 1.65rem; font-weight: 700; margin: 0; }
.page-subtitle { color: var(--text-muted); font-size: 1rem; margin-top: 2px; }

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.post-card:hover, .event-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.post-card, .event-card { transition: transform var(--transition), box-shadow var(--transition); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
  text-align: left;
  border-top: 4px solid var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  font-size: 1.9rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--violet-100);
  border-radius: 12px;
  flex-shrink: 0;
}
.stat-card h2 { color: var(--violet-800); font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-card p { color: var(--text-muted); font-size: 0.95rem; margin-top: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-2px); }
.btn-secondary { background: var(--violet-100); color: var(--violet-800); }
.btn-secondary:hover { background: var(--violet-200); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }
.btn-primary-inverse { background: #fff; color: var(--color-primary); }
.btn-primary-inverse:hover { background: var(--color-secondary); color: #fff; }
.btn-danger { background: #fdecea; color: #c0392b; }
.btn-danger:hover { background: #f9d3ce; }
.btn-sm { padding: 7px 16px; font-size: 0.88rem; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
th, td { padding: 13px 16px; text-align: left; font-size: 1rem; border-bottom: 1px solid var(--gray-light); }
th { background: var(--violet-50); color: var(--violet-900); font-weight: 700; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.4px; }
tbody tr:hover { background: #fbfaff; }

.badge { padding: 5px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.2px; }
.badge-submitted { background: #dbeafe; color: #1e40af; }
.badge-review { background: #fdf2d0; color: #7a4a05; }
.badge-mediation { background: #ede9fe; color: #5b21b6; }
.badge-resolved { background: #d1fae5; color: #065f46; }
.badge-closed { background: #e5e7eb; color: #374151; }
.badge-pending { background: #fdf2d0; color: #7a4a05; }
.badge-scheduled { background: #ede9fe; color: #5b21b6; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-draft { background: #e5e7eb; color: #374151; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-archived { background: #ede9fe; color: #5b21b6; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 1rem; font-weight: 600; color: var(--text-dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--violet-500);
  box-shadow: 0 0 0 4px var(--violet-100);
}
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.image-preview { max-width: 200px; border-radius: 10px; margin-top: 8px; border: 1px solid var(--border-color); }

.auth-wrapper { min-height: calc(100vh - 220px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-box {
  background: #fff;
  padding: 36px;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  border-top: 5px solid var(--color-secondary);
  box-shadow: var(--shadow-lg);
}

.alert { padding: 13px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 1rem; font-weight: 500; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

.post-card { overflow: hidden; padding: 0; }
.post-card img { width: 100%; height: 180px; object-fit: cover; }
.post-card .post-body { padding: 18px; }
.post-card h3 { color: var(--violet-800); font-size: 1.2rem; margin-bottom: 6px; }
.post-card .post-date { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; }
.post-card p { font-size: 1rem; color: var(--text-dark); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2.95rem; margin-bottom: 10px; }

.section-title { color: var(--violet-700); font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; gap: 0; }
}
@media (max-width: 768px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .chat-layout { flex-direction: column; height: auto; }
  .chat-thread-list { width: 100%; max-height: 240px; border-right: none; border-bottom: 1px solid var(--border-color); }
}
[data-theme="dark"] body {
  background: linear-gradient(180deg, #1a1625 0%, #13111c 100%);
  color: #e5e0f5;
}
[data-theme="dark"] .card {
  background: #211c30;
  border-color: #362f4a;
}
[data-theme="dark"] .page-header h2 { color: var(--violet-300); }
[data-theme="dark"] .page-subtitle { color: #9c94b3; }
[data-theme="dark"] .section-title { color: var(--violet-300); }
[data-theme="dark"] table { background: #211c30; }
[data-theme="dark"] th { background: #2a2438; color: #ddd6fe; }
[data-theme="dark"] td { border-bottom-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] tbody tr:hover { background: #2a2438; }
[data-theme="dark"] .form-group label { color: #e5e0f5; }
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #2a2438;
  border-color: #362f4a;
  color: #e5e0f5;
}
[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder { color: #756c8c; }
[data-theme="dark"] .btn-secondary { background: #362f4a; color: #ddd6fe; }
[data-theme="dark"] .btn-secondary:hover { background: #453c5c; }
[data-theme="dark"] .auth-box { background: #211c30; }
[data-theme="dark"] .stat-card h2 { color: var(--violet-300); }
[data-theme="dark"] .stat-card p { color: #9c94b3; }
[data-theme="dark"] .empty-state { color: #9c94b3; }
[data-theme="dark"] .post-card h3 { color: var(--violet-300); }
[data-theme="dark"] .post-card p { color: #cfc9de; }
[data-theme="dark"] .post-card .post-date { color: #9c94b3; }
[data-theme="dark"] footer { color: #9c94b3; border-top-color: #362f4a !important; }
[data-theme="dark"] .image-preview { border-color: #362f4a; }

.theme-toggle-btn {
  background: var(--violet-100);
  border: none;
  color: var(--violet-800);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.theme-toggle-btn:hover { background: var(--violet-200); }

.notif-wrapper { position: relative; }
.notif-bell-btn {
  background: var(--violet-100);
  border: none;
  color: var(--violet-800);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.notif-bell-btn:hover { background: var(--violet-200); }
.notif-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.notif-dropdown {
  position: absolute;
  top: 42px; right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 200;
  display: none;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--violet-800);
}
.notif-dropdown-header button {
  background: none; border: none; color: var(--violet-600); font-size: 0.85rem; cursor: pointer; font-weight: 600;
}
.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-light);
  font-size: 0.95rem;
  cursor: pointer;
  display: block;
  color: var(--text-dark);
  text-decoration: none;
}
.notif-item:hover { background: var(--violet-50); }
.notif-item.unread { background: #faf9ff; font-weight: 600; border-left: 3px solid var(--violet-600); }
.notif-item .notif-time { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; margin-top: 3px; }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 0.95rem; }

[data-theme="dark"] .notif-dropdown { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .notif-dropdown-header { border-bottom-color: #362f4a; color: var(--violet-300); }
[data-theme="dark"] .notif-item { border-bottom-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .notif-item:hover { background: #2a2438; }
[data-theme="dark"] .notif-item.unread { background: #241f34; }

.chat-box {
  height: 400px;
  overflow-y: auto;
  padding: 18px;
  background: #faf9ff;
}
[data-theme="dark"] .chat-box { background: #1a1625; }

.chat-input-bar {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  background: #fff;
}
[data-theme="dark"] .chat-input-bar { background: #211c30; border-top-color: #362f4a; }

.chat-date-label { text-align: center; color: #9ca3af; font-size: 0.8rem; margin: 12px 0; }
[data-theme="dark"] .chat-date-label { color: #756c8c; }

.chat-bubble-row { display: flex; margin-bottom: 8px; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble-row.theirs { justify-content: flex-start; }

.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 1rem;
}
.chat-bubble.mine {
  background: var(--color-primary);
  color: #fff;
}
.chat-bubble.theirs {
  background: #fff;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}
[data-theme="dark"] .chat-bubble.theirs {
  background: #2a2438;
  color: #e5e0f5;
  border-color: #362f4a;
}
.chat-bubble .chat-sender-name {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--violet-700);
}
[data-theme="dark"] .chat-bubble .chat-sender-name { color: var(--violet-300); }
.chat-bubble .chat-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

.chat-input-bar input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark);
}
[data-theme="dark"] .chat-input-bar input[type="text"] {
  background: #2a2438;
  border-color: #362f4a;
  color: #e5e0f5;
}
[data-theme="dark"] .chat-input-bar input[type="text"]::placeholder { color: #756c8c; }

.chat-layout {
  display: flex;
  height: calc(100vh - 160px);
  min-height: 500px;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.chat-thread-list { width: 300px; flex-shrink: 0; border-right: 1px solid var(--border-color); overflow-y: auto; }
.chat-thread-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--gray-light); cursor: pointer; transition: background 0.15s ease; }
.chat-thread-item:hover { background: var(--violet-50); }
.chat-thread-item.active { background: var(--violet-100); border-left: 3px solid var(--violet-600); }
.chat-thread-name { font-weight: 600; font-size: 1rem; }
.chat-thread-preview { font-size: 0.9rem; color: var(--text-muted); margin-top: 3px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-meta { text-align: right; flex-shrink: 0; margin-left: 8px; }
.chat-thread-time { font-size: 0.8rem; color: var(--text-muted); }
.chat-conversation-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-conversation-header { padding: 14px 20px; border-bottom: 1px solid var(--border-color); }
.chat-conversation-header h3 { font-size: 1.1rem; color: var(--violet-800); }
.chat-conversation-header p { font-size: 0.9rem; color: var(--text-muted); margin-top: 2px; }
.chat-empty-placeholder { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--text-muted); }
.chat-conversation-panel .chat-box { flex: 1; height: auto; }

[data-theme="dark"] .chat-layout { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .chat-thread-list { border-right-color: #362f4a; }
[data-theme="dark"] .chat-thread-item { border-bottom-color: #362f4a; }
[data-theme="dark"] .chat-thread-item:hover { background: #2a2438; }
[data-theme="dark"] .chat-thread-item.active { background: #332a4d; border-left-color: var(--violet-300); }
[data-theme="dark"] .chat-thread-preview { color: #9c94b3; }
[data-theme="dark"] .chat-thread-time { color: #9c94b3; }
[data-theme="dark"] .chat-conversation-header { border-bottom-color: #362f4a; }
[data-theme="dark"] .chat-conversation-header h3 { color: var(--violet-300); }
[data-theme="dark"] .chat-conversation-header p { color: #9c94b3; }
[data-theme="dark"] .chat-empty-placeholder { color: #9c94b3; }
.hero-banner {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; border-radius: 24px; padding: 34px 36px; margin-bottom: 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero-banner::after { content: '⚥'; position: absolute; right: 24px; bottom: -18px; font-size: 7rem; opacity: 0.12; }
.hero-banner h1 { font-size: 1.9rem; margin-bottom: 6px; }
.hero-banner p { opacity: 0.92; max-width: 640px; }
.hero-banner .hero-hello { font-size: 0.95rem; opacity: 0.85; margin-bottom: 4px; }
.emergency-strip {
  background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; border-radius: 14px;
  padding: 14px 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-weight: 600;
}
.emergency-strip a { color: #fff; background: #e11d48; text-decoration: none; padding: 6px 16px; border-radius: 999px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.quick-tile {
  background: #fff; border: 1px solid var(--border-color); border-radius: 16px; padding: 20px 16px; text-align: center;
  text-decoration: none; color: var(--violet-800); font-weight: 600; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.quick-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-tile .qt-icon { display: block; font-size: 2.1rem; margin-bottom: 6px; }
.quick-tile.primary { background: linear-gradient(135deg, var(--violet-600), var(--violet-800)); color: #fff; }
.stepper { display: flex; gap: 0; margin: 14px 0 6px; flex-wrap: wrap; }
.step { flex: 1; min-width: 110px; text-align: center; position: relative; padding-top: 34px; font-size: 0.8rem; color: var(--text-muted); }
.step::before { content: ''; position: absolute; top: 12px; left: 0; right: 0; height: 4px; background: var(--violet-100); }
.step:first-child::before { left: 50%; } .step:last-child::before { right: 50%; }
.step .dot { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--violet-200); z-index: 1; }
.step.done { color: var(--violet-800); font-weight: 600; }
.step.done::before { background: var(--violet-500); }
.step.done .dot { background: var(--violet-600); border-color: var(--violet-600); }
.step.current .dot { box-shadow: 0 0 0 5px var(--violet-200); }
.date-block { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.date-block .db-date { background: var(--violet-100); color: var(--violet-800); border-radius: 12px; padding: 8px 14px; text-align: center; min-width: 74px; font-weight: 700; line-height: 1.2; }
.date-block .db-date small { display: block; font-weight: 500; font-size: 0.75rem; }
.hotline-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.hotline-item .hl-num { font-weight: 700; color: var(--violet-800); text-decoration: none; background: var(--violet-100); padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.hotline-item small { display: block; color: var(--text-muted); }
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.howto .ht { background: var(--violet-50); border-radius: 14px; padding: 16px; }
.howto .ht b { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--violet-600); color: #fff; align-items: center; justify-content: center; margin-bottom: 8px; }
.tip-card { background: #fff; border: 1px solid var(--border-color); border-left: 5px solid var(--violet-400); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); }
.tip-card .tip-icon { font-size: 1.6rem; }
.tip-card h4 { color: var(--violet-800); margin: 4px 0; }
.tip-card p { font-size: 0.9rem; color: var(--text-muted); }
details.faq-item { border-bottom: 1px solid var(--gray-light); padding: 12px 0; }
details.faq-item summary { cursor: pointer; font-weight: 600; color: var(--violet-800); }
details.faq-item p { margin-top: 8px; color: var(--text-muted); }
.edu-mini { display: block; text-decoration: none; color: inherit; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.edu-mini small { color: var(--violet-600); font-weight: 600; }
.timeline-item { border-left: 3px solid var(--violet-300); padding: 4px 0 14px 16px; margin-left: 6px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--violet-500); }
.action-chip { display: inline-block; background: #ecfdf5; color: #065f46; border-radius: 999px; padding: 2px 12px; font-size: 0.85rem; font-weight: 600; }

.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.filter-bar .form-group { margin-bottom: 0; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { background: var(--violet-100); color: var(--violet-800); padding: 5px 14px; border-radius: 999px; text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.chip:hover { background: var(--violet-200); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.toggle-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--violet-600); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-light); }
.inline-form input[type=text], .inline-form input[type=number], .inline-form select, .inline-form textarea {
  padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; font-size: 0.9rem; flex: 1 1 140px; min-width: 0;
}
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--violet-600); }
.range-val { min-width: 70px; font-weight: 700; color: var(--violet-800); }
.status-pill-ok { background:#d1fae5; color:#065f46; } .status-pill-bad { background:#fee2e2; color:#991b1b; } .status-pill-skip { background:#e5e7eb; color:#374151; }
.help-text { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.table-scroll { overflow-x: auto; }


.event-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.event-card .ev-img { width: 100%; height: 170px; object-fit: cover; background: var(--violet-100); }
.event-card .ev-noimg { height: 170px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: linear-gradient(135deg, var(--violet-100), var(--violet-200)); }
.event-card .ev-body { padding: 18px; display: flex; gap: 14px; }
.ev-date { background: var(--violet-600); color: #fff; border-radius: 12px; text-align: center; padding: 8px 12px; min-width: 66px; height: fit-content; font-weight: 700; line-height: 1.15; }
.ev-date small { display: block; font-weight: 500; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; }
.event-card h3 { color: var(--violet-800); font-size: 1.15rem; margin-bottom: 4px; }
.event-card .ev-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 6px; }
.event-card.past { opacity: 0.7; }
.mini-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--violet-100); }
.mini-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-light); text-decoration: none; color: inherit; }
.thumb-sm { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

.hero-banner::after { pointer-events: none; }
.hero-banner > * { position: relative; z-index: 1; }

.section .container, .section-alt .container, .page-hero .container, .hero .container, .site-footer .container, .cta-banner .container, .stats-section .container { width: 100%; max-width: 1180px; margin-left: auto; margin-right: auto; }
.site-header {
  position: sticky; top: 0; z-index: 500; background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-color);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; max-width: 1400px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; color: var(--text-dark); text-decoration: none; }
.brand img.logo-img, .brand .logo-img { height: var(--logo-size, 56px); width: var(--logo-size, 56px); flex-shrink: 0; object-fit: contain; border-radius: 12px; }
.logo-fallback { display: flex; align-items: center; justify-content: center; background: var(--color-primary); color: #fff; font-size: calc(var(--logo-size, 56px) * 0.55); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { font-size: 0.6rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav > a {
  color: var(--text-dark); font-weight: 500; padding: 8px 12px; border-radius: 999px; font-size: 0.9rem; white-space: nowrap; text-decoration: none;
}
.main-nav > a:hover, .main-nav > a.active { background: var(--violet-50); color: var(--color-primary); }
.main-nav a.nav-cta { background: var(--color-primary); color: #fff; font-weight: 600; }
.main-nav a.nav-cta:hover { background: var(--color-primary-dark); color: #fff; }
.main-nav a.nav-locked { color: var(--text-muted); border: 1px dashed var(--border-color); }
.main-nav a.nav-locked:hover { border-color: var(--color-primary); }
.main-nav a.nav-logout { background: var(--violet-100); color: var(--violet-800); }
.nav-sep { width: 1px; height: 26px; background: var(--border-color); margin: 0 6px; }
.lang-pill { display: inline-flex; background: var(--violet-100); border-radius: 999px; padding: 3px; text-decoration: none; }
.lang-pill b { padding: 3px 11px; border-radius: 999px; font-size: 0.78rem; color: var(--violet-800); }
.lang-pill b.on { background: var(--color-primary); color: #fff; }
.user-chip { background: var(--violet-50); color: var(--violet-800); padding: 7px 14px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; border: 1px solid var(--border-color); }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--text-dark); border-radius: 2px; transition: all var(--transition); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero { padding: 70px 0 60px; background: linear-gradient(135deg, var(--violet-50), #fff); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 40px; padding: 0 24px; }
.eyebrow { display: inline-block; color: var(--color-secondary); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 12px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); color: var(--text-dark); }
.hero-text p { font-size: 1.08rem; margin: 18px 0 28px; max-width: 540px; color: var(--text-muted); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-graphic {
  width: 100%; aspect-ratio: 1/1; max-width: 340px; margin: 0 auto; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center; font-size: 8rem; color: #fff;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-graphic img { width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; background: #fff; border-radius: 50%; padding: 6px; }

.guest-notice {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--violet-50); border: 1px solid var(--violet-200); color: var(--violet-800);
  border-radius: var(--radius-md); padding: 14px 20px; margin-bottom: 26px; font-weight: 500; font-size: 0.95rem;
}
.guest-notice span { flex: 1 1 280px; }
.guest-strip { background: var(--violet-50); border-bottom: 1px solid var(--violet-200); }
.guest-strip .guest-notice { margin: 0; border: none; border-radius: 0; background: transparent; max-width: 1180px; margin: 0 auto; padding: 12px 24px; }

.stats-section { padding: 40px 0; background: var(--color-primary); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; padding: 0 24px; }
.stats-grid .stat-card { display: block; background: none; border: none; box-shadow: none; padding: 0; color: #fff; }
.stat-number { display: block; font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; color: #fff; }
.stat-label { font-size: 0.85rem; opacity: 0.9; color: #fff; }

.section { padding: 70px 0; }
.section > .container, .section-alt > .container, .page-hero > .container { padding-left: 24px; padding-right: 24px; }
.section-alt { background: var(--violet-50); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 40px; }
.section-header h2 { margin-bottom: 0.75rem; color: var(--text-dark); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-header p { color: var(--text-muted); }
.section-cta { text-align: center; margin-top: 36px; }
.page-hero { background: var(--color-primary); color: #fff; padding: 60px 0; text-align: center; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); }
.page-hero p { color: rgba(255,255,255,0.85); max-width: 640px; margin: 12px auto 0; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 28px 22px; text-align: center;
  transition: transform var(--transition), box-shadow var(--transition); text-decoration: none; color: inherit; display: block; position: relative;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-card h3 { color: var(--text-dark); font-size: 1.15rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.93rem; }
.feature-icon { font-size: 2.2rem; margin-bottom: 12px; }
.feature-card .lock-tag { position: absolute; top: 12px; right: 12px; background: var(--violet-100); color: var(--violet-700); font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.feature-card .open-tag { position: absolute; top: 12px; right: 12px; background: #e6f6ee; color: #1e8e5a; font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pcard { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); display: flex; flex-direction: column; }
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-image { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, var(--violet-100), var(--violet-200)); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: 6px; font-size: 1.15rem; color: var(--text-dark); }
.card-body p { font-size: 0.92rem; margin-bottom: 14px; color: var(--text-muted); }
.card-body .btn { margin-top: auto; align-self: flex-start; }
.card-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; }
.tag { display: inline-block; align-self: flex-start; background: var(--violet-50); color: var(--color-primary); font-size: 0.75rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.03em; }
.date-badge { position: absolute; top: 12px; right: 12px; background: var(--violet-600); color: #fff; padding: 5px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.pcard.past { opacity: .75; }
.empty-box { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 40px 0; }
.empty-box .empty-icon { font-size: 2.8rem; margin-bottom: 8px; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-box { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 26px 22px; text-align: center; }
.step-box .n { display: inline-flex; width: 42px; height: 42px; border-radius: 50%; background: var(--color-primary); color: #fff; font-weight: 700; align-items: center; justify-content: center; margin-bottom: 12px; font-family: var(--font-heading); }
.step-box h3 { font-size: 1.08rem; color: var(--text-dark); margin-bottom: 6px; }
.step-box p { color: var(--text-muted); font-size: 0.92rem; }
.info-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.info-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 26px; }
.info-card h3 { color: var(--color-primary-dark); margin-bottom: 14px; font-size: 1.2rem; }

.cta-banner { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); padding: 60px 0; }
.cta-banner-inner { text-align: center; color: #fff; padding: 0 24px; }
.cta-banner-inner h2 { color: #fff; margin-bottom: .75rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-banner-inner p { color: rgba(255,255,255,0.85); margin: 10px 0 26px; }
.cta-banner .btn-outline { border-color: #fff; color: #fff; }
.cta-banner .btn-outline:hover { background: #fff; color: var(--color-primary); }

.site-footer { background: #1f1a26; color: #cfc7d8; padding: 60px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 0 24px 40px; }
.footer-brand { color: #fff; margin-bottom: 14px; }
.footer-brand .logo-img { height: 48px; width: 48px; }
.footer-brand .brand-text small { color: #a89bb8; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col p { color: #a89bb8; font-size: 0.9rem; }
.footer-links, .footer-contact { list-style: none; }
.footer-links li, .footer-contact li { margin-bottom: 10px; font-size: 0.9rem; color: #a89bb8; }
.footer-links a { color: #a89bb8; text-decoration: none; }
.footer-links a:hover { color: #fff; }
.admin-link { display: inline-block; font-size: 0.82rem; color: #a89bb8; border: 1px solid #3a3345; padding: 6px 14px; border-radius: 999px; text-decoration: none; margin-top: 6px; }
.admin-link:hover { color: #fff; border-color: #fff; }
.footer-bottom { border-top: 1px solid #3a3345; padding: 20px 0; text-align: center; font-size: 0.82rem; color: #8a8493; }
.back-to-top {
  position: fixed; bottom: 26px; right: 26px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--color-primary); color: #fff; border: none; font-size: 1.2rem; cursor: pointer;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: all var(--transition); z-index: 400;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--color-primary-dark); transform: translateY(-3px); }

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: translateY(0); }

.section .container, .page-hero .container { padding-top: 0; padding-bottom: 0; }
.section .grid, .section .card-grid { margin-bottom: 0; }

@media (max-width: 1280px) {
  .hamburger { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 2px;
    padding: 0 12px; border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow-md); max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  .main-nav.open { max-height: 80vh; overflow-y: auto; padding: 10px 12px 14px; }
  .main-nav > a, .user-chip { padding: 12px 16px; border-radius: var(--radius-sm); }
  .nav-sep { display: none; }
  .lang-pill, .theme-toggle-btn, .notif-wrapper { align-self: flex-start; margin: 4px 16px; }
  .notif-dropdown { left: 0; right: auto; width: min(320px, 86vw); }
}
@media (max-width: 992px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .info-cols { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .feature-grid, .stats-grid, .steps-grid { grid-template-columns: 1fr; }
  .section { padding: 50px 0; }
}
@media (max-width: 560px) {
  .card-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-graphic { font-size: 5.5rem; max-width: 240px; }
}

[data-theme="dark"] body { background: #14111b; }
[data-theme="dark"] .site-header { background: rgba(26,22,37,0.96); border-bottom-color: #362f4a; }
[data-theme="dark"] .brand, [data-theme="dark"] .main-nav > a { color: #e5e0f5; }
[data-theme="dark"] .brand-text small { color: #9c94b3; }
[data-theme="dark"] .main-nav > a:hover, [data-theme="dark"] .main-nav > a.active { background: #2a2438; color: #e3c9f0; }
[data-theme="dark"] .main-nav a.nav-locked { color: #9c94b3; border-color: #4a4066; }
[data-theme="dark"] .main-nav a.nav-logout, [data-theme="dark"] .lang-pill, [data-theme="dark"] .theme-toggle-btn, [data-theme="dark"] .notif-bell-btn { background: #2a2438; color: #e5e0f5; }
[data-theme="dark"] .lang-pill b { color: #cfc9de; }
[data-theme="dark"] .lang-pill b.on { color: #fff; }
[data-theme="dark"] .user-chip { background: #2a2438; color: #e5e0f5; border-color: #362f4a; }
[data-theme="dark"] .hamburger span { background: #e5e0f5; }
[data-theme="dark"] .main-nav { background: #1a1625; border-bottom-color: #362f4a; }
[data-theme="dark"] .hero { background: linear-gradient(135deg, #1d1729, #14111b); }
[data-theme="dark"] .hero h1, [data-theme="dark"] .section-header h2, [data-theme="dark"] .feature-card h3, [data-theme="dark"] .card-body h3, [data-theme="dark"] .step-box h3 { color: #f1ecf9; }
[data-theme="dark"] .hero-text p, [data-theme="dark"] .section-header p, [data-theme="dark"] .feature-card p, [data-theme="dark"] .card-body p, [data-theme="dark"] .step-box p, [data-theme="dark"] .card-meta { color: #a79fbd; }
[data-theme="dark"] .section-alt { background: #191523; }
[data-theme="dark"] .feature-card, [data-theme="dark"] .pcard, [data-theme="dark"] .step-box, [data-theme="dark"] .info-card { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .info-card h3 { color: #e3c9f0; }
[data-theme="dark"] .tag { background: #2a2438; color: #e3c9f0; }
[data-theme="dark"] .guest-notice { background: #2a2438; border-color: #4a3e63; color: #e3c9f0; }
[data-theme="dark"] .btn-outline { color: #e3c9f0; border-color: #b58fcf; }
[data-theme="dark"] .btn-outline:hover { background: var(--color-primary); color: #fff; }
[data-theme="dark"] .btn-primary-inverse { color: var(--color-primary); }
[data-theme="dark"] .hotline-item .hl-num { background: #2a2438; color: #e3c9f0; }
[data-theme="dark"] .site-footer { background: #0f0c15; }


.admin-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; background: var(--violet-100); color: var(--violet-800);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; text-decoration: none; transition: background var(--transition);
}
.icon-btn:hover, .icon-btn.active { background: var(--violet-200); }
.site-header.admin-bar .navbar-inner { max-width: none; }

.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-right .notif-wrapper { position: relative; }
.nav-right .notif-badge { top: -3px; right: -3px; }
.dd { position: relative; }
.dd-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; background: var(--surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 600; overflow: hidden;
}
.dd.open > .dd-menu { display: block; }
.profile-btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--violet-50); border: 1px solid var(--border-color); border-radius: 999px;
  padding: 4px 12px 4px 4px; cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: var(--violet-800);
}
.profile-btn:hover { background: var(--violet-100); }
.profile-btn .caret { font-size: .7rem; opacity: .7; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--color-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-heading); }
.avatar.lg { width: 46px; height: 46px; font-size: 1.2rem; }
.profile-menu { width: 290px; padding: 8px; }
.pm-head { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--violet-50); margin-bottom: 6px; }
.pm-head b { display: block; color: var(--text-dark); line-height: 1.2; }
.pm-head small { color: var(--text-muted); }
.profile-menu > a, .pm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; border: none; background: none;
  color: var(--text-dark); text-decoration: none; font-size: 0.93rem; font-weight: 500; cursor: pointer; font-family: var(--font-body); text-align: left;
}
.profile-menu > a:hover, button.pm-row:hover { background: var(--violet-50); }
.pm-sep { height: 1px; background: var(--border-color); margin: 6px 4px; }
.pm-logout { color: #c0392b !important; font-weight: 600 !important; }
.pm-switch { width: 38px; height: 22px; border-radius: 999px; background: #cfc7d8; position: relative; flex-shrink: 0; transition: background .2s; }
.pm-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
[data-theme="dark"] .pm-switch { background: var(--color-primary); }
[data-theme="dark"] .pm-switch::after { left: 19px; }

.chat-pop { width: 360px; max-width: 92vw; }
.chat-pop-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-color); color: var(--violet-800); }
.chat-pop-head a { text-decoration: none; font-size: 1.1rem; color: var(--text-muted); }
.chat-pop .chat-box { height: 300px; padding: 12px; }
.chat-pop-quick { display: flex; gap: 6px; padding: 8px 12px 0; overflow-x: auto; }
.chat-pop-quick .btn { white-space: nowrap; font-size: .78rem; padding: 5px 12px; }
.chat-pop-form { display: flex; gap: 8px; padding: 10px 12px 12px; }
.chat-pop-form input { flex: 1; padding: 9px 14px; border: 1.5px solid var(--border-color); border-radius: 999px; font-family: inherit; font-size: .92rem; background: var(--surface); color: var(--text-dark); min-width: 0; }
.chat-pop-form input:focus { outline: none; border-color: var(--violet-500); }

[data-theme="dark"] .dd-menu { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .profile-btn, [data-theme="dark"] .icon-btn { background: #2a2438; color: #e5e0f5; border-color: #362f4a; }
[data-theme="dark"] .pm-head { background: #2a2438; }
[data-theme="dark"] .pm-head b, [data-theme="dark"] .profile-menu > a, [data-theme="dark"] .pm-row { color: #e5e0f5; }
[data-theme="dark"] .profile-menu > a:hover, [data-theme="dark"] button.pm-row:hover { background: #2a2438; }
[data-theme="dark"] .pm-sep, [data-theme="dark"] .chat-pop-head { border-color: #362f4a; }
[data-theme="dark"] .chat-pop-head { color: var(--violet-300); }
[data-theme="dark"] .chat-pop-form input { background: #2a2438; border-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .pm-logout { color: #ff8a80 !important; }

@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; box-shadow: none; padding: 6px 0; display: flex; flex-wrap: wrap; }
  .sidebar a { padding: 10px 16px; border-left: none; }
  .layout-admin main > .container, .layout-admin main > .container[style*="margin-left:230px"] { margin-left: 0 !important; }
  .layout-admin .site-footer { margin-left: 0; }
}
@media (max-width: 1280px) {
  .nav-right { margin-left: auto; margin-right: 8px; }
  .profile-btn .pname { display: none; }
  .profile-btn { padding-right: 8px; }
  .main-nav { top: 100%; }
}
@media (max-width: 1280px) { .nav-right { order: 2; } .hamburger { order: 3; } }


html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
.card, .info-card, .pcard, .feature-card, .step-box { min-width: 0; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; border-radius: var(--radius); }
.table-scroll > table.wide { min-width: 560px; }
.sidebar-toggle { display: none; width: 40px; height: 40px; border: none; border-radius: 10px; background: var(--violet-100); color: var(--violet-800); font-size: 1.3rem; cursor: pointer; flex-shrink: 0; }
.sidebar-overlay { display: none; }
input, select, textarea, button { font-size: max(16px, 1rem); }
.btn, .icon-btn, .profile-btn { touch-action: manipulation; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 22px; }
}

@media (max-width: 900px) {
  :root { --header-h: calc(min(var(--logo-size, 56px), 48px) + 21px); }
  .sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    position: fixed; top: var(--header-h); bottom: 0; left: 0; width: min(82vw, 290px); display: block; padding: 10px 0;
    transform: translateX(-105%); transition: transform .25s ease; box-shadow: none; z-index: 700;
  }
  .sidebar.open { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.3); }
  .sidebar a { padding: 14px 22px; border-left: 4px solid transparent; }
  .sidebar-overlay { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: rgba(20,12,28,.5); z-index: 650; }
  body.sidebar-open .sidebar-overlay { display: block; }
  body.sidebar-open { overflow: hidden; }
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .chat-layout { height: auto; min-height: 0; }
  .chat-thread-list { max-height: 210px; }
  .chat-conversation-panel { min-height: 420px; }
  .page-header { align-items: flex-start; }
  .admin-bar .navbar-inner { gap: 10px; }
}

@media (max-width: 768px) {
  html { font-size: 16px !important; }
  .container { padding: 14px; }
  .section .container, .section-alt .container, .page-hero .container, .site-footer .container, .cta-banner .container, .stats-section .container { padding-left: 16px; padding-right: 16px; }
  .hero-inner, .stats-grid, .footer-grid, .cta-banner-inner { padding-left: 16px; padding-right: 16px; }
  .navbar-inner { padding: 10px 14px; gap: 8px; }
  .brand { min-width: 0; gap: 8px; font-size: 1.05rem; flex: 1 1 auto; }
  .brand img.logo-img, .brand .logo-img { height: min(var(--logo-size, 56px), 44px); width: min(var(--logo-size, 56px), 44px); }
  .brand-text { min-width: 0; }
  .brand-text, .brand-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-right { gap: 6px; margin-right: 4px; }
  .icon-btn { width: 38px; height: 38px; }
  .avatar { width: 32px; height: 32px; }

  .dd, .nav-right .notif-wrapper { position: static; }
  .dd-menu, .notif-dropdown { position: absolute; top: 100%; left: 8px; right: 8px; width: auto; max-width: none; margin-top: 6px; max-height: calc(100vh - var(--header-h) - 16px); overflow-y: auto; }
  .profile-menu { left: auto; width: min(300px, calc(100vw - 16px)); }
  .chat-pop { width: auto; }
  .chat-pop .chat-box { height: min(52vh, 360px); }

  .hero { padding: 36px 0 30px; }
  .hero-graphic { max-width: 190px; font-size: 5rem; }
  .section { padding: 44px 0; }
  .section-header { margin-bottom: 26px; }
  .cta-banner { padding: 44px 0; }
  .card { padding: 16px; }
  .post-card, .event-card { padding: 0; }
  .page-header h2 { font-size: 1.35rem; }
  .page-hero { padding: 38px 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 42px; height: 42px; font-size: 1.4rem; }
  .stat-card h2 { font-size: 1.5rem; }
  .hero-banner { padding: 22px 20px; border-radius: 18px; }
  .hero-banner h1 { font-size: 1.45rem; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .quick-tile { padding: 14px 8px; font-size: .9rem; }
  .stepper { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .step { min-width: 92px; }
  .howto, .filter-bar { grid-template-columns: 1fr; }
  th, td { padding: 10px 12px; font-size: .92rem; }
  .auth-wrapper { min-height: auto; padding: 24px 14px; }
  .auth-box { padding: 24px 20px; }
  .btn { min-height: 42px; }
  .form-row { flex-direction: column; gap: 0; }
  .chat-bubble { max-width: 86%; }
  .resident-chat, #chatBox { height: 55vh; }
  .guest-notice { padding: 12px 14px; }
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
  .event-card .ev-body { flex-direction: column; }
  .date-block { flex-wrap: wrap; }
  .inline-form { gap: 6px; }
  .inline-form > * { flex: 1 1 100% !important; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .guest-notice .btn { flex: 1 1 auto; }
  .stats-grid { gap: 18px; }
  .stat-number { font-size: 1.8rem; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .chat-pop-quick { padding-bottom: 2px; }
  .brand-text small { display: none; }
  .notif-dropdown { max-height: 70vh; }
  .btn-sm { padding: 8px 14px; }
}
@media (max-width: 360px) {
  .grid-4 { grid-template-columns: 1fr; }
  .brand-text { font-size: .95rem; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .main-nav.open { max-height: calc(100vh - 70px); overflow-y: auto; }
  .hero { padding: 24px 0; }
}

.summons-calendar-cell { border: 1px solid var(--border-color); height: 84px; vertical-align: top; padding: 4px; font-size: .78rem; width: 14.28%; }
.summons-calendar-cell.today-cell { background: var(--violet-50); }
.summons-calendar-cell.has-booking-cell { background: var(--violet-50); }
.summons-calendar-day-num { font-weight: 700; }
.summons-calendar-day-num.today-num { color: var(--color-primary); }
.summons-booking-badge { background: var(--violet-100); color: var(--violet-800); border-radius: 6px; padding: 1px 5px; margin-top: 2px; font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 768px) {
  .summons-calendar-cell, td[style*="height:70px"] { height: 54px !important; padding: 2px !important; font-size: .7rem !important; }
  .summons-booking-badge { font-size: .6rem; padding: 0 3px; }
  .table-scroll > table:not(.wide) th, .table-scroll > table:not(.wide) td { padding: 4px 2px; font-size: .72rem; }
}

.chat-input-bar input[type="text"], .chat-input-bar form > input { min-width: 0; }
.chat-input-bar form { min-width: 0; }
.chat-thread-item { gap: 8px; min-width: 0; }
.chat-thread-item > div:first-child { min-width: 0; flex: 1; }
.chat-thread-preview { max-width: 100%; }
.chat-thread-meta { max-width: 42%; }
@media (max-width: 768px) {
  .filter-bar { grid-template-columns: 1fr !important; }
  .filter-bar > *, .filter-bar .form-group { grid-column: auto !important; min-width: 0; }
  .filter-bar input, .filter-bar select { width: 100%; min-width: 0; }
  input[type="date"], input[type="time"], input[type="datetime-local"] { min-width: 0; max-width: 100%; }
  .chat-thread-time { white-space: normal; }
}
@media (max-width: 560px) { .layout-user .brand-text { display: none; } }


.filter-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-row .fr-item { flex: 1 1 170px; min-width: 150px; }
.filter-row .fr-name { flex: 2 1 240px; }
.filter-row .fr-btn { flex: 0 0 auto; display: flex; gap: 8px; }
.filter-row label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
.filter-row input, .filter-row select { width: 100%; }

a.stat-link { text-decoration: none; color: inherit; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
a.stat-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
a.stat-link:focus-visible, a.row-link:focus-visible, a.title-link:focus-visible { outline: 3px solid var(--violet-300); outline-offset: 2px; }
a.row-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 8px; margin: 0 -8px; border-bottom: 1px solid var(--gray-light); border-radius: 8px; text-decoration: none; color: inherit; }
a.row-link:hover { background: var(--violet-50); }
a.title-link { text-decoration: none; color: inherit; }
a.title-link:hover { color: var(--color-primary); }
[data-theme="dark"] a.row-link:hover { background: #2a2438; }

.filter-row input[type="text"], .filter-row input[type="date"], .filter-row select, .select-round {
  border-radius: 999px; padding: 11px 18px; border: 1.5px solid var(--border-color); background: var(--surface); color: var(--text-dark);
}
.filter-row input[type="text"] { padding-left: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239a8fb0' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 16px center; }
.filter-row input:focus, .filter-row select:focus, .select-round:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(123,45,142,.15); }
.filter-row .btn { border-radius: 999px; }

[data-theme="dark"] .howto .ht { background: #2a2438; border: 1px solid #362f4a; color: #e5e0f5; }
[data-theme="dark"] .howto .ht strong { color: #f0eaff; }
[data-theme="dark"] .howto .ht small { color: #b8b0cc; }
[data-theme="dark"] .quick-tile { background: #2a2438; border-color: #362f4a; color: #e3c9f0; }
[data-theme="dark"] .quick-tile.primary { background: linear-gradient(135deg, var(--violet-600), var(--violet-800)); color: #fff; }
[data-theme="dark"] .tip-card { background: #2a2438; border-color: #362f4a; border-left-color: var(--violet-400); }
[data-theme="dark"] .tip-card h4 { color: #e3c9f0; }
[data-theme="dark"] .tip-card p { color: #b8b0cc; }
[data-theme="dark"] .date-block .db-date { background: #3a2f52; color: #e3c9f0; }
[data-theme="dark"] .emergency-strip { background: #3a1c27; border-color: #7a2b43; color: #fecdd3; }
[data-theme="dark"] details.faq-item summary { color: #e3c9f0; }
[data-theme="dark"] .action-chip { background: #12372c; color: #a7f3d0; }


.site-footer.footer-mini { padding: 8px 0 0; margin-top: 16px; }
.footer-mini-in { display: flex; align-items: center; justify-content: center; gap: 6px 22px; flex-wrap: wrap; padding-top: 0; padding-bottom: 0; }
.footer-mini .logo-img { height: 34px; width: 34px; border-radius: 8px; background: #fff; padding: 2px; object-fit: contain; }
.footer-mini .logo-fallback { display: inline-flex; align-items: center; justify-content: center; color: var(--violet-800); font-size: 1.6rem; }
.footer-nums { display: flex; gap: 6px 10px; flex-wrap: wrap; justify-content: center; }
.footer-nums .fn { display: flex; flex-direction: column; align-items: center; text-decoration: none; background: #2b2535; padding: 3px 12px; border-radius: 8px; color: #fff; line-height: 1.25; }
.footer-nums .fn small { color: #a89bb8; font-size: .66rem; }
.footer-nums .fn b { font-size: .88rem; letter-spacing: .3px; }
.footer-nums .fn:hover { background: #3a3345; }
.footer-mini .footer-bottom { margin-top: 6px !important; padding: 8px 0; border-top-color: #2f2840; }
.site-footer.footer-admin { padding: 0; margin-top: 12px; }
.site-footer.footer-admin .footer-bottom { margin: 0 !important; padding: 10px 0; border-top: 1px solid #3a3345; }

.ev-carousel { position: relative; overflow: hidden; border-radius: 20px; margin-bottom: 22px; box-shadow: var(--shadow-lg); background: var(--violet-900); }
.ev-track { display: flex; will-change: transform; }
.ev-slide { flex: 0 0 100%; position: relative; display: block; height: 280px; text-decoration: none; color: #fff; }
.ev-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-slide.noimg { background: linear-gradient(135deg, var(--violet-700), var(--violet-900)); }
.ev-slide.noimg::after { content: '🎉'; position: absolute; right: 28px; top: 20px; font-size: 4.5rem; opacity: .25; }
.ev-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 64px 64px 30px; background: linear-gradient(to top, rgba(20,10,30,.88), rgba(20,10,30,0)); }
.ev-badge { display: inline-block; background: rgba(255,255,255,.2); backdrop-filter: blur(4px); padding: 4px 14px; border-radius: 999px; font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.ev-overlay h2 { font-size: 1.65rem; margin: 0 0 6px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.ev-overlay p { margin: 0; opacity: .95; font-size: .95rem; }
.ev-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.85); color: var(--violet-800); font-size: 1.6rem; line-height: 1; display: flex; align-items: center; justify-content: center; z-index: 2; }
.ev-nav:hover { background: #fff; }
.ev-nav.prev { left: 12px; } .ev-nav.next { right: 12px; }
.ev-dots { position: absolute; right: 22px; bottom: 16px; display: flex; gap: 7px; z-index: 2; }
.ev-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,.5); }
.ev-dots button.on { background: #fff; width: 24px; border-radius: 999px; }
@media (max-width: 700px) {
  .ev-slide { height: 220px; }
  .ev-overlay { padding: 44px 18px 34px; }
  .ev-overlay h2 { font-size: 1.2rem; }
  .ev-overlay p { font-size: .82rem; }
  .ev-nav { display: none; }
  .ev-dots { right: 50%; transform: translateX(50%); bottom: 12px; }
}


.table-scroll > table.sticky-first { overflow: visible; min-width: 820px; border-collapse: separate; border-spacing: 0; }
.table-scroll > table.sticky-first th:first-child,
.table-scroll > table.sticky-first td:first-child {
  position: sticky; left: 0; z-index: 2; background: #fff;
  box-shadow: 2px 0 0 var(--border-color), 6px 0 10px -6px rgba(43,39,52,.18);
}
.table-scroll > table.sticky-first th:first-child { background: var(--violet-50); z-index: 3; }
[data-theme="dark"] .table-scroll > table.sticky-first td:first-child { background: #211c30; box-shadow: 2px 0 0 #362f4a, 6px 0 10px -6px rgba(0,0,0,.5); }
[data-theme="dark"] .table-scroll > table.sticky-first th:first-child { background: #2a2438; }
.table-scroll > table.sticky-first th:first-child, .table-scroll > table.sticky-first td:first-child { min-width: 130px; }
@media (max-width: 768px) {
  .table-scroll > table.sticky-first th, .table-scroll > table.sticky-first td { padding: 8px 10px !important; font-size: .82rem !important; }
  .table-scroll > table.sticky-first th:first-child, .table-scroll > table.sticky-first td:first-child { min-width: 100px; max-width: 120px; }
}

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.video-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16/9; background: #14111b; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-body { padding: 14px 18px 18px; }
.video-body h3 { font-size: 1.05rem; color: var(--violet-800); margin: 4px 0 6px; }
.video-body p { color: var(--text-muted); font-size: .92rem; }
.video-meta { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--violet-600); }
.video-player-wrap { max-width: 900px; }
.video-player-wrap .video-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
[data-theme="dark"] .video-body h3 { color: #e3c9f0; }
.vid-source { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.vid-source label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; cursor: pointer; }
.vid-source input { width: auto; }

html, body { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main#main-content { flex: 1 0 auto; width: 100%; }
body > .site-footer { flex-shrink: 0; margin-top: auto; }
.layout-admin .site-footer.footer-admin { margin-top: auto; }


.site-footer.footer-mini { background: linear-gradient(180deg, var(--violet-900), #2f0f3a); padding: 18px 0 0; margin-top: 28px; }
.site-footer.footer-mini .footer-mini-in { display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap; padding-top: 0; padding-bottom: 14px; }
.footer-brandline { display: flex; align-items: center; gap: 12px; min-width: 0; }
.footer-brandtext { display: flex; flex-direction: column; line-height: 1.25; }
.footer-brandtext b { color: #fff; font-family: var(--font-heading); font-size: 1rem; letter-spacing: .02em; }
.footer-brandtext small { color: #cdb6dc; font-size: .78rem; }
.footer-mini .logo-img { height: 42px; width: 42px; border-radius: 10px; background: #fff; padding: 3px; object-fit: contain; }
.footer-mini .footer-nums { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.footer-mini .footer-nums .fn { align-items: flex-start; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: 6px 14px; border-radius: 10px; transition: background .2s; }
.footer-mini .footer-nums .fn:hover { background: rgba(255,255,255,.16); }
.footer-mini .footer-nums .fn small { color: #cdb6dc; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-mini .footer-nums .fn b { color: #fff; font-size: .95rem; font-weight: 600; }
.footer-mini .footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin: 0 !important; padding: 10px 0; color: #b69cc6; text-align: center; font-size: .78rem; }
.footer-mini .footer-bottom p { margin: 0; }
[data-theme="dark"] .site-footer.footer-mini { background: #120d1b; }
@media (max-width: 640px) {
  .site-footer.footer-mini .footer-mini-in { flex-direction: column; align-items: stretch; text-align: center; }
  .footer-brandline { justify-content: center; }
  .footer-mini .footer-nums { justify-content: center; }
  .footer-mini .footer-nums .fn { align-items: center; flex: 1 1 140px; }
}

.site-footer.footer-mini { background: #f5eefa; border-top: 1px solid #e6d6f0; color: #4a3a58; }
.footer-brandtext b { color: #4b1d5c; }
.footer-brandtext small { color: #7d6a8c; }
.footer-mini .logo-img { background: #fff; box-shadow: 0 1px 4px rgba(92,31,107,.15); }
.footer-mini .footer-nums .fn { background: #fff; border: 1px solid #e6d6f0; box-shadow: 0 1px 3px rgba(92,31,107,.06); }
.footer-mini .footer-nums .fn:hover { background: #fbf7fd; border-color: #d2a8e4; }
.footer-mini .footer-nums .fn small { color: #8a779a; }
.footer-mini .footer-nums .fn b { color: #54306b; }
.footer-mini .footer-bottom { border-top: 1px solid #e6d6f0; color: #8a779a; background: transparent; }
.site-footer.footer-admin { background: #f5eefa; border-top: 1px solid #e6d6f0; }
.site-footer.footer-admin .footer-bottom { border-top: none; color: #8a779a; }
[data-theme="dark"] .site-footer.footer-mini, [data-theme="dark"] .site-footer.footer-admin { background: #1b1527; border-top-color: #362f4a; }
[data-theme="dark"] .footer-brandtext b { color: #ead9f2; }
[data-theme="dark"] .footer-brandtext small, [data-theme="dark"] .footer-mini .footer-nums .fn small, [data-theme="dark"] .footer-mini .footer-bottom, [data-theme="dark"] .site-footer.footer-admin .footer-bottom { color: #a89bb8; }
[data-theme="dark"] .footer-mini .footer-nums .fn { background: #251e33; border-color: #362f4a; box-shadow: none; }
[data-theme="dark"] .footer-mini .footer-nums .fn b { color: #e3c9f0; }
[data-theme="dark"] .footer-mini .footer-bottom { border-top-color: #362f4a; }


.stats-section { background: linear-gradient(135deg, var(--violet-600), var(--violet-700)); }
.page-hero { background: linear-gradient(135deg, var(--violet-600), var(--violet-700)); }
.cta-banner { background: linear-gradient(135deg, var(--violet-600), var(--violet-800)); }
.hero { background: linear-gradient(135deg, #f6f0fa, #fdfcfe); }
.hero-graphic { background: linear-gradient(135deg, var(--violet-500), var(--violet-300)); }
.sidebar { background: linear-gradient(180deg, #5e3578, #4a2a60); }
.sidebar a { color: #eadcf3; }
.sidebar a.active { background: rgba(255,255,255,.13); border-left-color: #d9bfe9; }
.btn-primary { box-shadow: 0 2px 6px rgba(122,75,153,.22); }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(122,75,153,.28); }
.card { border-color: #ece4f1; }
th { background: #f6f0fa; color: var(--violet-800); }
tbody tr:hover { background: #fbf8fd; }
.quick-tile.primary { background: linear-gradient(135deg, var(--violet-600), var(--violet-700)); }
.hero-banner { background: linear-gradient(135deg, var(--violet-600), var(--violet-700)); }
.badge-submitted { background: #e3edfb; color: #2f4f94; }
.badge-resolved, .badge-completed, .badge-published { background: #dff3e8; color: #1f6b4a; }
.badge-cancelled { background: #fbe4e4; color: #9b3030; }
.emergency-strip a { background: #c9506b; }
.emergency-strip { background: #fdf1f3; border-color: #f4d3da; color: #8f3348; }
.alert-error { background: #fbe9e9; color: #8f2f2f; border-color: #f3cccc; }
.alert-success { background: #e4f4ec; color: #1f6b4a; border-color: #c4e5d4; }

.auth-slide-wrap { display: flex; justify-content: center; align-items: center; padding: 32px 16px; min-height: calc(100vh - 230px); }
.auth-slide { position: relative; overflow: hidden; width: 900px; max-width: 100%; min-height: 640px; background: #fff; border-radius: 32px; box-shadow: 0 18px 50px rgba(63,35,82,.18); }
.as-form { position: absolute; top: 0; height: 100%; width: 50%; transition: all .6s ease-in-out; }
.as-form form { background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 0 44px; text-align: center; }
.as-form h2 { color: var(--violet-800); font-size: 1.7rem; margin-bottom: 4px; }
.as-sub { font-size: .82rem; color: var(--text-muted); margin-bottom: 14px; }
.as-logo { width: 54px; height: 54px; object-fit: contain; border-radius: 12px; margin-bottom: 10px; }
.as-form input { background: #f3eff6; border: 1px solid transparent; border-radius: 12px; padding: 12px 16px; margin: 7px 0; width: 100%; font-family: inherit; font-size: .92rem; color: var(--text-dark); outline: none; transition: border-color .2s, background .2s; }
.as-form input:focus { background: #fff; border-color: var(--violet-400); box-shadow: 0 0 0 3px rgba(122,75,153,.12); }
.as-btn { margin-top: 14px; border: none; border-radius: 12px; background: var(--violet-700); color: #fff; font-family: inherit; font-size: .82rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 12px 46px; cursor: pointer; transition: transform .15s, background .2s; }
.as-btn:hover { background: var(--violet-800); } .as-btn:active { transform: scale(.96); }
.as-mobile-switch { display: none; margin-top: 14px; font-size: .92rem; color: var(--text-muted); }
.as-mobile-switch a { color: var(--violet-700); font-weight: 600; }

.as-login { left: 0; z-index: 2; }
.as-register { left: 0; opacity: 0; z-index: 1; }
.auth-slide.right-panel-active .as-login { transform: translateX(100%); }
.auth-slide.right-panel-active .as-register { transform: translateX(100%); opacity: 1; z-index: 5; animation: asShow .6s; }
@keyframes asShow { 0%, 49.99% { opacity: 0; z-index: 1; } 50%, 100% { opacity: 1; z-index: 5; } }

.as-overlay-container { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; overflow: hidden; transition: transform .6s ease-in-out; z-index: 100; }
.auth-slide.right-panel-active .as-overlay-container { transform: translateX(-100%); }
.as-overlay { position: relative; left: -100%; height: 100%; width: 200%; color: #fff; background: linear-gradient(135deg, #7a4b99, #4a2a60); transform: translateX(0); transition: transform .6s ease-in-out; }
.auth-slide.right-panel-active .as-overlay { transform: translateX(50%); }
.as-ov-panel { position: absolute; top: 0; height: 100%; width: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 40px; transition: transform .6s ease-in-out; }
.as-ov-panel h2 { font-size: 1.7rem; margin-bottom: 12px; }
.as-ov-panel p { font-size: .92rem; line-height: 1.6; margin-bottom: 22px; color: #f1e6f8; }
.as-ov-left { transform: translateX(-20%); }
.auth-slide.right-panel-active .as-ov-left { transform: translateX(0); }
.as-ov-right { right: 0; transform: translateX(0); }
.auth-slide.right-panel-active .as-ov-right { transform: translateX(20%); }
.as-ghost { background: transparent; border: 2px solid #fff; color: #fff; border-radius: 12px; padding: 10px 40px; font-family: inherit; font-size: .8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.as-ghost:hover { background: #fff; color: var(--violet-800); } .as-ghost:active { transform: scale(.96); }

[data-theme="dark"] .auth-slide, [data-theme="dark"] .as-form form { background: #211c30; }
[data-theme="dark"] .as-form h2 { color: #e6d0f0; }
[data-theme="dark"] .as-form input { background: #2a2438; color: #e5e0f5; }
[data-theme="dark"] .as-form input:focus { background: #332a4d; }

@media (max-width: 760px) {
  .auth-slide-wrap { padding: 18px 12px; min-height: auto; }
  .auth-slide { min-height: 0; border-radius: 22px; }
  .as-overlay-container { display: none; }
  .as-form { position: static; width: 100%; height: auto; transform: none !important; opacity: 1; animation: none !important; display: none; }
  .as-form form { padding: 30px 22px; }
  .auth-slide:not(.right-panel-active) .as-login { display: block; }
  .auth-slide.right-panel-active .as-register { display: block; }
  .as-mobile-switch { display: block; }
}


.as-form form { position: relative; overflow: hidden; }
.as-form form::before { content: ''; position: absolute; inset: 0; background: var(--as-logo, none) center / 78% no-repeat; opacity: .24; pointer-events: none; }
.as-form form > * { position: relative; z-index: 1; }
.as-pass { position: relative; width: 100%; }
.as-pass input { padding-right: 46px; }
.as-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: none; background: transparent; color: #8a779a; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 8px; padding: 0; }
.as-eye:hover { color: var(--violet-700); background: rgba(122,75,153,.08); }
.as-eye .eye-off { display: none; }
.as-pass.shown .eye-on { display: none; }
.as-pass.shown .eye-off { display: block; }
[data-theme="dark"] .as-eye { color: #a89bb8; }
.as-form input { background: rgba(243,239,246,.72); }
.as-form input:focus { background: rgba(255,255,255,.9); }
[data-theme="dark"] .as-form input { background: rgba(42,36,56,.8); }

[data-theme="dark"] .as-form form::before {
  inset: auto; top: 50%; left: 50%; width: 74%; aspect-ratio: 1; height: auto; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--as-logo, none) center / 100% no-repeat, #fff; opacity: .13;
}
[data-theme="dark"] .as-sub { color: #b9aecb; }
[data-theme="dark"] .as-form input { background: rgba(42,36,56,.82); color: #f0eaf7; border-color: #3d3452; }
[data-theme="dark"] .as-form input::placeholder { color: #a89bb8; }
[data-theme="dark"] .as-form input:focus { background: rgba(51,42,77,.95); border-color: var(--violet-400); }
[data-theme="dark"] .as-btn { background: var(--violet-500); }
[data-theme="dark"] .as-btn:hover { background: var(--violet-400); }
[data-theme="dark"] .as-overlay { background: linear-gradient(135deg, #5a3a78, #2e1a40); }
[data-theme="dark"] .as-mobile-switch { color: #b9aecb; }
[data-theme="dark"] .as-mobile-switch a { color: #d9bfe9; }


.as-overlay {
  background:
    radial-gradient(circle at 12% 18%, rgba(214,170,240,.85) 0, transparent 34%),
    radial-gradient(circle at 38% 82%, rgba(150,95,200,.9) 0, transparent 38%),
    radial-gradient(circle at 62% 14%, rgba(236,176,222,.7) 0, transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(190,140,235,.85) 0, transparent 36%),
    linear-gradient(135deg, #7a4b99, #4a2a60);
}
.as-glass {
  width: 100%; max-width: 330px; padding: 34px 28px; border-radius: 26px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.34);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 34px rgba(40,15,60,.28), inset 0 1px 0 rgba(255,255,255,.35);
  display: flex; flex-direction: column; align-items: center;
}
.as-glass h2 { text-shadow: 0 1px 8px rgba(40,15,60,.25); }
.as-glass p { color: #fbf4ff; margin-bottom: 20px; }
.as-glass .as-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.75); }
.as-glass .as-ghost:hover { background: #fff; }
[data-theme="dark"] .as-overlay {
  background:
    radial-gradient(circle at 12% 18%, rgba(160,105,210,.7) 0, transparent 34%),
    radial-gradient(circle at 38% 82%, rgba(110,60,160,.85) 0, transparent 38%),
    radial-gradient(circle at 62% 14%, rgba(170,100,170,.5) 0, transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(130,85,190,.75) 0, transparent 36%),
    linear-gradient(135deg, #4b2f66, #22122f);
}
[data-theme="dark"] .as-glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); }

html:not([data-theme="dark"]) .as-form h2 { color: #1c1226; }
html:not([data-theme="dark"]) .as-sub { color: #2e2638; font-weight: 500; }
html:not([data-theme="dark"]) .as-form input { color: #14101a; font-weight: 500; background: rgba(240,235,246,.8); border-color: #d9cfe3; }
html:not([data-theme="dark"]) .as-form input::placeholder { color: #4a4157; opacity: 1; }
html:not([data-theme="dark"]) .as-eye { color: #3a2f48; }
html:not([data-theme="dark"]) .as-mobile-switch { color: #2e2638; }
html:not([data-theme="dark"]) .as-mobile-switch a { color: #4a2a60; }

.hero-graphic { position: relative; overflow: visible; isolation: isolate; }
.hero-graphic::before,
.hero-graphic::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 200deg, var(--violet-600) 280deg, var(--violet-800) 335deg, var(--violet-600) 350deg, transparent 360deg);
  animation: grace-ring-spin 3.2s linear infinite;
}
.hero-graphic::before { z-index: 0; }
.hero-graphic::after { z-index: -1; inset: -8px; filter: blur(14px); opacity: 0.85; }
.hero-graphic img { position: relative; z-index: 1; }
@keyframes grace-ring-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero-graphic::before, .hero-graphic::after { animation: none; }
}

.stat-card.stat-plain { display: block; border-top: 4px solid var(--violet-400); }
.stat-card.stat-plain p { margin: 0 0 6px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-card.stat-plain h2 { font-size: 2rem; }

.status-flow-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.status-flow-head small { color: var(--text-muted); font-size: 0.9rem; }

.status-flow { display: flex; align-items: stretch; gap: 0; }

.sf-step {
  --sf-color: var(--violet-500);
  --sf-soft: var(--violet-50);
  position: relative;
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 22px 18px; border-radius: 12px;
  background: var(--sf-soft);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--sf-color);
  text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sf-step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sf-step:focus-visible { outline: 3px solid var(--violet-300); outline-offset: 2px; }

.sf-received   { --sf-color: #2563eb; --sf-soft: #eff5ff; }
.sf-processing { --sf-color: #d97706; --sf-soft: #fff8eb; }
.sf-completed  { --sf-color: #059669; --sf-soft: #ecfdf5; }

.sf-label { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--sf-color); }

.sf-notif {
  position: absolute; top: -10px; right: -10px;
  min-width: 24px; height: 24px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ef4444; color: #fff; font-size: 0.8rem; font-weight: 700;
  border-radius: 999px; border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
  animation: sf-pulse 1.8s infinite;
}
@keyframes sf-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@media (prefers-reduced-motion: reduce) { .sf-notif { animation: none; } }

.sf-arrow { width: 34px; flex-shrink: 0; position: relative; }
.sf-arrow::before {
  content: ''; position: absolute; top: 50%; left: 6px; right: 12px; height: 2px;
  background: var(--violet-300); transform: translateY(-50%);
}
.sf-arrow::after {
  content: ''; position: absolute; top: 50%; right: 8px; width: 9px; height: 9px;
  border-top: 2px solid var(--violet-300); border-right: 2px solid var(--violet-300);
  transform: translateY(-50%) rotate(45deg);
}

.badge-received   { background: #dbeafe; color: #1e40af; }
.badge-processing { background: #fdf2d0; color: #7a4a05; }
.badge-completed  { background: #d1fae5; color: #065f46; }

@media (max-width: 768px) {
  .status-flow { flex-direction: column; }
  .sf-arrow { width: auto; height: 30px; }
  .sf-arrow::before { top: 4px; bottom: 10px; left: 50%; right: auto; width: 2px; height: auto; transform: translateX(-50%); }
  .sf-arrow::after { top: auto; bottom: 8px; right: auto; left: 50%; transform: translateX(-50%) rotate(135deg); }
}

[data-theme="dark"] .sf-step { background: #2a2438; border-color: #362f4a; border-top-color: var(--sf-color); }
[data-theme="dark"] .status-flow-head small { color: #9c94b3; }
[data-theme="dark"] .sf-notif { border-color: #211c30; }
[data-theme="dark"] .sf-received   { --sf-color: #60a5fa; }
[data-theme="dark"] .sf-processing { --sf-color: #fbbf24; }
[data-theme="dark"] .sf-completed  { --sf-color: #34d399; }


.rpt-card { padding: 0; overflow: hidden; }

.rpt-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--border-color); overflow-x: auto; }
.rpt-tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none; border-bottom: 3px solid transparent;
  padding: 16px 14px 13px; margin-bottom: -1px;
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; white-space: nowrap; transition: color .15s ease, border-color .15s ease;
}
.rpt-tab:hover { color: var(--text-dark); }
.rpt-tab.active { color: var(--violet-800); border-bottom-color: var(--color-primary); }
.rpt-tab:focus-visible { outline: 2px solid var(--violet-300); outline-offset: -2px; border-radius: 6px; }
.rpt-tab-count {
  min-width: 24px; padding: 1px 8px; border-radius: 999px;
  background: var(--gray-light); color: var(--text-muted); font-size: 0.8rem; font-weight: 700; text-align: center;
}
.rpt-tab.active .rpt-tab-count { background: var(--violet-100); color: var(--violet-800); }

.rpt-tab-received,   .rpt-status-received   { --st: #2563eb; --st-bg: #eff5ff; }
.rpt-tab-processing, .rpt-status-processing { --st: #d97706; --st-bg: #fff8eb; }
.rpt-tab-completed,  .rpt-status-completed  { --st: #059669; --st-bg: #ecfdf5; }
.rpt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--violet-400)); flex-shrink: 0; }

.rpt-toolbar { display: flex; gap: 10px; padding: 16px 20px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--border-color); }
.rpt-input {
  height: 40px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px;
  font-family: inherit; font-size: 0.92rem; color: var(--text-dark); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.rpt-input:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }
.rpt-search {
  flex: 1 1 260px; min-width: 0; padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239a8fb0' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center;
}
select.rpt-input { flex: 0 1 200px; }
input[type="date"].rpt-input { flex: 0 1 170px; }
.rpt-reset { background: none; border: none; color: var(--color-primary); font-weight: 600; font-size: 0.9rem; cursor: pointer; padding: 8px 6px; }
.rpt-reset:hover { text-decoration: underline; }

.rpt-table-wrap { overflow-x: auto; }
.rpt-table { width: 100%; min-width: 680px; border-collapse: collapse; box-shadow: none; border-radius: 0; background: transparent; }
.rpt-table th {
  background: var(--violet-50); color: var(--text-muted);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 11px 20px; border-bottom: 1px solid var(--border-color);
}
.rpt-table td { padding: 14px 20px; font-size: 0.95rem; border-bottom: 1px solid var(--gray-light); vertical-align: middle; }
.rpt-table tbody tr:last-child td { border-bottom: none; }
.rpt-table tbody tr:hover { background: var(--violet-50); }
.rpt-time { display: block; font-size: 0.8rem; color: var(--text-muted); }
.rpt-name { font-weight: 600; color: var(--text-dark); }
.rpt-col-action { text-align: right; width: 1%; white-space: nowrap; }
.rpt-empty td { text-align: center; color: var(--text-muted); padding: 40px 20px; }

.rpt-status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px 4px 10px; border-radius: 999px;
  background: var(--st-bg); color: var(--st); font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}
.rpt-view {
  display: inline-block; padding: 6px 16px; border-radius: 8px;
  border: 1px solid var(--border-color); color: var(--violet-800); background: #fff;
  font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: all .15s ease;
}
.rpt-view:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

@media (max-width: 768px) {
  .rpt-tabs, .rpt-toolbar { padding-left: 14px; padding-right: 14px; }
  select.rpt-input, input[type="date"].rpt-input { flex: 1 1 140px; }
  .rpt-table th, .rpt-table td { padding: 11px 14px; }
}

[data-theme="dark"] .rpt-tabs, [data-theme="dark"] .rpt-toolbar { border-color: #362f4a; }
[data-theme="dark"] .rpt-tab:hover { color: #e5e0f5; }
[data-theme="dark"] .rpt-tab.active { color: var(--violet-300); border-bottom-color: var(--violet-400); }
[data-theme="dark"] .rpt-tab-count { background: #2a2438; color: #9c94b3; }
[data-theme="dark"] .rpt-tab.active .rpt-tab-count { background: #362f4a; color: #ddd6fe; }
[data-theme="dark"] .rpt-input { background: #2a2438; border-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .rpt-input:focus { box-shadow: 0 0 0 3px #362f4a; }
[data-theme="dark"] .rpt-table th { background: #2a2438; color: #9c94b3; border-color: #362f4a; }
[data-theme="dark"] .rpt-table td { border-color: #362f4a; }
[data-theme="dark"] .rpt-table tbody tr:hover { background: #2a2438; }
[data-theme="dark"] .rpt-name { color: #e5e0f5; }
[data-theme="dark"] .rpt-view { background: transparent; border-color: #362f4a; color: #ddd6fe; }
[data-theme="dark"] .rpt-status-received   { --st: #60a5fa; --st-bg: rgba(96,165,250,.12); }
[data-theme="dark"] .rpt-status-processing { --st: #fbbf24; --st-bg: rgba(251,191,36,.12); }
[data-theme="dark"] .rpt-status-completed  { --st: #34d399; --st-bg: rgba(52,211,153,.12); }


.rv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.rv-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.rv-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border-color); }
.rv-card-head h3, .rv-title { color: var(--violet-800); font-size: 1.1rem; margin: 0 0 10px; }
.rv-card-head h3 { margin: 0; }
.rv-status-form { display: flex; align-items: center; gap: 8px; }
.rv-status-form label { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }
.rv-status-form select { height: 36px; padding: 0 10px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 0.9rem; background: #fff; color: var(--text-dark); }
.rv-details { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; margin: 0 0 18px; }
.rv-details dt { color: var(--text-muted); font-size: 0.88rem; font-weight: 600; }
.rv-details dd { margin: 0; color: var(--text-dark); }
.rv-desc { background: var(--violet-50); border: 1px solid var(--border-color); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.rv-desc h4 { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.rv-desc p { margin: 0; white-space: normal; }
@media (max-width: 900px) {
  .rv-grid { grid-template-columns: 1fr; }
  .rv-details { grid-template-columns: 1fr; gap: 2px; }
  .rv-details dd { margin-bottom: 8px; }
}
[data-theme="dark"] .rv-card-head { border-bottom-color: #362f4a; }
[data-theme="dark"] .rv-card-head h3, [data-theme="dark"] .rv-title { color: var(--violet-300); }
[data-theme="dark"] .rv-details dd { color: #e5e0f5; }
[data-theme="dark"] .rv-details dt, [data-theme="dark"] .rv-desc h4 { color: #9c94b3; }
[data-theme="dark"] .rv-desc { background: #2a2438; border-color: #362f4a; }
[data-theme="dark"] .rv-status-form select { background: #2a2438; border-color: #362f4a; color: #e5e0f5; }


.sidebar { background: #2b1d38; padding: 18px 12px 24px; box-shadow: none; border-right: 1px solid rgba(255,255,255,0.06); }
.sb-group + .sb-group { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.07); }
.sb-label { color: #9d8bb0; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 12px; margin-bottom: 6px; }
.sidebar a.sb-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin: 2px 0; border-radius: 8px; border-left: none;
  color: #d6cbe2; font-size: 0.92rem; font-weight: 500; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.sidebar a.sb-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar a.sb-link.active { background: rgba(255,255,255,0.12); color: #fff; box-shadow: inset 3px 0 0 #c9a6e3; }
.sidebar a.sb-link:focus-visible { outline: 2px solid #c9a6e3; outline-offset: 1px; }
.sb-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.sidebar a.sb-link.active .sb-icon { opacity: 1; }

.rv-proof-box, .rv-proof-done { border: 1px dashed var(--violet-300); background: var(--violet-50); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.rv-proof-done { border-style: solid; border-color: var(--border-color); background: #fff; }
.rv-proof-box input[type="file"] { margin-top: 10px; font-family: inherit; font-size: 0.9rem; }
.rv-proof-title { font-weight: 700; color: var(--violet-800); margin: 0 0 4px; }
.rv-proof-preview { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; border: 1px solid var(--border-color); margin-top: 10px; }
.rv-proof-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
[data-theme="dark"] .rv-proof-box { background: #2a2438; border-color: #453c5c; }
[data-theme="dark"] .rv-proof-done { background: transparent; border-color: #362f4a; }
[data-theme="dark"] .rv-proof-title { color: var(--violet-300); }

.hs-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border-color); display: block; }
button.rpt-view { cursor: pointer; font-family: inherit; margin-left: 6px; }
.rpt-col-action .rpt-view + .rpt-view { margin-left: 6px; }


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.dm-nav { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.dm-nav a { padding: 7px 16px; border-radius: 8px; border: 1px solid var(--border-color); background: #fff; color: var(--text-muted); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.dm-nav a:hover { color: var(--violet-800); border-color: var(--violet-300); }

.dm-card { padding: 0; margin-bottom: 20px; scroll-margin-top: calc(var(--header-h, 85px) + 16px); }
.dm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border-color); }
.dm-head h3 { color: var(--violet-800); font-size: 1.08rem; margin: 0 0 2px; }
.dm-head p { color: var(--text-muted); font-size: 0.88rem; margin: 0; }
.dm-card > .dm-toggle-grid, .dm-card > .form-row, .dm-card > .form-group, .dm-card > .dm-subhead { margin-left: 22px; margin-right: 22px; }
.dm-subhead { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.dm-divider { height: 1px; background: var(--border-color); margin: 6px 0 18px; }
.dm-foot { display: flex; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border-color); background: var(--violet-50); margin-top: 6px; }

.dm-toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 18px; margin-bottom: 18px; }
.dm-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.dm-toggle:hover { border-color: var(--violet-300); }
.dm-toggle-text { display: flex; flex-direction: column; min-width: 0; }
.dm-toggle-text strong { font-size: 0.93rem; color: var(--text-dark); font-weight: 600; }
.dm-toggle-text small { font-size: 0.8rem; color: var(--text-muted); }
.dm-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.dm-switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #d4cddb; flex-shrink: 0; transition: background .15s ease; }
.dm-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s ease; }
.dm-toggle input:checked ~ .dm-switch { background: var(--color-primary); }
.dm-toggle input:checked ~ .dm-switch::after { transform: translateX(16px); }
.dm-toggle input:focus-visible ~ .dm-switch { outline: 2px solid var(--violet-300); outline-offset: 2px; }
.dm-toggle:has(input:checked) { background: var(--violet-50); border-color: var(--violet-200); }

.dm-list { padding: 8px 22px 18px; }
.dm-row { display: grid; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--gray-light); }
.dm-row-hotline { grid-template-columns: 1.4fr 1fr 1.8fr 70px 56px auto; }
.dm-row-tip { grid-template-columns: 1.3fr 2.4fr 70px 56px auto; }
.dm-row-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 8px 0; }
.dm-row input[type="text"], .dm-row input[type="number"], .dm-row textarea {
  width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px;
  font-family: inherit; font-size: 0.9rem; color: var(--text-dark); background: #fff; resize: vertical;
}
.dm-row input:focus, .dm-row textarea:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }
.dm-check { display: flex; justify-content: center; }
.dm-check input { width: 18px; height: 18px; accent-color: var(--color-primary); }
.dm-row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.dm-btn { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border-color); background: #fff; color: var(--violet-800); font-family: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.dm-btn:hover { border-color: var(--violet-400); background: var(--violet-50); }
.dm-btn-danger { color: #b42318; }
.dm-btn-danger:hover { background: #fef3f2; border-color: #fda29b; }
.dm-btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.dm-btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.dm-row-new { border-bottom: none; margin-top: 8px; padding: 12px; background: var(--violet-50); border-radius: 10px; }

@media (max-width: 1000px) {
  .dm-row-head { display: none; }
  .dm-row-hotline, .dm-row-tip { grid-template-columns: 1fr 1fr; }
  .dm-row-hotline input[name="description"], .dm-row-tip textarea, .dm-row-tip input[name="title"] { grid-column: 1 / -1; }
  .dm-row-actions { grid-column: 1 / -1; }
}

[data-theme="dark"] .dm-nav a, [data-theme="dark"] .dm-btn { background: #2a2438; border-color: #362f4a; color: #ddd6fe; }
[data-theme="dark"] .dm-head, [data-theme="dark"] .dm-foot { border-color: #362f4a; }
[data-theme="dark"] .dm-foot, [data-theme="dark"] .dm-row-new { background: #2a2438; }
[data-theme="dark"] .dm-head h3 { color: var(--violet-300); }
[data-theme="dark"] .dm-divider { background: #362f4a; }
[data-theme="dark"] .dm-toggle { border-color: #362f4a; }
[data-theme="dark"] .dm-toggle:has(input:checked) { background: #2a2438; border-color: #453c5c; }
[data-theme="dark"] .dm-toggle-text strong { color: #e5e0f5; }
[data-theme="dark"] .dm-switch { background: #453c5c; }
[data-theme="dark"] .dm-row { border-color: #362f4a; }
[data-theme="dark"] .dm-row input[type="text"], [data-theme="dark"] .dm-row input[type="number"], [data-theme="dark"] .dm-row textarea { background: #211c30; border-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .dm-btn-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
[data-theme="dark"] .dm-btn-danger { color: #fda29b; }


.rd-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--violet-700), var(--violet-900)); color: #fff;
  border-radius: 16px; padding: 30px 32px; margin-bottom: 18px;
}
.rd-hello { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.75; margin-bottom: 6px; }
.rd-hero h1 { font-size: 1.7rem; color: #fff; margin-bottom: 6px; }
.rd-hero-text { opacity: 0.88; max-width: 640px; margin: 0; }
.rd-hero-btn { background: #fff; color: var(--violet-800); font-weight: 700; padding: 12px 22px; border-radius: 10px; text-decoration: none; white-space: nowrap; transition: transform .15s ease, box-shadow .15s ease; }
.rd-hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }

.rd-emergency { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #fff; border: 1px solid #fecdd3; border-left: 4px solid #e11d48; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; }
.rd-emergency-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #be123c; background: #fff1f2; padding: 3px 10px; border-radius: 999px; }
.rd-emergency-text { flex: 1 1 240px; color: #881337; font-weight: 600; }
.rd-emergency a { background: #e11d48; color: #fff; text-decoration: none; padding: 7px 16px; border-radius: 8px; font-weight: 700; font-size: 0.9rem; }

.rd-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.rd-q { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; color: var(--text-dark); font-weight: 600; font-size: 0.93rem; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.rd-q svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--violet-600); }
.rd-q:hover { border-color: var(--violet-300); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.rd-q-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.rd-q-primary svg { color: #fff; }
.rd-q-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }

.rd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.rd-stat { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 18px; }
.rd-stat p { margin: 0 0 4px; color: var(--text-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.rd-stat h2 { margin: 0; color: var(--violet-800); font-size: 1.8rem; font-weight: 800; }

.rd-card { padding: 0; margin-bottom: 18px; }
.rd-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border-color); }
.rd-card-head h3 { margin: 0; font-size: 1rem; color: var(--violet-800); }
.rd-card-body { padding: 16px 20px; }
.rd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; align-items: start; }
.rd-grid .rd-card { margin-bottom: 0; }
.rd-grid + .rd-section, .rd-grid + .rd-card { margin-top: 18px; }
.rd-muted { color: var(--text-muted); margin: 0; }
.rd-small { font-size: 0.85rem; }
.rd-link { color: var(--color-primary); font-weight: 600; font-size: 0.88rem; text-decoration: none; }
.rd-link:hover { text-decoration: underline; }

.rd-latest { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.rd-steps { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 14px; counter-reset: none; }
.rd-steps li { flex: 1; display: flex; align-items: center; gap: 10px; position: relative; color: var(--text-muted); font-size: 0.9rem; font-weight: 600; padding-right: 12px; }
.rd-steps li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--border-color); margin-left: 4px; }
.rd-steps li.done, .rd-steps li.current { color: var(--violet-800); }
.rd-steps li.done::after { background: var(--violet-500); }
.rd-step-num { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 0.82rem; font-weight: 700; background: var(--gray-light); color: var(--text-muted); border: 2px solid var(--border-color); }
.rd-steps li.done .rd-step-num { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.rd-steps li.current .rd-step-num { background: #fff; border-color: var(--violet-600); color: var(--violet-700); box-shadow: 0 0 0 4px var(--violet-100); }
.rd-action { margin: 0 0 12px; font-size: 0.93rem; }

.rd-howto { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rd-howto li { display: flex; gap: 12px; align-items: flex-start; }
.rd-howto .rd-step-num { background: var(--violet-100); border-color: var(--violet-100); color: var(--violet-800); }
.rd-howto strong { display: block; margin-bottom: 2px; }
.rd-howto p { margin: 0; color: var(--text-muted); font-size: 0.88rem; }

.rd-item { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-light); text-decoration: none; color: inherit; }
.rd-item:last-child { border-bottom: none; }
.rd-item p { margin: 2px 0 0; }
.rd-date { min-width: 56px; text-align: center; border: 1px solid var(--border-color); border-radius: 10px; padding: 6px 8px; font-weight: 800; font-size: 1.2rem; color: var(--violet-800); line-height: 1.1; }
.rd-date small { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.rd-hotline { justify-content: space-between; }
.rd-num { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 700; color: var(--violet-800); text-decoration: none; border: 1px solid var(--border-color); padding: 5px 12px; border-radius: 8px; font-size: 0.9rem; }
.rd-num svg { width: 15px; height: 15px; }
.rd-num:hover { border-color: var(--violet-300); background: var(--violet-50); }
.rd-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.rd-edu:hover strong { color: var(--color-primary); }
.rd-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--violet-600); margin-bottom: 2px; }
.rd-edu strong { display: block; }

.rd-section { margin-bottom: 18px; }
.rd-section-title { font-size: 1rem; color: var(--violet-800); margin-bottom: 12px; }
.rd-tips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rd-tip { background: #fff; border: 1px solid var(--border-color); border-left: 3px solid var(--violet-500); border-radius: 10px; padding: 14px 16px; }
.rd-tip h4 { margin: 0 0 4px; font-size: 0.95rem; color: var(--text-dark); }
.rd-tip p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

.rd-faq { border-bottom: 1px solid var(--gray-light); padding: 12px 0; }
.rd-faq:last-child { border-bottom: none; }
.rd-faq summary { cursor: pointer; font-weight: 600; color: var(--text-dark); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.rd-faq summary::-webkit-details-marker { display: none; }
.rd-faq summary::after { content: '+'; color: var(--violet-600); font-weight: 700; font-size: 1.1rem; line-height: 1; }
.rd-faq[open] summary::after { content: '−'; }
.rd-faq p { margin: 8px 0 0; color: var(--text-muted); font-size: 0.92rem; }

@media (max-width: 900px) {
  .rd-stats { grid-template-columns: repeat(2, 1fr); }
  .rd-grid, .rd-tips, .rd-howto { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rd-hero { padding: 22px; }
  .rd-hero h1 { font-size: 1.35rem; }
  .rd-steps { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rd-steps li::after { display: none; }
}

[data-theme="dark"] .rd-q, [data-theme="dark"] .rd-stat, [data-theme="dark"] .rd-tip, [data-theme="dark"] .rd-emergency { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .rd-emergency { border-left-color: #e11d48; }
[data-theme="dark"] .rd-emergency-text { color: #fecdd3; }
[data-theme="dark"] .rd-emergency-label { background: rgba(225,29,72,.15); color: #fda4af; }
[data-theme="dark"] .rd-q { color: #e5e0f5; }
[data-theme="dark"] .rd-q svg { color: var(--violet-300); }
[data-theme="dark"] .rd-q-primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
[data-theme="dark"] .rd-q-primary svg { color: #fff; }
[data-theme="dark"] .rd-stat h2, [data-theme="dark"] .rd-card-head h3, [data-theme="dark"] .rd-section-title, [data-theme="dark"] .rd-date, [data-theme="dark"] .rd-num { color: var(--violet-300); }
[data-theme="dark"] .rd-card-head, [data-theme="dark"] .rd-item, [data-theme="dark"] .rd-faq, [data-theme="dark"] .rd-date, [data-theme="dark"] .rd-num { border-color: #362f4a; }
[data-theme="dark"] .rd-tip h4, [data-theme="dark"] .rd-faq summary { color: #e5e0f5; }
[data-theme="dark"] .rd-steps li.done, [data-theme="dark"] .rd-steps li.current { color: var(--violet-300); }
[data-theme="dark"] .rd-step-num { background: #2a2438; border-color: #453c5c; color: #9c94b3; }
[data-theme="dark"] .rd-steps li.current .rd-step-num { background: #211c30; box-shadow: 0 0 0 4px #362f4a; color: var(--violet-300); }
[data-theme="dark"] .rd-howto .rd-step-num { background: #362f4a; border-color: #362f4a; color: #ddd6fe; }


.sm-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; align-items: start; }
.sm-card { padding: 0; }
.sm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border-color); }
.sm-card-head h3 { margin: 0; font-size: 1rem; color: var(--violet-800); }
.sm-card-body { padding: 18px 20px; }
.sm-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border-color); background: var(--violet-50); border-radius: 0 0 var(--radius) var(--radius); }
.sm-summary { color: var(--text-muted); font-size: 0.9rem; }
.sm-summary-ok { color: var(--violet-800); font-weight: 700; }

.sm-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sm-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border: 1.5px solid var(--border-color); border-radius: 10px; cursor: pointer; text-align: center; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.sm-slot input { position: absolute; opacity: 0; pointer-events: none; }
.sm-slot-time { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--text-dark); }
.sm-slot-state { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.sm-slot.sm-free:hover { border-color: var(--violet-400); background: var(--violet-50); }
.sm-slot.sm-free .sm-slot-state { color: #059669; }
.sm-slot.sm-checked { border-color: var(--color-primary); background: var(--violet-50); box-shadow: 0 0 0 3px var(--violet-100); }
.sm-slot.sm-checked .sm-slot-time { color: var(--violet-800); }
.sm-slot.sm-taken, .sm-slot.sm-past, .sm-slot.sm-pick { cursor: not-allowed; background: var(--gray-light); }
.sm-slot.sm-taken .sm-slot-time, .sm-slot.sm-past .sm-slot-time { color: #a39bad; text-decoration: line-through; }
.sm-slot.sm-taken .sm-slot-state { color: #dc2626; }
.sm-slot.sm-pick .sm-slot-time { color: #a39bad; }
.sm-slot:has(input:focus-visible) { outline: 2px solid var(--violet-300); outline-offset: 2px; }
.sm-alert { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 0.88rem; font-weight: 600; }
.sm-email { display: flex; align-items: flex-end; }
.sm-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; font-size: 0.92rem; margin: 0 0 4px !important; }
.sm-check input { width: 18px !important; height: 18px; margin-top: 2px; accent-color: var(--color-primary); flex-shrink: 0; }
.sm-check small { display: block; font-weight: 400; }

.sm-cal-head { justify-content: space-between; }
.sm-nav { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: 8px; color: var(--violet-800); text-decoration: none; font-size: 1.3rem; line-height: 1; }
.sm-nav:hover { background: var(--violet-50); border-color: var(--violet-300); }
.sm-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sm-dow { text-align: center; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 4px 0; }
.sm-day { aspect-ratio: 1 / 1; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--border-color); border-radius: 10px; background: #fff; font-family: inherit; color: var(--text-dark); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.sm-day:hover:not(:disabled) { border-color: var(--violet-400); background: var(--violet-50); }
.sm-day.sm-empty { border: none; background: transparent; cursor: default; }
.sm-num { font-weight: 600; font-size: 0.95rem; }
.sm-day.sm-past { color: #c4bccc; background: transparent; cursor: not-allowed; }
.sm-day.sm-today { border-color: var(--violet-500); }
.sm-day.sm-today .sm-num { color: var(--violet-700); font-weight: 800; }
.sm-day.sm-full { background: #fef2f2; border-color: #fecaca; color: #b91c1c; cursor: not-allowed; }
.sm-day.sm-selected { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.sm-day.sm-selected .sm-num { color: #fff; }
.sm-pips { display: flex; gap: 3px; }
.sm-pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet-200); }
.sm-pips i.on { background: var(--violet-600); }
.sm-full .sm-pips i.on { background: #ef4444; }
.sm-selected .sm-pips i { background: rgba(255,255,255,.4); }
.sm-selected .sm-pips i.on { background: #fff; }
.sm-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 0.82rem; color: var(--text-muted); }
.sm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sm-lg { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border-color); display: inline-block; }
.sm-lg-today { border: 2px solid var(--violet-500); }
.sm-lg-sel { background: var(--color-primary); border-color: var(--color-primary); }
.sm-lg-full { background: #fef2f2; border-color: #fecaca; }
.sm-pip-demo { width: 7px; height: 7px; border-radius: 50%; background: var(--violet-600); display: inline-block; }

@media (max-width: 1000px) { .sm-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .sm-slots { grid-template-columns: 1fr; } .sm-day { min-height: 38px; } }

[data-theme="dark"] .sm-card-head, [data-theme="dark"] .sm-card-foot { border-color: #362f4a; }
[data-theme="dark"] .sm-card-foot { background: #2a2438; }
[data-theme="dark"] .sm-card-head h3, [data-theme="dark"] .sm-summary-ok { color: var(--violet-300); }
[data-theme="dark"] .sm-slot, [data-theme="dark"] .sm-day, [data-theme="dark"] .sm-nav { border-color: #362f4a; background: #211c30; color: #e5e0f5; }
[data-theme="dark"] .sm-slot-time { color: #e5e0f5; }
[data-theme="dark"] .sm-slot.sm-taken, [data-theme="dark"] .sm-slot.sm-past, [data-theme="dark"] .sm-slot.sm-pick { background: #1a1625; }
[data-theme="dark"] .sm-slot.sm-checked, [data-theme="dark"] .sm-slot.sm-free:hover, [data-theme="dark"] .sm-day:hover:not(:disabled) { background: #2a2438; border-color: var(--violet-400); box-shadow: none; }
[data-theme="dark"] .sm-day.sm-past { background: transparent; color: #5a5270; }
[data-theme="dark"] .sm-day.sm-full { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); color: #fca5a5; }
[data-theme="dark"] .sm-day.sm-selected { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
[data-theme="dark"] .sm-alert { background: rgba(251,191,36,.12); color: #fcd34d; }


#meetingTimeInput { max-width: 220px; font-size: 1.05rem; font-weight: 600; }
.sm-alert-block { background: #fef2f2; color: #b91c1c; }
.sm-booked { margin-top: 12px; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 14px; }
.sm-booked-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 6px; }
.sm-booked ul { list-style: none; margin: 0; padding: 0; }
.sm-booked li { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--gray-light); font-size: 0.9rem; }
.sm-booked li:last-child { border-bottom: none; }
.sm-booked li strong { min-width: 74px; color: var(--violet-800); }
.sm-booked li span { color: var(--text-muted); }
.sm-booked li.sm-clash strong, .sm-booked li.sm-clash span { color: #b91c1c; }
.sm-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--violet-600); color: #fff; font-size: 0.7rem; font-weight: 700; font-style: normal; display: inline-flex; align-items: center; justify-content: center; }
.sm-count-demo { margin-right: 2px; }
.sm-day.sm-has { border-color: var(--violet-200); }
.sm-day.sm-selected .sm-count { background: #fff; color: var(--violet-800); }
[data-theme="dark"] .sm-booked { border-color: #362f4a; }
[data-theme="dark"] .sm-booked li { border-color: #362f4a; }
[data-theme="dark"] .sm-booked li strong { color: var(--violet-300); }
[data-theme="dark"] .sm-alert-block { background: rgba(239,68,68,.12); color: #fca5a5; }
[data-theme="dark"] .sm-day.sm-has { border-color: #453c5c; }


.em-master { padding: 0; margin-bottom: 18px; overflow: hidden; border-left: 4px solid #9ca3af; }
.em-master.is-on { border-left-color: #059669; }
.em-master-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; }
.em-master-text { display: flex; flex-direction: column; gap: 2px; }
.em-master-text strong { font-size: 1.1rem; color: var(--text-dark); font-family: var(--font-heading); }
.em-master-text small { color: var(--text-muted); font-size: 0.88rem; }
.em-state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: #6b7280; }
.em-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.is-on .em-state { color: #059669; }
.is-on .em-dot { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.em-master-toggle { border: none !important; padding: 0 !important; background: none !important; }
.em-master-toggle .dm-switch { width: 48px; height: 28px; }
.em-master-toggle .dm-switch::after { width: 22px; height: 22px; }
.em-master-toggle input:checked ~ .dm-switch::after { transform: translateX(20px); }
.em-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border-color); }
.em-stats div { padding: 12px 22px; border-right: 1px solid var(--border-color); }
.em-stats div:last-child { border-right: none; }
.em-stats span { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.em-stats strong { font-size: 1.3rem; color: var(--violet-800); font-family: var(--font-heading); }
.em-stats .em-ok { color: #059669; }
.em-stats .em-bad { color: #dc2626; }

.em-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: start; margin-bottom: 18px; }
.em-toggles { display: flex; flex-direction: column; gap: 10px; }
.em-tag { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); background: var(--gray-light); padding: 3px 10px; border-radius: 999px; }
.em-row-3 { display: grid; grid-template-columns: 1.6fr 90px 1fr; gap: 12px; }
.em-note { font-size: 0.85rem; color: var(--text-muted); background: var(--violet-50); border-radius: 8px; padding: 10px 12px; margin: 4px 0 0; }

.em-actions { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.em-test { flex: 1 1 360px; }
.em-test label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.em-test-row { display: flex; gap: 10px; flex-wrap: wrap; }
.em-test-row input { flex: 1 1 220px; height: 42px; padding: 0 12px; border: 1.5px solid var(--border-color); border-radius: 10px; font-family: inherit; font-size: 0.95rem; }
.em-test-row input:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 4px var(--violet-100); }

.em-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.em-pill-sent { background: #ecfdf5; color: #047857; }
.em-pill-failed { background: #fef2f2; color: #b91c1c; }
.em-pill-skipped { background: #f3f4f6; color: #4b5563; }
.em-err { display: block; margin-top: 3px; font-size: 0.8rem; color: #b91c1c; }

@media (max-width: 1000px) { .em-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .em-stats { grid-template-columns: repeat(2, 1fr); }
  .em-stats div:nth-child(2) { border-right: none; }
  .em-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--border-color); }
  .em-row-3 { grid-template-columns: 1fr 1fr; }
  .em-row-3 .form-group:first-child { grid-column: 1 / -1; }
}

[data-theme="dark"] .em-master-text strong { color: #e5e0f5; }
[data-theme="dark"] .em-stats, [data-theme="dark"] .em-stats div { border-color: #362f4a; }
[data-theme="dark"] .em-stats strong { color: var(--violet-300); }
[data-theme="dark"] .em-stats .em-ok { color: #34d399; }
[data-theme="dark"] .em-stats .em-bad, [data-theme="dark"] .em-err { color: #fca5a5; }
[data-theme="dark"] .em-tag { background: #2a2438; color: #9c94b3; }
[data-theme="dark"] .em-note { background: #2a2438; color: #cfc9de; }
[data-theme="dark"] .em-test-row input { background: #2a2438; border-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .em-pill-sent { background: rgba(16,185,129,.14); color: #6ee7b7; }
[data-theme="dark"] .em-pill-failed { background: rgba(239,68,68,.14); color: #fca5a5; }
[data-theme="dark"] .em-pill-skipped { background: #2a2438; color: #9c94b3; }


.ct-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 18px; align-items: start; }
.ct-count { display: inline-block; min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--gray-light); color: var(--text-dark); font-weight: 700; font-size: 0.85rem; text-align: center; }
.ct-locked { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); padding: 6px 10px; border: 1px dashed var(--border-color); border-radius: 8px; }
.dm-row-action { grid-template-columns: 2.6fr 1fr 56px auto; }
.dm-select { width: 100%; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 0.9rem; color: var(--text-dark); background: #fff; }
.dm-select:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }
.dm-row-off input[type="text"] { color: var(--text-muted); text-decoration: line-through; }
@media (max-width: 1000px) {
  .ct-grid { grid-template-columns: 1fr; }
  .dm-row-action { grid-template-columns: 1fr 1fr; }
  .dm-row-action input[name="action_text"] { grid-column: 1 / -1; }
}
[data-theme="dark"] .ct-count { background: #2a2438; color: #e5e0f5; }
[data-theme="dark"] .ct-locked { border-color: #453c5c; color: #9c94b3; }
[data-theme="dark"] .dm-select { background: #211c30; border-color: #362f4a; color: #e5e0f5; }


.rpt-table tr.rpt-row { cursor: pointer; }
.rpt-table tr.rpt-row td:last-child { position: relative; padding-right: 40px; }
.rpt-table tr.rpt-row td:last-child::after {
  content: ''; position: absolute; right: 20px; top: 50%; width: 7px; height: 7px;
  border-top: 2px solid var(--violet-300); border-right: 2px solid var(--violet-300);
  transform: translateY(-50%) rotate(45deg); transition: right .15s ease, border-color .15s ease;
}
.rpt-table tr.rpt-row:hover td:last-child::after { right: 16px; border-color: var(--color-primary); }
.rpt-table tr.rpt-row:hover .rpt-name { color: var(--color-primary); }
.rpt-table tr.rpt-row:focus-visible { outline: 2px solid var(--violet-400); outline-offset: -2px; }


.badge-endorsement { background: #ffedd5; color: #9a3412; }
.badge-referred    { background: #e0e7ff; color: #3730a3; }
.rpt-tab-for-endorsement, .rpt-status-for-endorsement { --st: #ea580c; --st-bg: #fff7ed; }
.rpt-tab-referred,        .rpt-status-referred        { --st: #4f46e5; --st-bg: #eef2ff; }
.sf-for-endorsement { --sf-color: #ea580c; --sf-soft: #fff7ed; }
.sf-referred        { --sf-color: #4f46e5; --sf-soft: #eef2ff; }
[data-theme="dark"] .rpt-status-for-endorsement { --st: #fb923c; --st-bg: rgba(251,146,60,.12); }
[data-theme="dark"] .rpt-status-referred        { --st: #a5b4fc; --st-bg: rgba(165,180,252,.12); }
[data-theme="dark"] .sf-for-endorsement { --sf-color: #fb923c; }
[data-theme="dark"] .sf-referred        { --sf-color: #a5b4fc; }
@media (max-width: 1100px) {
  .status-flow { flex-wrap: wrap; gap: 10px; }
  .status-flow .sf-arrow { display: none; }
  .status-flow .sf-step { flex: 1 1 150px; }
}

.rv-flag { display: inline-block; font-size: 0.8rem; font-weight: 700; color: #92400e; background: #fef3c7; padding: 2px 10px; border-radius: 999px; }
.rv-banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; border: 1px solid; font-size: 0.93rem; }
.rv-banner strong:first-child { white-space: nowrap; }
.rv-banner-warn { background: #fff7ed; border-color: #fed7aa; color: #7c2d12; }
.rv-banner-info { background: #eef2ff; border-color: #c7d2fe; color: #312e81; }
.rv-attempts { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }
.rv-attempts strong { color: var(--text-dark); }
.rv-pips { display: inline-flex; gap: 4px; }
.rv-pips i { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-light); border: 1px solid var(--border-color); }
.rv-pips i.on { background: #ea580c; border-color: #ea580c; }
.rv-summon { padding: 12px 0; border-bottom: 1px solid var(--gray-light); }
.rv-summon:last-of-type { border-bottom: none; }
.rv-summon-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-summon-no { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--violet-700); background: var(--violet-50); padding: 3px 10px; border-radius: 999px; }
.rv-summon-note { margin: 6px 0 0; font-size: 0.88rem; color: var(--text-muted); }
.rv-att { display: inline-block; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--gray-light); color: var(--text-muted); }
.rv-att-ok { background: #ecfdf5; color: #047857; }
.rv-att-warn { background: #fff7ed; color: #c2410c; }
.rv-att-bad { background: #fef2f2; color: #b91c1c; }
.rv-att-form { display: grid; grid-template-columns: 1.6fr 1fr auto; gap: 8px; margin-top: 10px; }
.rv-att-form select, .rv-att-form input { padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 0.9rem; background: #fff; color: var(--text-dark); min-width: 0; }
.rv-att-form select:focus, .rv-att-form input:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }
@media (max-width: 760px) { .rv-att-form { grid-template-columns: 1fr; } }
[data-theme="dark"] .rv-banner-warn { background: rgba(234,88,12,.1); border-color: rgba(234,88,12,.35); color: #fdba74; }
[data-theme="dark"] .rv-banner-info { background: rgba(99,102,241,.1); border-color: rgba(99,102,241,.35); color: #c7d2fe; }
[data-theme="dark"] .rv-summon { border-color: #362f4a; }
[data-theme="dark"] .rv-summon-no { background: #2a2438; color: var(--violet-300); }
[data-theme="dark"] .rv-att-form select, [data-theme="dark"] .rv-att-form input { background: #211c30; border-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .rv-attempts strong { color: #e5e0f5; }
[data-theme="dark"] .rv-pips i { background: #2a2438; border-color: #453c5c; }
[data-theme="dark"] .rv-pips i.on { background: #fb923c; border-color: #fb923c; }

.cf-card { max-width: 640px; }
.cf-options { display: grid; gap: 10px; }
.cf-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--border-color); border-radius: 10px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.cf-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--color-primary); flex-shrink: 0; }
.cf-option strong { display: block; color: var(--text-dark); }
.cf-option small { color: var(--text-muted); }
.cf-option:hover { border-color: var(--violet-300); }
.cf-option:has(input:checked) { border-color: var(--color-primary); background: var(--violet-50); }
[data-theme="dark"] .cf-option { border-color: #362f4a; }
[data-theme="dark"] .cf-option strong { color: #e5e0f5; }
[data-theme="dark"] .cf-option:has(input:checked) { background: #2a2438; border-color: var(--violet-400); }


.badge-preparing { background: #fef3c7; color: #92400e; }
.badge-ready     { background: #ccfbf1; color: #115e59; }
.rpt-tab-for-referral, .rpt-status-for-referral { --st: #ea580c; --st-bg: #fff7ed; }
.rpt-tab-preparing-referral, .rpt-status-preparing-referral { --st: #b45309; --st-bg: #fffbeb; }
.rpt-tab-ready-for-release, .rpt-status-ready-for-release { --st: #0f766e; --st-bg: #f0fdfa; }
.sf-for-referral       { --sf-color: #ea580c; --sf-soft: #fff7ed; }
.sf-preparing-referral { --sf-color: #b45309; --sf-soft: #fffbeb; }
.sf-ready-for-release  { --sf-color: #0f766e; --sf-soft: #f0fdfa; }
[data-theme="dark"] .rpt-status-for-referral { --st: #fb923c; --st-bg: rgba(251,146,60,.12); }
[data-theme="dark"] .rpt-status-preparing-referral { --st: #fbbf24; --st-bg: rgba(251,191,36,.12); }
[data-theme="dark"] .rpt-status-ready-for-release { --st: #5eead4; --st-bg: rgba(94,234,212,.12); }
[data-theme="dark"] .sf-for-referral { --sf-color: #fb923c; }
[data-theme="dark"] .sf-preparing-referral { --sf-color: #fbbf24; }
[data-theme="dark"] .sf-ready-for-release { --sf-color: #5eead4; }

.rf-no { font-family: var(--font-body); font-size: 0.8rem; font-weight: 700; color: var(--text-muted); background: var(--gray-light); padding: 2px 10px; border-radius: 999px; margin-left: 6px; }
.rf-steps { list-style: none; display: flex; margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--border-color); gap: 0; }
.rf-steps li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; padding-right: 10px; }
.rf-steps li:not(:last-child)::after { content: ''; flex: 1; height: 2px; background: var(--border-color); }
.rf-steps li.done, .rf-steps li.current { color: var(--violet-800); }
.rf-steps li.done::after { background: var(--violet-500); }
.rf-steps li.done .rd-step-num { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.rf-steps li.current .rd-step-num { background: #fff; border-color: var(--violet-600); color: var(--violet-700); box-shadow: 0 0 0 4px var(--violet-100); }
.rf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.rf-grid .rf-full { grid-column: 1 / -1; }
.rf-grid input[readonly] { background: var(--gray-light); color: var(--text-muted); }
@media (max-width: 760px) {
  .rf-grid { grid-template-columns: 1fr; }
  .rf-steps { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rf-steps li::after { display: none; }
}
[data-theme="dark"] .rf-no { background: #2a2438; color: #9c94b3; }
[data-theme="dark"] .rf-steps { border-color: #362f4a; }
[data-theme="dark"] .rf-steps li.done, [data-theme="dark"] .rf-steps li.current { color: var(--violet-300); }
[data-theme="dark"] .rf-steps li.current .rd-step-num { background: #211c30; box-shadow: 0 0 0 4px #362f4a; color: var(--violet-300); }
[data-theme="dark"] .rf-grid input[readonly] { background: #1a1625; color: #9c94b3; }


.rpt-new-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%;
  margin-bottom: 16px; padding: 12px 16px; text-align: left; cursor: pointer;
  background: #eff6ff; border: 1px solid #bfdbfe; border-left: 4px solid #2563eb; border-radius: 10px;
  font-family: inherit; font-size: 0.93rem; color: #1e3a8a; transition: background .15s ease;
}
.rpt-new-banner:hover { background: #dbeafe; }
.rpt-new-banner.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.rpt-new-cta { margin-left: auto; font-weight: 700; font-size: 0.85rem; text-decoration: underline; }
.rpt-new-banner.active .rpt-new-cta { text-decoration: none; }
.rpt-new-pulse { width: 10px; height: 10px; border-radius: 50%; background: #2563eb; flex-shrink: 0; animation: rpt-pulse 1.6s infinite; }
.rpt-new-banner.active .rpt-new-pulse { background: #fff; }
@keyframes rpt-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.55); } 70% { box-shadow: 0 0 0 9px rgba(37,99,235,0); } 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); } }

.rpt-table tr.rpt-new { background: #eff6ff; }
.rpt-table tr.rpt-new td:first-child { box-shadow: inset 4px 0 0 #2563eb; }
.rpt-table tr.rpt-new:hover { background: #dbeafe; }
.rpt-table tr.rpt-new .rpt-name { font-weight: 800; }
.rpt-new-tag {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  background: #2563eb; color: #fff; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; vertical-align: middle;
}
.row-new .rpt-new-tag { margin-left: 0; margin-right: 4px; }
a.row-link.row-new { background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; font-weight: 700; }
a.row-link.row-new:hover { background: #dbeafe; }
@media (prefers-reduced-motion: reduce) { .rpt-new-pulse { animation: none; } }

[data-theme="dark"] .rpt-new-banner { background: rgba(37,99,235,.12); border-color: rgba(96,165,250,.35); border-left-color: #60a5fa; color: #bfdbfe; }
[data-theme="dark"] .rpt-new-banner:hover { background: rgba(37,99,235,.2); }
[data-theme="dark"] .rpt-new-banner.active { background: #2563eb; color: #fff; }
[data-theme="dark"] .rpt-table tr.rpt-new, [data-theme="dark"] a.row-link.row-new { background: rgba(37,99,235,.14); }
[data-theme="dark"] .rpt-table tr.rpt-new:hover, [data-theme="dark"] a.row-link.row-new:hover { background: rgba(37,99,235,.22); }
[data-theme="dark"] .rpt-table tr.rpt-new td:first-child { box-shadow: inset 4px 0 0 #60a5fa; }

.rpt-table tr.hs-row td:last-child { padding-right: 20px; }
.rpt-table tr.hs-row td:last-child::after { display: none; }


.rh-back { margin: 0 0 4px; font-size: 0.88rem; }
.rh-report { margin-bottom: 16px; }
.rh-archived { opacity: 0.8; }
.rh-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rh-title h3 { margin: 0; }
.rh-tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); background: var(--gray-light); padding: 2px 10px; border-radius: 999px; }
.rh-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rh-actions form { margin: 0; }
.rh-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px solid var(--gray-light); }
.rh-meta dt { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.rh-meta dd { margin: 2px 0 0; font-size: 0.92rem; color: var(--text-dark); }
.rh-cols { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.rh-sub { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 0 0 8px; }
.rh-summon { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; font-size: 0.9rem; border-bottom: 1px solid var(--gray-light); }
.rh-summon:last-of-type { border-bottom: none; }
.rh-proof { display: block; max-width: 180px; max-height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); }
@media (max-width: 900px) { .rh-cols { grid-template-columns: 1fr; } }
[data-theme="dark"] .rh-tag { background: #2a2438; color: #9c94b3; }
[data-theme="dark"] .rh-meta, [data-theme="dark"] .rh-summon { border-color: #362f4a; }
[data-theme="dark"] .rh-meta dd { color: #e5e0f5; }


.as-file { display: flex; align-items: center; gap: 12px; width: 100%; margin: 8px 0; padding: 10px 14px; border: 1.5px dashed var(--violet-300); border-radius: 10px; background: var(--violet-50); cursor: pointer; text-align: left; transition: border-color .15s ease, background .15s ease; }
.as-file:hover { border-color: var(--color-primary); }
.as-file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.as-file:focus-within { outline: 2px solid var(--violet-300); outline-offset: 2px; }
.as-file-icon { color: var(--color-primary); display: flex; flex-shrink: 0; }
.as-file-text { display: flex; flex-direction: column; min-width: 0; }
.as-file-text strong { font-size: 0.88rem; color: var(--violet-800); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-file-text small { font-size: 0.75rem; color: var(--text-muted); }
.as-file.has-file { border-style: solid; border-color: #059669; background: #ecfdf5; }
.as-file.has-file .as-file-icon, .as-file.has-file strong { color: #047857; }
.as-file-preview { display: block; width: 100%; max-height: 110px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border-color); margin: 0 0 6px; background: #fff; }
.as-consent { display: flex; gap: 8px; align-items: flex-start; text-align: left; font-size: 0.78rem; color: var(--text-muted); margin: 4px 0 10px; line-height: 1.35; cursor: pointer; }
.as-consent input { width: 16px !important; height: 16px; margin: 1px 0 0 !important; padding: 0 !important; flex-shrink: 0; accent-color: var(--color-primary); }

.sb-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 0.72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.vf-count-hot { background: #ef4444 !important; color: #fff !important; }
.vf-list { padding: 8px 20px 16px; }
.vf-empty { text-align: center; color: var(--text-muted); padding: 32px 0; margin: 0; }
.vf-item { display: grid; grid-template-columns: 240px 1fr 280px; gap: 20px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--gray-light); }
.vf-item:last-child { border-bottom: none; }
.vf-id img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-color); background: var(--gray-light); transition: transform .15s ease; }
.vf-id a:hover img { transform: scale(1.02); }
.vf-noid { aspect-ratio: 16 / 10; border: 1px dashed var(--border-color); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.85rem; }
.vf-info h3 { margin: 0 0 8px; font-size: 1.05rem; color: var(--violet-800); }
.vf-info dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; margin: 0; font-size: 0.9rem; }
.vf-info dt { color: var(--text-muted); font-weight: 600; font-size: 0.82rem; }
.vf-info dd { margin: 0; color: var(--text-dark); word-break: break-word; }
.vf-actions textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 0.88rem; resize: vertical; }
.vf-actions textarea:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }
.vf-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 1100px) { .vf-item { grid-template-columns: 200px 1fr; } .vf-actions { grid-column: 1 / -1; } }
@media (max-width: 640px) { .vf-item { grid-template-columns: 1fr; } .vf-info dl { grid-template-columns: 1fr; } }
[data-theme="dark"] .as-file { background: #2a2438; border-color: #453c5c; }
[data-theme="dark"] .as-file-text strong { color: var(--violet-300); }
[data-theme="dark"] .vf-item { border-color: #362f4a; }
[data-theme="dark"] .vf-info h3 { color: var(--violet-300); }
[data-theme="dark"] .vf-info dd { color: #e5e0f5; }
[data-theme="dark"] .vf-actions textarea { background: #211c30; border-color: #362f4a; color: #e5e0f5; }


.sf-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px;
}
.sf-grid li { min-width: 0; }
.sf-grid { --sf-color: var(--violet-500); --sf-soft: var(--violet-50); }
.sf-step2 {
  position: relative; height: 100%; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 12px; border-radius: 10px;
  background: var(--sf-soft); border: 1px solid var(--border-color); border-top: 3px solid var(--sf-color);
  text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease;
}
.sf-step2:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sf-step2:focus-visible { outline: 2px solid var(--violet-300); outline-offset: 2px; }
.sf2-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sf-color); color: #fff; font-size: 0.72rem; font-weight: 800;
}
.sf2-label {
  font-family: var(--font-heading); font-weight: 700; color: var(--text-dark);
  font-size: clamp(0.72rem, 0.55rem + 0.45vw, 0.9rem); line-height: 1.2;
  max-width: 100%; overflow-wrap: anywhere; hyphens: auto;
}
.sf2-count { margin-top: auto; font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; line-height: 1; color: var(--sf-color); }
.sf-step2 .sf-notif { top: -8px; right: -8px; }

@media (max-width: 1280px) { .sf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 520px)  {
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-step2 { padding: 10px; }
  .sf2-label { font-size: 0.78rem; }
  .sf2-count { font-size: 1.15rem; }
}

[data-theme="dark"] .sf-step2 { background: #2a2438; border-color: #362f4a; border-top-color: var(--sf-color); }
[data-theme="dark"] .sf2-label { color: #e5e0f5; }

.sf-notif[hidden] { display: none !important; }
.sf-bump { animation: sf-bump .5s ease, sf-pulse 1.8s infinite .5s; }
@keyframes sf-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }


.as-addr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; }
.as-addr input { min-width: 0; }
.as-hint { display: block; width: 100%; text-align: left; font-size: 0.74rem; color: var(--text-muted); margin: -2px 0 4px; min-height: 0; }
.as-hint.ok { color: #047857; font-weight: 600; }
.as-hint.bad { color: #b91c1c; font-weight: 600; }

.blk-row { display: grid; grid-template-columns: 70px 1fr 34px auto; align-items: center; gap: 10px; padding: 6px 0; }
.blk-name { font-weight: 700; color: var(--text-dark); font-size: 0.9rem; white-space: nowrap; }
.blk-bar { height: 10px; background: var(--gray-light); border-radius: 999px; overflow: hidden; }
.blk-bar span { display: block; height: 100%; background: var(--violet-400); border-radius: 999px; }
.blk-top .blk-bar span { background: #e11d48; }
.blk-top .blk-name { color: #be123c; }
.blk-num { font-weight: 800; text-align: right; color: var(--violet-800); }
.blk-open { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }

.tt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tt-grid div { border: 1px solid var(--border-color); border-radius: 10px; padding: 12px; min-width: 0; }
.tt-grid span { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.tt-grid strong { display: block; margin-top: 4px; font-family: var(--font-heading); font-size: 1.05rem; color: var(--violet-800); overflow-wrap: anywhere; }
.dur { display: inline-block; font-size: 0.85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #fffbeb; color: #92400e; white-space: nowrap; }
.dur-done { background: #ecfdf5; color: #047857; }
@media (max-width: 520px) { .tt-grid { grid-template-columns: 1fr; } .blk-row { grid-template-columns: 60px 1fr 30px; } .blk-open { display: none; } }

[data-theme="dark"] .blk-name { color: #e5e0f5; }
[data-theme="dark"] .blk-bar { background: #2a2438; }
[data-theme="dark"] .blk-num, [data-theme="dark"] .tt-grid strong { color: var(--violet-300); }
[data-theme="dark"] .tt-grid div { border-color: #362f4a; }
[data-theme="dark"] .dur { background: rgba(251,191,36,.12); color: #fcd34d; }
[data-theme="dark"] .dur-done { background: rgba(16,185,129,.14); color: #6ee7b7; }


.em-row td:last-child::after { display: none; }
.em-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 14, 30, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.em-modal[hidden] { display: none; }
.em-modal-box { width: min(760px, 100%); height: min(88vh, 900px); background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.em-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-color); }
.em-modal-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 0.85rem; color: var(--text-muted); }
.em-modal-meta strong { font-size: 1rem; color: var(--text-dark); overflow-wrap: anywhere; }
.em-close { background: none; border: 1px solid var(--border-color); border-radius: 8px; width: 34px; height: 34px; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text-muted); flex-shrink: 0; }
.em-close:hover { background: var(--gray-light); color: var(--text-dark); }
.em-frame-wrap { flex: 1; background: #f3f4f6; padding: 12px; }
.em-frame-wrap iframe { width: 100%; height: 100%; border: 1px solid var(--border-color); border-radius: 8px; background: #fff; }
[data-theme="dark"] .em-modal-box { background: #211c30; }
[data-theme="dark"] .em-modal-head { border-color: #362f4a; }
[data-theme="dark"] .em-modal-meta strong { color: #e5e0f5; }
[data-theme="dark"] .em-close { border-color: #362f4a; color: #9c94b3; }
[data-theme="dark"] .em-frame-wrap { background: #1a1625; }

.live-dot { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; font-size: 0.72rem; font-weight: 700; color: #047857; text-transform: uppercase; letter-spacing: 0.04em; }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: live-pulse 2s infinite; }
.live-dot.off { color: #b91c1c; }
.live-dot.off i { background: #ef4444; animation: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); } 70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot i { animation: none; } }


.as-register form {
  justify-content: flex-start;
  justify-content: safe center;
  overflow-y: auto; overflow-x: hidden;
  padding-top: 26px; padding-bottom: 26px;
  scrollbar-width: thin; scrollbar-color: var(--violet-300) transparent;
}
.as-register form::-webkit-scrollbar { width: 6px; }
.as-register form::-webkit-scrollbar-thumb { background: var(--violet-300); border-radius: 999px; }
.as-register form::before { position: fixed; }
.as-register form h2 { font-size: 1.45rem; }
.as-register .as-sub { margin-bottom: 8px; }
.as-register input { padding: 10px 14px; margin: 4px 0; font-size: .88rem; }
.as-register .as-btn { margin-top: 10px; flex-shrink: 0; }

.as-file { margin: 6px 0 4px; padding: 8px 12px; }
.as-file-preview {
  width: 100%; height: 64px; max-height: 64px;
  object-fit: cover; object-position: center;
  margin: 0 0 4px; flex-shrink: 0;
}
.as-hint { margin: 0 0 4px; line-height: 1.3; }
.as-consent { margin: 4px 0 6px; }

@media (max-width: 768px) {
  .as-register form { overflow: visible; justify-content: flex-start; }
  .as-register form::before { position: absolute; }
}
@media (min-width: 769px) {
  .auth-slide { transition: min-height .4s ease; }
  .auth-slide.right-panel-active { min-height: 790px; }
}

.vf-idno { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 6px 12px; border-radius: 8px; background: var(--violet-50); border: 1px solid var(--violet-200); }
.vf-idno span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.vf-idno strong { font-family: ui-monospace, Consolas, monospace; font-size: 1.02rem; color: var(--violet-800); letter-spacing: 0.04em; }
.vf-noid { padding: 10px; text-align: center; line-height: 1.35; }
[data-theme="dark"] .vf-idno { background: #2a2438; border-color: #453c5c; }
[data-theme="dark"] .vf-idno strong { color: var(--violet-300); }
.as-register form > * { flex-shrink: 0; }

.mp-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; border-left: 4px solid var(--violet-300); padding: 16px 20px; }
.mp-card.is-on { border-left-color: #0ea5e9; background: #f0f9ff; }
.mp-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 320px; }
.mp-text strong { color: var(--text-dark); }
.mp-text small { color: var(--text-muted); font-size: 0.86rem; }
.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
[data-theme="dark"] .mp-card.is-on { background: rgba(14,165,233,.1); }
[data-theme="dark"] .mp-text strong { color: #e5e0f5; }

.as-form form::before { display: none !important; content: none !important; }

.as-form input:not([type="checkbox"]):not([type="file"]),
.as-form select,
.auth-card-form input {
  background: #f3eff6 !important; border: 1px solid #ddd3e6 !important; color: #1c1626 !important;
}
.as-form input:not([type="checkbox"]):not([type="file"]):focus,
.as-form select:focus,
.auth-card-form input:focus {
  background: #ffffff !important; border-color: var(--violet-500) !important; box-shadow: 0 0 0 3px rgba(122,75,153,.15) !important; outline: none;
}
.as-form input::placeholder, .auth-card-form input::placeholder { color: #6e6679 !important; opacity: 1; }
[data-theme="dark"] .as-form input:not([type="checkbox"]):not([type="file"]),
[data-theme="dark"] .as-form select,
[data-theme="dark"] .auth-card-form input { background: #2a2438 !important; border-color: #3d3452 !important; color: #f0eaf7 !important; }
[data-theme="dark"] .as-form input:not([type="checkbox"]):not([type="file"]):focus,
[data-theme="dark"] .as-form select:focus,
[data-theme="dark"] .auth-card-form input:focus { background: #332a4d !important; border-color: var(--violet-400) !important; }
[data-theme="dark"] .as-form input::placeholder, [data-theme="dark"] .auth-card-form input::placeholder { color: #a89bb8 !important; }

.as-name { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 6px; width: 100%; }
.as-name input, .as-name select { min-width: 0; }
.as-select {
  width: 100%; margin: 4px 0; padding: 10px 12px; border-radius: 12px; font-family: inherit; font-size: .88rem; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6679' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important;
}

.captcha-row { display: flex; align-items: center; gap: 6px; width: 100%; margin: 6px 0 2px; }
.captcha-img { width: 140px; height: 44px; border-radius: 8px; border: 1px solid #ddd3e6; background: #f5f1f9; flex-shrink: 0; object-fit: cover; user-select: none; }
.captcha-refresh { width: 36px; height: 36px; flex-shrink: 0; border-radius: 8px; border: 1px solid #ddd3e6; background: #fff; color: var(--violet-700); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.captcha-refresh:hover { background: var(--violet-50); border-color: var(--violet-300); }
.captcha-input { flex: 1 1 auto; min-width: 0; margin: 0 !important; text-transform: uppercase; letter-spacing: .25em; font-weight: 700; text-align: center; }
.auth-card-form .captcha-input { width: 100%; margin-top: 6px !important; }
[data-theme="dark"] .captcha-refresh { background: #2a2438; border-color: #3d3452; color: var(--violet-300); }

.as-consent a { color: var(--color-primary); font-weight: 700; text-decoration: underline; }

.as-forgot { align-self: flex-end; margin: 2px 0 0; font-size: .82rem; font-weight: 600; color: var(--color-primary); text-decoration: none; }
.as-forgot:hover { text-decoration: underline; }
[data-theme="dark"] .as-forgot { color: var(--violet-300); }

@media (min-width: 769px) { .auth-slide.right-panel-active { min-height: 880px; } }

.terms-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: none; border-radius: 16px; box-shadow: 0 24px 60px rgba(30,18,40,.35); display: none; flex-direction: column; overflow: hidden; color: var(--text-dark); background: #fff; }
.terms-dialog[open] { display: flex; }
.terms-dialog::backdrop { background: rgba(20,14,30,.55); }
.terms-dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.terms-dialog-head h2 { margin: 0; font-size: 1.1rem; color: var(--violet-800); }
.terms-x { width: 34px; height: 34px; border: 1px solid var(--border-color); border-radius: 8px; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--text-muted); flex-shrink: 0; }
.terms-dialog-body { padding: 4px 22px 16px; overflow-y: auto; }
.terms-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border-color); background: var(--violet-50); }
[data-theme="dark"] .terms-dialog { background: #211c30; color: #e5e0f5; }
[data-theme="dark"] .terms-dialog-head, [data-theme="dark"] .terms-dialog-foot { border-color: #362f4a; }
[data-theme="dark"] .terms-dialog-foot { background: #2a2438; }
[data-theme="dark"] .terms-dialog-head h2 { color: var(--violet-300); }

.terms-body { font-size: .92rem; line-height: 1.65; text-align: left; }
.terms-body h3 { font-size: 1rem; color: var(--violet-800); margin: 18px 0 6px; }
.terms-body p { margin: 0 0 8px; }
.terms-body ul { margin: 0 0 8px 20px; padding: 0; }
.terms-body li { margin-bottom: 4px; }
.terms-updated { font-size: .8rem; color: var(--text-muted); margin-top: 12px !important; }
[data-theme="dark"] .terms-body h3 { color: var(--violet-300); }
.terms-page { display: flex; justify-content: center; padding: 32px 16px; }
.terms-card { width: min(820px, 100%); background: #fff; border: 1px solid var(--border-color); border-radius: 16px; padding: 28px 32px; box-shadow: var(--shadow-sm); }
.terms-card h1 { font-size: 1.5rem; color: var(--violet-800); margin-bottom: 4px; }
[data-theme="dark"] .terms-card { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .terms-card h1 { color: var(--violet-300); }

.auth-card-wrap { display: flex; justify-content: center; align-items: center; padding: 40px 16px; min-height: calc(100vh - 260px); }
.auth-card { width: min(440px, 100%); background: #fff; border: 1px solid var(--border-color); border-radius: 20px; padding: 32px 30px; box-shadow: 0 18px 50px rgba(63,35,82,.14); text-align: center; }
.auth-card h2 { font-size: 1.4rem; color: #1c1226; margin: 10px 0 6px; }
.auth-card-sub { color: var(--text-muted); font-size: .9rem; margin: 0 0 12px; }
.auth-card-icon { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--violet-100); color: var(--violet-700); }
.auth-card-icon.ok { background: #ecfdf5; color: #047857; }
.auth-card-icon.bad { background: #fef2f2; color: #b91c1c; }
.auth-card-form { display: flex; flex-direction: column; text-align: left; margin-top: 8px; }
.auth-card-form label { font-size: .8rem; font-weight: 700; color: var(--text-muted); margin: 10px 0 4px; }
.auth-card-form input { width: 100%; padding: 11px 14px; border-radius: 12px; font-family: inherit; font-size: .92rem; }
.auth-card-form .as-pass { width: 100%; }
.auth-card-form .captcha-row { margin: 0; }
.auth-card-btn { margin-top: 18px; display: inline-block; text-align: center; text-decoration: none; width: 100%; }
.auth-card-foot { margin: 16px 0 0; font-size: .88rem; }
.auth-card-foot a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
[data-theme="dark"] .auth-card { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .auth-card h2 { color: #f0eaf7; }
.terms-dialog { position: fixed; inset: 0; margin: auto; }
.as-file-preview[hidden] { display: none !important; }

.avatar-img { object-fit: cover; display: block; }
.sb-me { display: flex !important; align-items: center; gap: 11px; padding: 10px 12px !important; margin: 0 0 16px; border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08) !important; text-decoration: none; color: #fff !important; }
.sb-me:hover, .sb-me.active { background: rgba(255,255,255,0.12) !important; }
.sb-me-avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #b98ad6, #7b4a9c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.95rem; border: 2px solid rgba(255,255,255,0.25); }
.sb-me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sb-me-text strong { font-size: 0.9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-me-text small { font-size: 0.72rem; color: #c9b5da; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

.ap-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ap-card { padding: 22px; }
.ap-title { color: var(--violet-800); font-size: 1.05rem; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }
.ap-photo { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border-color); }
.ap-avatar { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, #b98ad6, #7b4a9c); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; font-family: var(--font-heading); box-shadow: 0 0 0 4px var(--violet-100); }
.ap-photo-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ap-photo-text strong { font-size: 1.1rem; color: var(--text-dark); }
.ap-photo-btns { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.ap-photo-btns label.dm-btn { display: inline-block; }
.ap-remove { font-size: 0.85rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ap-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ap-foot { display: flex; justify-content: flex-end; margin-top: 6px; }
.role-chip { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 999px; background: var(--violet-100); color: var(--violet-800); }
.role-chip.role-co_admin { background: #e0f2fe; color: #075985; }

.st-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.st-list, .st-form { padding: 22px; }
.st-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.st-item:last-child { border-bottom: none; }
.st-item.is-off { opacity: 0.6; }
.st-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; background: #e0f2fe; color: #075985; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.st-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.st-info strong { color: var(--text-dark); }
.st-info span, .st-info small { color: var(--text-muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.st-dot.on { background: #16a34a; } .st-dot.off { background: #9ca3af; }
.st-actions { display: flex; gap: 6px; align-items: flex-start; flex-shrink: 0; }
.st-more { position: relative; }
.st-more > summary { list-style: none; }
.st-more > summary::-webkit-details-marker { display: none; }
.st-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 240px; padding: 14px; background: var(--card-bg, #fff); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 12px 30px rgba(40,20,60,.15); display: flex; flex-direction: column; gap: 12px; }
.st-pop form { display: flex; flex-direction: column; gap: 6px; }
.st-pop label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.st-pop input { padding: 8px 10px; border: 1px solid var(--border-color); border-radius: 8px; font: inherit; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.st-check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; color: var(--text-muted); margin: 4px 0 14px; }
.st-perms { background: var(--violet-50); border: 1px solid var(--violet-100); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-size: 0.86rem; }
.st-perms p { margin: 0 0 6px; font-weight: 700; color: var(--violet-800); }
.st-perms ul { margin: 0; padding-left: 18px; color: var(--text-dark); }
.rv-grid.rv-grid-single { grid-template-columns: 1fr; }

[data-theme="dark"] .st-pop { background: #2a2438; }
[data-theme="dark"] .role-chip.role-co_admin, [data-theme="dark"] .st-avatar { background: #0c3b52; color: #bae6fd; }

@media (max-width: 900px) {
  .ap-grid, .st-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .ap-fields, .st-two { grid-template-columns: 1fr; }
  .ap-photo { flex-direction: column; text-align: center; }
  .ap-photo-text { align-items: center; }
  .st-item { flex-wrap: wrap; }
  .st-actions { width: 100%; justify-content: flex-end; }
}
.ap-fields select, .st-form select { background-color: #fff; }
[data-theme="dark"] .ap-fields select, [data-theme="dark"] .st-form select { background-color: #2a2438; }
.rr-summon { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.rr-summon:last-child { border-bottom: none; }
.rr-summon p { margin: 4px 0 0; }
.rv-card-head h3 { margin: 0; }
.rp-box { border: 1px solid var(--border-color); border-radius: 12px; padding: 14px 16px 16px; }
.rp-box legend { font-weight: 600; padding: 0 6px; color: var(--text-dark); }
.rp-toggle { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rp-toggle label { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 1px solid var(--border-color); border-radius: 999px; cursor: pointer; font-size: 0.92rem; }
.rp-toggle label:has(input:checked) { background: var(--violet-50); border-color: var(--violet-400); color: var(--violet-800); font-weight: 600; }
.rp-toggle input, .rp-card input { accent-color: var(--color-primary); }
.rp-unknown .help-text { margin: 0 0 10px; }
.rp-sex { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; }
.rp-card span { display: flex; flex-direction: column; }
.rp-card small { color: var(--text-muted); font-size: 0.82rem; }
.rp-card:has(input:checked) { background: var(--violet-50); border-color: var(--violet-400); }
[data-theme="dark"] .rp-toggle label:has(input:checked), [data-theme="dark"] .rp-card:has(input:checked) { background: rgba(185,138,214,.15); }
.rp-known[hidden], .rp-unknown[hidden] { display: none !important; }
.rp-box input[type="radio"] { width: auto; height: auto; padding: 0; margin: 0; flex: none; border: none; box-shadow: none; }
.rp-toggle label, .rp-card { white-space: nowrap; }
.rp-card { justify-content: flex-start; }
@media (max-width: 420px) { .rp-sex { grid-template-columns: 1fr; } }
.rp-box label.rp-card { display: flex; flex-direction: row; align-items: center; margin: 0; }
.rp-box .rp-toggle label { margin: 0; }
.vf-idtype { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 10px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--violet-50); border: 1px solid var(--violet-100); font-size: 0.85rem; }
.vf-idtype span { background: var(--color-primary); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.vf-idtype strong { color: var(--violet-800); }
.as-form select.as-idtype { width: 100%; }
@media (min-width: 769px) { .auth-slide.right-panel-active { min-height: 930px; } }
.rpt-no { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.86rem; font-weight: 600; color: var(--violet-800); white-space: nowrap; }
.rpt-month { font-weight: 600; min-width: 170px; }
.rpt-tab-archive { margin-left: auto; color: var(--text-muted); }
.rpt-tab-archive:hover { color: var(--violet-800); }
.rpt-older { display: block; width: calc(100% - 40px); margin: 12px 20px 0; padding: 9px 14px; border: 1px dashed #f0b44c; background: #fff8eb; color: #92400e; border-radius: 10px; font: inherit; font-size: 0.88rem; font-weight: 600; text-align: left; cursor: pointer; }
.rpt-older:hover { background: #fff1d6; }
[data-theme="dark"] .rpt-older { background: rgba(240,180,76,.12); color: #fcd34d; }
.rv-no { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-weight: 700; color: var(--violet-800); }
.hs-month td { background: var(--violet-50); color: var(--violet-800); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .05em; padding: 8px 20px !important; }
.hs-month td span { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fff; font-size: 0.75rem; }
[data-theme="dark"] .hs-month td { background: rgba(185,138,214,.12); }
[data-theme="dark"] .hs-month td span { background: #2a2438; }
.rpt-no a { color: inherit; text-decoration: none; }
.rpt-no a:hover { text-decoration: underline; }
.rpt-upd-banner { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.rpt-upd-banner:hover { background: #fee2e2; }
.rpt-upd-banner .rpt-new-pulse { background: #dc2626; box-shadow: 0 0 0 0 rgba(220,38,38,.5); }
.rpt-upd-banner.active { background: #dc2626; border-color: #dc2626; color: #fff; }
a.rpt-upd-banner { display: flex; }
.rpt-upd-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: .05em; vertical-align: middle; }
.rpt-row[data-upd="1"] { box-shadow: inset 4px 0 0 #dc2626; }
.rv-summon-overdue { background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 12px 14px; margin: 6px 0; }
.rv-summon-due { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 12px 14px; margin: 6px 0; }
.rv-summon-alert { margin: 8px 0 4px; font-size: 0.88rem; color: #991b1b; font-weight: 600; }
.rv-banner-urgent { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.rv-banner-urgent a { color: inherit; font-weight: 700; }
[data-theme="dark"] .rpt-upd-banner, [data-theme="dark"] .rv-summon-overdue, [data-theme="dark"] .rv-banner-urgent { background: rgba(220,38,38,.12); border-color: rgba(220,38,38,.35); color: #fca5a5; }
[data-theme="dark"] .rv-summon-due { background: rgba(234,88,12,.12); border-color: rgba(234,88,12,.35); }
[data-theme="dark"] .rv-summon-alert { color: #fca5a5; }
.layout-admin .notif-dropdown { right: 0; left: auto; }
.rpt-upd-banner { border-left-color: #dc2626; }
.rpt-table tr.rpt-row[data-upd="1"] td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
#summons { scroll-margin-top: calc(var(--header-h, 85px) + 16px); }
.vf-choice { display: flex; flex-direction: column; gap: 6px; }
.vf-opt { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; font-size: 0.88rem; font-weight: 600; margin: 0; }
.vf-opt input, .vf-office input { width: auto; margin: 0; accent-color: var(--color-primary); }
.vf-opt-ok:has(input:checked) { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.vf-opt-visit:has(input:checked) { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.vf-opt-no:has(input:checked) { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.vf-visit-office > label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin: 4px 0 6px; }
.vf-offices { display: flex; flex-direction: column; gap: 5px; }
.vf-office { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px dashed var(--border-color); border-radius: 8px; font-size: 0.85rem; cursor: pointer; margin: 0; }
.vf-office:has(input:checked) { border-style: solid; border-color: #fdba74; background: #fff7ed; font-weight: 600; }
.vf-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.vf-chip { border: 1px solid var(--border-color); background: var(--violet-50); color: var(--violet-800); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 0.76rem; cursor: pointer; }
.vf-chip:hover { border-color: var(--violet-400); }
.vf-submit { width: 100%; }
.vf-submit:disabled { opacity: .55; cursor: not-allowed; }
[data-theme="dark"] .vf-opt-ok:has(input:checked) { background: rgba(16,185,129,.12); color: #6ee7b7; }
[data-theme="dark"] .vf-opt-visit:has(input:checked), [data-theme="dark"] .vf-office:has(input:checked) { background: rgba(234,88,12,.12); color: #fdba74; }
[data-theme="dark"] .vf-opt-no:has(input:checked) { background: rgba(220,38,38,.12); color: #fca5a5; }

.rd-hero-pro { position: relative; overflow: hidden; padding: 34px 36px; background: radial-gradient(120% 140% at 100% 0%, #9b6bc0 0%, transparent 55%), linear-gradient(135deg, var(--violet-700), var(--violet-900)); box-shadow: 0 18px 40px -18px rgba(74, 42, 96, .55); }
.rd-hero-pro::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.06); pointer-events: none; }
.rd-hero-copy { position: relative; z-index: 1; max-width: 680px; }
.rd-eyebrow { display: inline-block; font-size: 0.74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f3e8ff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: 4px 12px; border-radius: 999px; margin: 0 0 12px; }
.rd-hero-pro h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 8px; }
.rd-hero-assure { margin: 12px 0 0; font-size: 0.86rem; color: #e9d5ff; display: flex; align-items: center; gap: 8px; }
.rd-hero-assure::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #86efac; box-shadow: 0 0 0 3px rgba(134,239,172,.25); flex-shrink: 0; }
.rd-hero-pro .rd-hero-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; font-size: 1rem; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.22); }
@media (max-width: 640px) { .rd-hero-pro { padding: 26px 22px; } .rd-hero-pro h1 { font-size: 1.5rem; } .rd-hero-pro .rd-hero-btn { width: 100%; justify-content: center; } }

.cd { position: fixed; right: 20px; bottom: 0; z-index: 900; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.cd > * { pointer-events: auto; }
.cd-win { width: 340px; background: var(--surface, #fff); border: 1px solid var(--border-color); border-bottom: none; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 30px rgba(40, 20, 60, .18); display: none; flex-direction: column; overflow: hidden; }
.cd[data-state="open"] .cd-win, .cd[data-state="min"] .cd-win { display: flex; }
.cd-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; background: linear-gradient(135deg, var(--violet-700), var(--violet-900)); color: #fff; cursor: pointer; user-select: none; }
.cd-ava { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--violet-800); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex-shrink: 0; }
.cd-ava img { width: 100%; height: 100%; object-fit: cover; }
.cd-title { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.cd-title b { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-title small { font-size: 0.72rem; opacity: .8; }
.cd-unread { background: #ef4444; color: #fff; font-size: 0.7rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.cd-btn { width: 30px; height: 30px; border: none; border-radius: 8px; background: transparent; color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.cd-btn:hover { background: rgba(255,255,255,.16); }
.cd-body { display: flex; flex-direction: column; }
.cd[data-state="min"] .cd-body { display: none; }
.cd[data-state="min"] .cd-win { width: 280px; }
.cd-box { height: 340px; padding: 12px; overflow-y: auto; }
.cd .chat-pop-form { border-top: 1px solid var(--border-color); }
.cd-launch { position: relative; width: 58px; height: 58px; margin-bottom: 20px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--violet-600, #8a57b0), var(--violet-800)); color: #fff; box-shadow: 0 10px 26px rgba(74, 42, 96, .4); cursor: pointer; display: none; align-items: center; justify-content: center; transition: transform .15s ease; }
.cd-launch:hover { transform: scale(1.06); }
.cd[data-state="closed"] .cd-launch { display: inline-flex; }
.cd-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 0.7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
body:has(#chatDock) .back-to-top { bottom: 92px; }
body:has(#chatDock[data-state="open"]) .back-to-top { right: 380px; bottom: 20px; }
[data-theme="dark"] .cd-win { background: #221c2e; }
@media (max-width: 640px) {
  .cd { right: 0; left: 0; justify-content: flex-end; padding: 0 12px; }
  .cd[data-state="open"] { padding: 0; }
  .cd[data-state="open"] .cd-win { width: 100%; border-radius: 16px 16px 0 0; }
  .cd-box { height: 55vh; }
  body:has(#chatDock[data-state="open"]) .back-to-top { display: none; }
}

.cp-wrap { display: flex; justify-content: center; padding: 8px 0 24px; }
.cp { width: 100%; max-width: 860px; height: calc(100vh - var(--header-h, 85px) - 64px); min-height: 520px; display: flex; flex-direction: column; background: var(--surface, #fff); border: 1px solid var(--border-color); border-radius: 18px; box-shadow: 0 24px 60px -28px rgba(74, 42, 96, .45); overflow: hidden; }
.cp-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-color); background: linear-gradient(180deg, #fff, #fbf8fd); }
.cp-back { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--violet-800); text-decoration: none; }
.cp-back:hover { background: var(--violet-50); }
.cp-ava { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(135deg, var(--violet-600, #8a57b0), var(--violet-800)); color: #fff; font-weight: 800; font-size: 1.1rem; box-shadow: 0 0 0 3px var(--violet-100); }
.cp-ava img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.cp-ava.lg { width: 76px; height: 76px; font-size: 1.8rem; }
.cp-who { flex: 1; min-width: 0; }
.cp-who h2 { margin: 0; font-size: 1.05rem; color: var(--text-dark); }
.cp-who p { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.cp-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); flex-shrink: 0; }
.cp-lock { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--violet-800); background: var(--violet-50); border: 1px solid var(--violet-100); padding: 5px 10px; border-radius: 999px; }
.cp-body { flex: 1; overflow-y: auto; padding: 20px 22px; background: radial-gradient(circle at 1px 1px, rgba(122,75,153,.06) 1px, transparent 0) 0 0 / 18px 18px, #faf8fc; scroll-behavior: smooth; }
.cp-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; color: var(--text-muted); padding: 20px; }
.cp-empty h3 { margin: 4px 0 0; color: var(--text-dark); }
.cp-empty p { max-width: 420px; margin: 0; font-size: 0.92rem; line-height: 1.55; }
.cp-date { text-align: center; margin: 14px 0 10px; }
.cp-date span { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); background: #fff; border: 1px solid var(--border-color); padding: 3px 12px; border-radius: 999px; }
.cp-row { display: flex; margin-top: 10px; }
.cp-row.cont { margin-top: 3px; }
.cp-row.mine { justify-content: flex-end; }
.cp-bubble { max-width: min(560px, 76%); padding: 9px 14px 7px; border-radius: 18px; font-size: 0.95rem; line-height: 1.45; box-shadow: 0 1px 2px rgba(0,0,0,.05); overflow-wrap: anywhere; }
.cp-row.theirs .cp-bubble { background: #fff; color: var(--text-dark); border: 1px solid var(--border-color); border-bottom-left-radius: 6px; }
.cp-row.mine .cp-bubble { background: linear-gradient(135deg, var(--violet-600, #8a57b0), var(--violet-700)); color: #fff; border-bottom-right-radius: 6px; }
.cp-name { display: block; font-size: 0.74rem; font-weight: 700; color: var(--violet-700); margin-bottom: 2px; }
.cp-text { white-space: pre-wrap; }
.cp-time { display: block; text-align: right; font-size: 0.68rem; margin-top: 3px; opacity: .65; }
.cp-foot { border-top: 1px solid var(--border-color); padding: 10px 16px 12px; background: var(--surface, #fff); }
.cp-quick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.cp-chip { white-space: nowrap; border: 1px solid var(--violet-200, #e3cdf0); background: var(--violet-50); color: var(--violet-800); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.cp-chip:hover { background: var(--violet-100); border-color: var(--violet-400); }
.cp-form { display: flex; gap: 10px; align-items: center; }
.cp-form input { flex: 1; min-width: 0; padding: 12px 18px; border: 1.5px solid var(--border-color); border-radius: 999px; font: inherit; background: #f6f3f9; color: var(--text-dark); transition: border-color .15s ease, background .15s ease; }
.cp-form input:focus { outline: none; border-color: var(--violet-500); background: #fff; box-shadow: 0 0 0 4px var(--violet-100); }
.cp-send { width: 46px; height: 46px; border-radius: 50%; border: none; flex-shrink: 0; background: linear-gradient(135deg, var(--violet-600, #8a57b0), var(--violet-800)); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(74,42,96,.3); transition: transform .15s ease; }
.cp-send:hover { transform: scale(1.06); }
.cp-note { margin: 8px 0 0; text-align: center; font-size: 0.74rem; color: var(--text-muted); }
[data-theme="dark"] .cp { background: #221c2e; }
[data-theme="dark"] .cp-head { background: #261f33; }
[data-theme="dark"] .cp-body { background: #1b1625; }
[data-theme="dark"] .cp-row.theirs .cp-bubble, [data-theme="dark"] .cp-date span { background: #2a2438; }
[data-theme="dark"] .cp-form input { background: #2a2438; }
[data-theme="dark"] .cp-foot { background: #221c2e; }
@media (max-width: 640px) {
  .cp-wrap { padding: 0; margin: 0 -16px; }
  .cp { height: calc(100dvh - var(--header-h, 70px)); min-height: 0; border-radius: 0; border-left: none; border-right: none; }
  .cp-lock { display: none; }
  .cp-bubble { max-width: 84%; }
}

.nav-links, .nav-actions { display: flex; align-items: center; gap: 4px; }
.nav-links > a, .nav-actions > a { color: var(--text-dark); font-weight: 500; padding: 8px 14px; border-radius: 999px; font-size: 0.92rem; white-space: nowrap; text-decoration: none; transition: background .15s ease, color .15s ease; }
.nav-links > a:hover, .nav-links > a.active, .nav-actions > a:hover, .nav-actions > a.active { background: var(--violet-50); color: var(--color-primary); }
.nav-links > a.active { font-weight: 600; }
.nav-actions a.nav-cta { background: var(--color-primary); color: #fff; font-weight: 600; }
.nav-actions a.nav-cta:hover { background: var(--color-primary-dark); color: #fff; }
.nav-actions a.nav-locked { color: var(--text-muted); border: 1px dashed var(--border-color); }
[data-theme="dark"] .nav-links > a, [data-theme="dark"] .nav-actions > a { color: #e5e0f5; }
[data-theme="dark"] .nav-links > a:hover, [data-theme="dark"] .nav-links > a.active { background: #2a2438; color: #e3c9f0; }
@media (min-width: 1281px) {
  .site-header:not(.admin-bar) .navbar-inner { gap: 28px; }
  .site-header:not(.admin-bar) .main-nav { flex: 1 1 auto; flex-wrap: nowrap; justify-content: space-between; gap: 20px; min-width: 0; }
  .site-header:not(.admin-bar) .nav-links { flex: 1 1 auto; justify-content: space-evenly; max-width: 760px; margin: 0 auto; }
  .site-header:not(.admin-bar) .nav-links > a { font-size: 0.97rem; padding: 9px 18px; }
  .site-header:not(.admin-bar) .nav-actions { flex-shrink: 0; gap: 6px; }
}
@media (max-width: 1280px) {
  .nav-links, .nav-actions { display: contents; }
  .nav-links > a, .nav-actions > a { padding: 12px 16px; border-radius: var(--radius-sm); }
}
@media (min-width: 1281px) and (max-width: 1799px) {
  .site-header:not(.admin-bar) .navbar-inner { gap: 18px; padding-left: 20px; padding-right: 20px; }
  .site-header:not(.admin-bar) .nav-actions a.nav-locked, .site-header:not(.admin-bar) .nav-actions .nav-sep { display: none; }
  .site-header:not(.admin-bar) .nav-links > a { padding: 9px 14px; }
}

@media (min-width: 1281px) { .site-header:not(.admin-bar) .navbar-inner { max-width: 1680px; } }

.ni { display: block; flex-shrink: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; color: var(--violet-800); }
.icon-btn .ni { width: 20px; height: 20px; }
.sidebar-toggle .ni, .hamburger .ni { margin: auto; }
.profile-menu > a, .pm-row > span:first-child { display: flex; align-items: center; gap: 10px; }
.profile-menu > a .ni, .pm-row .ni { color: var(--violet-700); opacity: .9; }
.pm-logout .ni { color: #b42318 !important; }
.ti-moon, .ti-sun { display: inline-flex; }
.ti-sun { display: none; }
[data-theme="dark"] .ti-sun { display: inline-flex; }
[data-theme="dark"] .ti-moon { display: none; }
.theme-toggle-btn { display: inline-flex; align-items: center; justify-content: center; color: var(--violet-800); }
.nav-actions a.nav-chat { display: inline-flex; align-items: center; gap: 7px; }
.nav-actions a.nav-chat .ni { color: var(--violet-700); }
[data-theme="dark"] .icon-btn, [data-theme="dark"] .theme-toggle-btn { color: #e5e0f5; }
.logo-fallback { font-family: var(--font-heading); font-weight: 800; }
.profile-menu > a { justify-content: flex-start; }

.wg { position: relative; background: radial-gradient(60% 50% at 0% 0%, rgba(155,107,192,.10), transparent 70%), radial-gradient(50% 40% at 100% 100%, rgba(155,107,192,.08), transparent 70%); }
.wg-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-bottom: 48px; }
.wg-eyebrow { display: inline-block; font-size: 0.75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-primary); background: var(--violet-50); border: 1px solid var(--violet-100); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.wg-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; color: var(--text-dark); }
.wg-acronym { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 20px; font-size: 1rem; color: var(--text-muted); font-weight: 500; }
.wg-acronym b { color: var(--color-primary); font-weight: 800; font-size: 1.15em; }
.wg-lead { font-size: 1.08rem; line-height: 1.7; color: var(--text-dark); margin: 0 0 14px; }
.wg-text { font-size: 0.96rem; line-height: 1.7; color: var(--text-muted); margin: 0 0 22px; }
.wg-trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wg-trust li { display: flex; gap: 10px; align-items: flex-start; padding: 14px; background: var(--surface, #fff); border: 1px solid var(--border-color); border-radius: 14px; }
.wg-trust li svg { color: var(--color-primary); flex-shrink: 0; width: 22px; height: 22px; }
.wg-trust b { display: block; color: var(--text-dark); font-size: 0.92rem; }
.wg-trust span { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.wg-steps { background: linear-gradient(160deg, var(--violet-700), var(--violet-900)); color: #fff; border-radius: 22px; padding: 28px 26px; box-shadow: 0 28px 60px -30px rgba(74,42,96,.7); position: relative; overflow: hidden; }
.wg-steps::after { content: ''; position: absolute; width: 220px; height: 220px; right: -80px; top: -80px; border-radius: 50%; background: rgba(255,255,255,.07); }
.wg-steps-title { font-size: 0.78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #e9d5ff; margin: 0 0 16px; }
.wg-steps ol { list-style: none; padding: 0; margin: 0 0 22px; position: relative; }
.wg-steps li { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.wg-steps li:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: rgba(255,255,255,.2); }
.wg-num { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--violet-800); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wg-steps b { display: block; font-size: 1rem; margin: 6px 0 4px; }
.wg-steps li p { margin: 0; font-size: 0.88rem; line-height: 1.55; color: #ede4f6; }
.wg-cta { width: 100%; justify-content: center; background: #fff !important; color: var(--violet-800) !important; font-weight: 700; position: relative; z-index: 1; }
.wg-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.wg-card { position: relative; display: flex; flex-direction: column; padding: 24px 22px 20px; background: var(--surface, #fff); border: 1px solid var(--border-color); border-radius: 18px; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.wg-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(74,42,96,.45); border-color: var(--violet-300); }
.wg-ico { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; background: var(--violet-50); color: var(--color-primary); margin-bottom: 16px; }
.wg-card h3 { font-size: 1.06rem; color: var(--text-dark); margin: 0 0 8px; }
.wg-card p { font-size: 0.9rem; line-height: 1.55; color: var(--text-muted); margin: 0 0 16px; flex: 1; }
.wg-tag { align-self: flex-start; font-size: 0.72rem; font-weight: 700; color: var(--violet-700); background: var(--violet-50); border-radius: 999px; padding: 4px 10px; }
.wg-tag-open { color: #047857; background: #ecfdf5; }
.wg-card-open .wg-ico { background: #ecfdf5; color: #059669; }
[data-theme="dark"] .wg-trust li, [data-theme="dark"] .wg-card { background: #221c2e; }
@media (max-width: 1100px) { .wg-intro { grid-template-columns: 1fr; gap: 32px; } .wg-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .wg-trust { grid-template-columns: 1fr; } .wg-features { grid-template-columns: 1fr; } .wg-steps { padding: 24px 20px; } }
.wg-top { padding-top: 48px; } .wg-top + .container .ev-carousel, .wg-top ~ div > .ev-carousel { margin-bottom: 10px; }

.qx { position: fixed; left: 18px; bottom: 18px; z-index: 950; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: none; border-radius: 999px; background: #b42318; color: #fff; font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(180,35,24,.6); transition: transform .15s ease, background .15s ease; }
.qx:hover { background: #912018; transform: translateY(-2px); }
.qx:focus-visible { outline: 3px solid #fecaca; outline-offset: 2px; }
.qx-kbd { font: inherit; font-size: 0.68rem; font-weight: 700; background: rgba(255,255,255,.18); border-radius: 6px; padding: 2px 6px; }
@media (max-width: 640px) { .qx { left: 12px; bottom: 12px; padding: 10px 12px; } .qx-kbd { display: none; } }
@media print { .qx { display: none !important; } }
@media (max-width: 640px) { body:has(#chatDock[data-state="open"]) .qx { top: calc(var(--header-h, 70px) + 10px); bottom: auto; } }

.bpo-pill { font-size: 0.74rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.bpo-active { background: #ecfdf5; color: #047857; }
.bpo-expiring { background: #fff7ed; color: #c2410c; }
.bpo-expired, .bpo-revoked { background: #f3f4f6; color: #6b7280; }
.bpo-summary { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.bpo-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; color: var(--violet-800); font-size: 1.05rem; }
.bpo-dates { margin: 4px 0 2px; font-size: 0.9rem; }
.bpo-count { text-align: center; min-width: 92px; padding: 8px 10px; border-radius: 12px; background: var(--violet-50); }
.bpo-count strong { display: block; font-size: 1.7rem; line-height: 1; color: var(--violet-800); }
.bpo-count span { font-size: 0.72rem; color: var(--text-muted); }
.bpo-bar { height: 8px; border-radius: 999px; background: #eee; overflow: hidden; margin: 12px 0; }
.bpo-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #10b981); border-radius: 999px; }
.bpo-serve { margin: 8px 0; }
.bpo-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bpo-inline input[type=text], .bpo-inline input[type=datetime-local] { padding: 7px 10px; border: 1px solid var(--border-color); border-radius: 8px; font: inherit; font-size: 0.88rem; }
.bpo-actions { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.bpo-revoke > summary { list-style: none; } .bpo-revoke > summary::-webkit-details-marker { display: none; }
.bpo-revoke[open] > summary { margin-bottom: 8px; }
.bpo-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-size: 0.88rem; }
.bpo-new > summary { cursor: pointer; font-weight: 700; color: var(--violet-800); padding: 6px 0; }
.bpo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.bpo-by { display: flex; gap: 8px; } .bpo-by select { flex: 0 0 190px; }
.bpo-check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; margin: 6px 0; font-weight: 400; }
.bpo-check input { width: auto; margin-top: 3px; }
.rpt-bpo-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #047857; color: #fff; font-size: 0.66rem; font-weight: 800; letter-spacing: .05em; vertical-align: middle; }
.rr-bpo { border-left: 4px solid #10b981; }
.rr-bpo-expiring { border-left-color: #f59e0b; }
.rr-bpo-expired { border-left-color: #9ca3af; }
.rr-bpo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.rr-bpo-label { font-size: 0.72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.rr-bpo h3 { margin: 2px 0 0; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--violet-800); }
[data-theme="dark"] .bpo-count { background: #2a2438; }
@media (max-width: 640px) { .bpo-grid { grid-template-columns: 1fr; } .bpo-summary { flex-direction: column; } }

.sms-state { font-size: 0.78rem; font-weight: 800; letter-spacing: .06em; padding: 6px 14px; border-radius: 999px; }
.sms-state.on { background: #ecfdf5; color: #047857; } .sms-state.off { background: #f3f4f6; color: #6b7280; }
.sms-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.sms-stats div { background: var(--surface, #fff); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px 18px; }
.sms-stats strong { display: block; font-size: 1.6rem; color: var(--violet-800); line-height: 1.1; }
.sms-stats span { font-size: 0.82rem; color: var(--text-muted); }
.sms-test { display: flex; gap: 8px; margin: 6px 0 12px; }
.sms-test input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 10px; font: inherit; }
.sms-when { margin: 0 0 14px; padding-left: 18px; line-height: 1.7; font-size: 0.92rem; }
.sms-bubble { background: #e9e9eb; color: #111; border-radius: 18px 18px 18px 6px; padding: 10px 14px; font-size: 0.9rem; max-width: 340px; }
.sms-st { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.sms-st-sent { background: #ecfdf5; color: #047857; } .sms-st-failed { background: #fef2f2; color: #b91c1c; } .sms-st-skipped { background: #f3f4f6; color: #6b7280; }
.sms-msg { max-width: 380px; font-size: 0.85rem; color: var(--text-muted); }
[data-theme="dark"] .sms-stats div { background: #221c2e; } [data-theme="dark"] .sms-bubble { background: #2a2438; color: #e5e0f5; }
@media (max-width: 640px) { .sms-stats { grid-template-columns: 1fr; } }

.gr-head { align-items: flex-start; }
.gr-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gr-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.gr-filter select { padding: 9px 12px; border: 1px solid var(--border-color); border-radius: 10px; font: inherit; background: var(--surface, #fff); color: var(--text-dark); }
.gr-seg { display: inline-flex; background: var(--violet-50); border: 1px solid var(--violet-100); border-radius: 12px; padding: 3px; }
.gr-seg a { padding: 7px 14px; border-radius: 9px; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.gr-seg a.on { background: var(--surface, #fff); color: var(--violet-800); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.gr-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.gr-kpi { background: var(--surface, #fff); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.gr-kpi span { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.gr-kpi strong { font-size: 2rem; line-height: 1.1; color: var(--text-dark); font-family: var(--font-heading); }
.gr-kpi small { font-size: 0.8rem; color: var(--text-muted); }
.gr-card { padding: 20px 22px; margin-bottom: 18px; }
.gr-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.gr-card-head h3 { margin: 0; font-size: 1rem; color: var(--violet-800); }
.gr-chip { font-size: 0.78rem; font-weight: 700; background: var(--violet-50); color: var(--violet-800); padding: 2px 10px; border-radius: 999px; }
.gr-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; height: 220px; align-items: end; padding-top: 18px; border-bottom: 1px solid var(--border-color); }
.gr-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.gr-col-bar { width: 70%; max-width: 44px; background: var(--violet-400, #a777c9); border-radius: 4px 4px 0 0; transition: background .15s ease; }
.gr-col:hover .gr-col-bar, .gr-col.on .gr-col-bar { background: var(--violet-700); }
.gr-col-val { font-size: 0.78rem; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.gr-col-lab { position: absolute; bottom: -24px; font-size: 0.75rem; color: var(--text-muted); }
.gr-cols { margin-bottom: 26px; }
.gr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.gr-grid .gr-card { margin-bottom: 0; }
.gr-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gr-bars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; }
.gr-bar-lab { font-size: 0.88rem; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-bar-track { height: 12px; background: var(--violet-50); border-radius: 999px; overflow: hidden; }
.gr-bar { display: block; height: 100%; background: var(--violet-600, #8a57b0); border-radius: 999px; }
.gr-bar-alt { background: #0f766e; }
.gr-bar-val { font-size: 0.88rem; font-weight: 700; color: var(--text-dark); min-width: 54px; text-align: right; }
.gr-bar-val small { font-weight: 500; color: var(--text-muted); }
.gr-hint { margin: 14px 0 0; }
.gr-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.gr-table td { padding: 9px 4px; border-bottom: 1px solid var(--border-color); }
.gr-table tr:last-child td { border-bottom: none; }
.gr-table .num { text-align: right; font-weight: 700; white-space: nowrap; }
.gr-table .muted { color: var(--text-muted); font-weight: 500; }
.gr-foot { margin: 18px 0 0; font-size: 0.8rem; color: var(--text-muted); text-align: center; }
[data-theme="dark"] .gr-kpi, [data-theme="dark"] .gr-filter select { background: #221c2e; }
@media (max-width: 1100px) { .gr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .gr-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .gr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gr-cols { gap: 3px; } .gr-col-lab { font-size: 0.62rem; } }
@media print {
  .site-header, .sidebar, .sidebar-overlay, .site-footer, .no-print, .qx, .cd, .back-to-top, .flash-wrap { display: none !important; }
  .layout-admin main > .container, .gr { margin-left: 0 !important; padding: 0 !important; }
  body { background: #fff !important; }
  .gr-card, .gr-kpi { break-inside: avoid; box-shadow: none !important; }
  .gr-kpis { grid-template-columns: repeat(5, 1fr); }
  .gr-grid { grid-template-columns: 1fr 1fr; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.gr-print-head { display: none; }
@media print {
  html body.layout-admin main, html body main#main-content { margin: 0 !important; padding: 0 !important; }
  html body.layout-admin main > .container.gr { margin: 0 auto !important; max-width: 100% !important; width: 100% !important; }
  .gr-print-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid #4a2a60; padding-bottom: 8px; margin-bottom: 14px; font-size: 0.9rem; }
  .gr-print-head span { color: #555; }
  .gr-cols { height: 170px; }
}
.bk-danger { color: #b42318 !important; border-color: #fecaca !important; }
.bk-danger:hover { background: #fef2f2 !important; }
.bk-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.bk-row-actions form { margin: 0; }
.bk-row-actions a.dm-btn { text-decoration: none; }

.pwa-install { position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 960;
  width: min(460px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--surface, #fff); color: var(--text-color, #241a2e); border: 1px solid var(--border-color, #e7e0ee); border-radius: 16px;
  box-shadow: 0 18px 40px -18px rgba(63, 35, 82, .45); animation: pwaIn .25s ease; }
.pwa-install[hidden] { display: none; }
.pwa-ico { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.pwa-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pwa-text strong { font-size: .92rem; }
.pwa-text span { font-size: .8rem; color: var(--text-muted, #6b6178); line-height: 1.35; }
.pwa-close { border: 0; background: transparent; color: var(--text-muted, #6b6178); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 2px 4px; }
[data-theme="dark"] .pwa-install { background: #221c2e; border-color: #3a3049; color: #f1ecf6; }
@keyframes pwaIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media print { .pwa-install { display: none !important; } }
@media (max-width: 900px) { .pwa-install { bottom: 74px; } }
.is-pwa body { padding-bottom: env(safe-area-inset-bottom); }

.rs-page { max-width: 980px; }
.rs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.rs-stats > div { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.rs-stats strong { font-family: var(--font-heading); font-size: 1.5rem; color: var(--violet-800); line-height: 1.1; }
.rs-stats span { font-size: .82rem; color: var(--text-muted); }
.rs-section { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 26px 0 12px; font-weight: 700; }
.rs-card { display: flex; gap: 18px; background: var(--surface); border: 1px solid var(--border-color); border-radius: 18px; padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.rs-featured { border: 1.5px solid var(--violet-300); box-shadow: 0 16px 36px -20px rgba(84, 48, 107, .45); background: linear-gradient(180deg, var(--violet-50), var(--surface) 55%); }
.rs-date { flex-shrink: 0; align-self: flex-start; width: 76px; padding-bottom: 6px; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; align-items: center; background: var(--surface); border: 1px solid var(--border-color); text-align: center; }
.rs-mon { width: 100%; background: var(--violet-700); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .1em; padding: 4px 0; }
.rs-day { font-family: var(--font-heading); font-size: 1.85rem; font-weight: 700; color: var(--text-dark); line-height: 1.15; margin-top: 4px; }
.rs-yr { font-size: .72rem; color: var(--text-muted); }
.rs-done .rs-mon, .rs-moved .rs-mon, .rs-off .rs-mon { background: #8a8296; }
.rs-body { flex: 1; min-width: 0; }
.rs-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.rs-pill { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.rs-pill-up { background: #e7f6ee; color: #18794e; }
.rs-pill-wait { background: #fff4e5; color: #9a5b00; }
.rs-pill-done { background: var(--violet-100); color: var(--violet-800); }
.rs-pill-moved { background: #eef2ff; color: #3646a8; }
.rs-pill-off { background: #f3f3f5; color: #6b6b75; }
.rs-when { font-size: .8rem; font-weight: 700; color: var(--violet-700); }
.rs-seq { font-size: .78rem; color: var(--text-muted); margin-left: auto; }
.rs-title { font-size: 1.12rem; margin: 0 0 4px; color: var(--text-dark); }
.rs-sched { color: var(--text-dark); font-size: .93rem; margin: 0 0 14px; }
.rs-sched strong { font-weight: 600; }
.rs-dot { color: var(--text-muted); margin: 0 6px; }
.rs-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; margin: 0; padding: 14px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.rs-details > div { min-width: 0; }
.rs-details .rs-wide { grid-column: 1 / -1; }
.rs-details dt { font-size: .74rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.rs-details dd { margin: 0; font-size: .92rem; color: var(--text-dark); overflow-wrap: anywhere; }
.rs-att { display: inline-block; font-size: .84rem; font-weight: 600; padding: 3px 10px; border-radius: 8px; }
.rs-att-ok { background: #e7f6ee; color: #18794e; }
.rs-att-warn { background: #fff4e5; color: #9a5b00; }
.rs-att-bad { background: #fdecec; color: #b42318; }
.rs-note { margin-top: 14px; background: var(--violet-50); border-left: 3px solid var(--violet-500); border-radius: 8px; padding: 10px 14px; }
.rs-note strong { font-size: .82rem; color: var(--violet-800); }
.rs-note p { margin: 4px 0 0; font-size: .92rem; color: var(--text-dark); }
.rs-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rs-bring { background: var(--surface); border: 1px dashed var(--violet-300); border-radius: 14px; padding: 14px 18px; margin: -4px 0 14px; }
.rs-bring strong { font-size: .86rem; color: var(--violet-800); }
.rs-bring ul { margin: 8px 0 0; padding-left: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; font-size: .9rem; color: var(--text-dark); }
.rs-empty { text-align: center; padding: 48px 24px; }
.rs-empty-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--violet-100); color: var(--violet-700); }
.rs-empty h3 { margin: 0 0 6px; }
.rs-empty p { color: var(--text-muted); max-width: 440px; margin: 0 auto; }
[data-theme="dark"] .rs-card, [data-theme="dark"] .rs-stats > div, [data-theme="dark"] .rs-bring, [data-theme="dark"] .rs-date { background: #221c2e; border-color: #3a3049; }
[data-theme="dark"] .rs-featured { background: linear-gradient(180deg, #2c2240, #221c2e 55%); border-color: #5b4475; }
[data-theme="dark"] .rs-note { background: #2a2238; }
[data-theme="dark"] .rs-page .rv-no, [data-theme="dark"] .rs-when { color: #d9c6ec; }
[data-theme="dark"] .rs-title, [data-theme="dark"] .rs-sched, [data-theme="dark"] .rs-details dd, [data-theme="dark"] .rs-day, [data-theme="dark"] .rs-note p, [data-theme="dark"] .rs-bring ul { color: #f1ecf6; }
[data-theme="dark"] .rs-stats strong, [data-theme="dark"] .rs-note strong, [data-theme="dark"] .rs-bring strong { color: #d9c6ec; }
@media (max-width: 760px) {
  .rs-card { flex-direction: column; gap: 14px; padding: 16px; }
  .rs-date { flex-direction: row; width: auto; height: auto; gap: 8px; padding: 0 12px 0 0; align-items: center; align-self: flex-start; }
  .rs-mon { width: auto; padding: 8px 10px; }
  .rs-day { font-size: 1.2rem; margin: 0; }
  .rs-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-bring ul { grid-template-columns: 1fr; }
  .rs-seq { margin-left: 0; width: 100%; }
}
@media (max-width: 420px) { .rs-details { grid-template-columns: 1fr; } .rs-stats { gap: 8px; } .rs-stats > div { padding: 10px 12px; } }

.lp-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 4px; }
.lp-type { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border-color); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--text-dark); transition: border-color .15s ease, background .15s ease; }
.lp-box .lp-types label.lp-type { display: flex; flex-direction: row; margin: 0; }
.lp-type input { position: absolute; opacity: 0; pointer-events: none; }
.lp-type:hover { border-color: var(--violet-300); }
.lp-type:has(input:checked) { border-color: var(--violet-600); background: var(--violet-50); color: var(--violet-800); box-shadow: 0 0 0 3px rgba(122, 75, 153, .12); }
.lp-type:has(input:focus-visible) { outline: 3px solid var(--violet-300); outline-offset: 2px; }
.lp-ico { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--violet-100); color: var(--violet-700); }
.lp-fields { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-color); }
.lp-fields[hidden] { display: none; }
.lp-addr { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; }
.lp-opt { color: var(--text-muted); font-weight: 400; }
.lp-req[hidden], .lp-opt[hidden] { display: none; }
[data-theme="dark"] .lp-type { background: #221c2e; border-color: #3a3049; color: #f1ecf6; }
[data-theme="dark"] .lp-type:has(input:checked) { background: #2c2240; border-color: #9867b8; color: #e9dcf5; }
[data-theme="dark"] .lp-ico { background: #3a2c4f; color: #d9c6ec; }
@media (max-width: 640px) { .lp-types { grid-template-columns: 1fr; } .lp-addr { grid-template-columns: 1fr 1fr; } .lp-street { grid-column: 1 / -1; } }

.loc { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.loc-chips { display: inline-flex; gap: 6px; }
.loc-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 9px; border-radius: 8px; background: var(--violet-100); color: var(--violet-800); font-weight: 700; font-size: .9rem; }
.loc-chip small { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.loc-street { color: var(--text-dark); }
.loc-landmark { color: var(--text-dark); font-weight: 600; }
.loc-street + .loc-landmark::before, .loc-chips + .loc-landmark::before { content: '·'; margin-right: 8px; color: var(--text-muted); font-weight: 400; }
.loc-type { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--gray-light); color: var(--text-muted); }
[data-theme="dark"] .loc-chip { background: #3a2c4f; color: #e9dcf5; }
[data-theme="dark"] .loc-street, [data-theme="dark"] .loc-landmark { color: #f1ecf6; }
[data-theme="dark"] .loc-type { background: #2a2238; color: #b3a9bf; }

[data-theme="dark"] .cp-row.theirs .cp-bubble { background: #322a42; color: #f1ecf6; border-color: #463a5a; }
[data-theme="dark"] .cp-row.theirs .cp-time { color: #c9bfd6; opacity: .8; }
[data-theme="dark"] .cp-name { color: #d9c6ec; }
[data-theme="dark"] .cp-who h2 { color: #f1ecf6; }
[data-theme="dark"] .cp-who p { color: #b3a9bf; }
[data-theme="dark"] .cp-back { color: #d9c6ec; }
[data-theme="dark"] .cp-back:hover { background: #322a42; }
[data-theme="dark"] .cp-date span { color: #b3a9bf; border-color: #3a3049; }
[data-theme="dark"] .cp-form input { color: #f1ecf6; border-color: #463a5a; }
[data-theme="dark"] .cp-form input::placeholder { color: #9a90a8; }
[data-theme="dark"] .chat-bubble.theirs { background: #322a42; color: #f1ecf6; border-color: #463a5a; }
[data-theme="dark"] .chat-bubble.theirs .chat-time { color: #c9bfd6; }
[data-theme="dark"] .chat-date-label { color: #b3a9bf; }

.layout-user main > .container.rf-page[style], main > .container.rf-page { max-width: 760px; margin-left: auto !important; margin-right: auto !important; }
.rf-heading { color: var(--violet-800); margin-bottom: 18px; }
.rf-card { max-width: none; width: 100%; }
[data-theme="dark"] .rf-heading { color: #e9dcf5; }

main > .container.dt-page, .layout-user main > .container.dt-page { max-width: 880px; margin: 28px auto 40px !important; }
.layout-admin main > .container.dt-page { max-width: 880px; margin-right: auto; }
.dt-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--violet-700); text-decoration: none; margin-bottom: 14px; }
.dt-back:hover { text-decoration: underline; }
.dt-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-md); }
.dt-media { display: block; background: #f3eff6; }
.dt-media img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: linear-gradient(135deg, var(--violet-100), var(--violet-50)); }
.dt-video .video-frame { border-radius: 0; margin: 0; }
.dt-body { padding: 26px 30px 30px; }
.dt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dt-tag { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--violet-100); color: var(--violet-800); }
.dt-state { font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.dt-state-upcoming { background: #e7f6ee; color: #18794e; }
.dt-state-today { background: #fff4e5; color: #9a5b00; }
.dt-state-past { background: #f3f3f5; color: #6b6b75; }
.dt-title { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.2; margin: 0 0 8px; color: var(--text-dark); }
.dt-byline { color: var(--text-muted); font-size: .92rem; margin: 0 0 14px; }
.dt-byline strong { color: var(--text-dark); font-weight: 600; }
.dt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 18px; }
.dt-fact { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--violet-50); }
.dt-fact small { display: block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.dt-fact strong { display: block; font-size: .95rem; color: var(--text-dark); }
.dt-ico { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--violet-700); border: 1px solid var(--border-color); }
.dt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.dt-share { display: inline-flex; align-items: center; gap: 6px; }
.dt-text { font-size: 1.02rem; line-height: 1.8; color: var(--text-dark); padding-top: 18px; border-top: 1px solid var(--border-color); overflow-wrap: anywhere; }
.dt-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 18px; padding: 16px 20px; border-radius: 16px; background: linear-gradient(135deg, var(--violet-700), var(--violet-900)); color: #fff; }
.dt-cta > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.dt-cta span { font-size: .88rem; opacity: .85; }
.dt-cta .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.dt-more-title { font-size: 1.05rem; margin: 30px 0 12px; color: var(--text-dark); }
.dt-more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dt-mini { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--text-dark); transition: border-color .15s ease, transform .15s ease; }
.dt-mini:hover { border-color: var(--violet-300); transform: translateY(-2px); }
.dt-mini img, .dt-mini-ph { flex-shrink: 0; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.dt-mini-ph { display: grid; place-items: center; background: var(--violet-100); color: var(--violet-700); font-weight: 800; font-size: 1.3rem; }
.dt-mini > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dt-mini small { font-size: .74rem; color: var(--text-muted); }
.dt-mini strong { font-size: .9rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.dt-link { display: block; text-decoration: none; color: inherit; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.dt-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--violet-300); }
a.dt-link:focus-visible { outline: 3px solid var(--violet-300); outline-offset: 3px; }
.dt-readmore { display: inline-block; margin-top: 8px; font-size: .86rem; font-weight: 700; color: var(--violet-700); text-decoration: none; }
.dt-title-link { color: inherit; text-decoration: none; }
.dt-title-link:hover { color: var(--violet-700); text-decoration: underline; }
a.rd-item { text-decoration: none; color: inherit; border-radius: 10px; }
a.rd-item:hover strong { color: var(--violet-700); }
[data-theme="dark"] .dt-card, [data-theme="dark"] .dt-mini { background: #221c2e; border-color: #3a3049; }
[data-theme="dark"] .dt-fact { background: #2a2238; border-color: #3a3049; }
[data-theme="dark"] .dt-ico { background: #221c2e; border-color: #3a3049; color: #d9c6ec; }
[data-theme="dark"] .dt-title, [data-theme="dark"] .dt-text, [data-theme="dark"] .dt-fact strong, [data-theme="dark"] .dt-byline strong, [data-theme="dark"] .dt-mini, [data-theme="dark"] .dt-more-title { color: #f1ecf6; }
[data-theme="dark"] .dt-back, [data-theme="dark"] .dt-readmore { color: #d9c6ec; }
[data-theme="dark"] .dt-tag { background: #3a2c4f; color: #e9dcf5; }
[data-theme="dark"] .dt-media, [data-theme="dark"] .dt-media img { background: #1b1625; }
@media (max-width: 760px) {
  main > .container.dt-page, .layout-user main > .container.dt-page { margin: 16px auto 28px !important; }
  .dt-body { padding: 20px 18px 22px; }
  .dt-more { grid-template-columns: 1fr; }
  .dt-card { border-radius: 18px; }
}
[data-theme="dark"] .dt-text, [data-theme="dark"] .dt-card { border-color: #3a3049; }

.en-note { margin: 0 20px 4px; padding: 10px 14px; border-radius: 10px; background: var(--violet-50); border: 1px solid var(--border-color); font-size: .9rem; color: var(--text-dark); }
.en-note-ok { background: #e7f6ee; border-color: #b7e4cb; color: #14532d; }
.en-done { border-color: #b7e4cb; }
.rv-banner-endorse a { font-weight: 700; margin-left: 6px; white-space: nowrap; }
[data-theme="dark"] .en-note { background: #2a2238; border-color: #3a3049; color: #f1ecf6; }
[data-theme="dark"] .en-note-ok { background: #173326; border-color: #24543c; color: #c9f0d9; }

.sf-grid.sf-grid-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.sf-grid-3 .sf-step2 { padding: 16px 18px; border-radius: 14px; gap: 8px; }
.sf-grid-3 .sf2-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sf-grid-3 .sf2-count { margin-top: 6px; font-size: 2rem; }
.sf-grid-3 .sf2-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.35; }
.sf-grid-3 .sf-processing { --sf-color: #2563eb; --sf-soft: #eff4ff; }
.sf-grid-3 .sf-completed { --sf-color: #16a34a; --sf-soft: #ecfdf3; }
.sf-grid-3 .sf-new-card {
  border: none; color: #fff; padding: 20px 22px;
  background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.16) 0 70px, transparent 71px), linear-gradient(135deg, var(--violet-600, #7a4b99), var(--violet-900, #3f2352));
  box-shadow: 0 16px 34px -18px rgba(84, 48, 107, .75);
}
.sf-grid-3 .sf-new-card .sf2-num { background: #fff; color: var(--violet-800); }
.sf-grid-3 .sf-new-card .sf2-label { color: #fff; font-size: 1.05rem; }
.sf-grid-3 .sf-new-card .sf2-count { color: #fff; font-size: 3.2rem; margin-top: 4px; }
.sf-grid-3 .sf-new-card .sf2-desc { color: rgba(255,255,255,.82); }
.sf2-unread { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 999px; }
.sf2-unread[hidden] { display: none; }
.sf2-unread b { color: #fde68a; }
.sf2-cta { margin-top: 4px; font-size: .86rem; font-weight: 700; color: #fff; opacity: .95; }
.sf-grid-3 .sf-new-card:hover { box-shadow: 0 20px 40px -18px rgba(84, 48, 107, .9); }
.sf-grid-3 .sf-new-card.sf-hot { animation: sfGlow 2.4s ease-in-out infinite; }
@keyframes sfGlow { 0%, 100% { box-shadow: 0 16px 34px -18px rgba(84,48,107,.75), 0 0 0 0 rgba(152,103,184,.0); } 50% { box-shadow: 0 16px 34px -18px rgba(84,48,107,.75), 0 0 0 6px rgba(152,103,184,.28); } }
@media (prefers-reduced-motion: reduce) { .sf-grid-3 .sf-new-card.sf-hot { animation: none; } }
[data-theme="dark"] .sf-grid-3 .sf-new-card { background: radial-gradient(circle at 92% 10%, rgba(255,255,255,.08) 0 70px, transparent 71px), linear-gradient(135deg, #6b3f8a, #2c1a3b); border: 1px solid #5b4475; }
[data-theme="dark"] .sf-grid-3 .sf-new-card .sf2-label { color: #fff; }
[data-theme="dark"] .sf-grid-3 .sf2-desc { color: #b3a9bf; }
[data-theme="dark"] .sf-grid-3 .sf-new-card .sf2-desc { color: rgba(255,255,255,.8); }
@media (max-width: 760px) {
  .sf-grid.sf-grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sf-grid-3 .sf-li-new { grid-column: 1 / -1; }
  .sf-grid-3 .sf-new-card .sf2-count { font-size: 2.6rem; }
}
.sf-grid-3 .sf-new-card .sf-notif { display: none !important; }

.vf-list { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 22px; }
.av-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, border-color .2s ease; }
.av-card.av-open { border-color: var(--violet-300); box-shadow: var(--shadow-md); }
.av-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.av-ava { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet-500), var(--violet-800)); }
.av-who { flex: 1; min-width: 200px; }
.av-who h3 { margin: 0; font-size: 1.1rem; color: var(--text-dark); }
.av-who p { margin: 2px 0 0; font-size: .84rem; color: var(--text-muted); }
.av-wait { font-weight: 600; color: var(--violet-700); }
.av-wait-long { color: #b45309; }
.av-idtype { display: inline-flex; flex-direction: column; align-items: flex-end; padding: 6px 12px; border-radius: 12px; background: var(--violet-50); border: 1px solid var(--violet-200); font-weight: 700; color: var(--violet-800); font-size: .9rem; }
.av-idtype small { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.av-body { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.av-id { position: relative; }
.av-id a { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-color); background: var(--gray-light); }
.av-id img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .25s ease; }
.av-id a:hover img { transform: scale(1.04); }
.av-zoom { position: absolute; left: 8px; bottom: 8px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #fff; background: rgba(30, 18, 40, .7); opacity: 0; transition: opacity .2s ease; }
.av-id a:hover .av-zoom, .av-id a:focus-visible .av-zoom { opacity: 1; }
.av-noid { aspect-ratio: 16 / 10; border: 1.5px dashed var(--border-color); border-radius: 14px; display: grid; place-items: center; text-align: center; padding: 12px; color: var(--text-muted); font-size: .86rem; }
.av-noid-err { display: none; }
.av-id-broken a { display: none; }
.av-id-broken .av-noid-err { display: grid; }
.av-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.av-info > div { min-width: 0; }
.av-info .av-wide { grid-column: 1 / -1; }
.av-info dt { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 3px; }
.av-info dd { margin: 0; color: var(--text-dark); font-size: .95rem; overflow-wrap: anywhere; }
.av-blk { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: var(--violet-100); color: var(--violet-800); font-weight: 700; font-size: .82rem; }
.av-note { background: var(--violet-50); border-left: 3px solid var(--violet-400); padding: 6px 10px; border-radius: 6px; }
.av-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-color); }
.av-btn { flex: 1 1 170px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 12px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, background .15s ease; }
.av-btn:hover { transform: translateY(-1px); }
.av-btn:focus-visible { outline: 3px solid var(--violet-300); outline-offset: 2px; }
.av-btn-ok { background: #ecfdf3; color: #067647; border-color: #a6f4c5; }
.av-btn-visit { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.av-btn-no { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.av-btn-ok.is-on { background: #16a34a; color: #fff; border-color: #16a34a; box-shadow: 0 8px 18px -10px #16a34a; }
.av-btn-visit.is-on { background: #ea580c; color: #fff; border-color: #ea580c; box-shadow: 0 8px 18px -10px #ea580c; }
.av-btn-no.is-on { background: #dc2626; color: #fff; border-color: #dc2626; box-shadow: 0 8px 18px -10px #dc2626; }
.av-panel { margin-top: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid; animation: avIn .18s ease; }
.av-panel[hidden] { display: none !important; }
@keyframes avIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.av-panel-ok { background: #f6fef9; border-color: #a6f4c5; }
.av-panel-visit { background: #fffaf5; border-color: #fed7aa; }
.av-panel-no { background: #fffbfa; border-color: #fecdca; }
.av-panel-title { margin: 0; font-weight: 800; font-size: 1rem; color: var(--text-dark); }
.av-panel-help { margin: 4px 0 12px; font-size: .86rem; color: var(--text-muted); }
.av-label { display: block; margin: 10px 0 6px; font-size: .84rem; font-weight: 700; color: var(--text-dark); }
.av-label small { font-weight: 400; color: var(--text-muted); }
.av-req { color: #e11d48; }
.av-panel textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 10px; font: inherit; font-size: .92rem; resize: vertical; background: var(--surface); color: var(--text-dark); }
.av-panel textarea:focus { outline: none; border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); }
.av-offices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.av-office { position: relative; display: flex; align-items: center; padding: 10px 12px; border: 1.5px solid #fed7aa; border-radius: 10px; background: var(--surface); font-size: .86rem; font-weight: 600; cursor: pointer; margin: 0; line-height: 1.3; }
.av-office input { position: absolute; opacity: 0; pointer-events: none; }
.av-office:has(input:checked) { background: #ea580c; border-color: #ea580c; color: #fff; }
.av-office:has(input:focus-visible) { outline: 3px solid #fdba74; outline-offset: 2px; }
.av-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.av-chip { border: 1px dashed var(--border-color); background: var(--surface); color: var(--text-dark); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .8rem; cursor: pointer; }
.av-chip:hover { border-style: solid; border-color: var(--violet-400); color: var(--violet-800); }
.av-panel-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.av-submit-ok { background: #16a34a !important; color: #fff !important; border-color: #16a34a !important; }
.av-submit-visit { background: #ea580c !important; color: #fff !important; border-color: #ea580c !important; }
.av-submit-no { background: #dc2626 !important; color: #fff !important; border-color: #dc2626 !important; }
@media (max-width: 900px) { .av-body { grid-template-columns: 1fr; } .av-id { max-width: 420px; } .av-offices { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .av-info { grid-template-columns: 1fr; } .av-idtype { align-items: flex-start; } .av-panel-foot { flex-direction: column-reverse; } .av-panel-foot .dm-btn { width: 100%; } }
[data-theme="dark"] .av-card { background: #221c2e; border-color: #3a3049; }
[data-theme="dark"] .av-who h3, [data-theme="dark"] .av-info dd, [data-theme="dark"] .av-panel-title, [data-theme="dark"] .av-label, [data-theme="dark"] .av-chip { color: #f1ecf6; }
[data-theme="dark"] .av-idtype { background: #2a2238; border-color: #463a5a; color: #e9dcf5; }
[data-theme="dark"] .av-note, [data-theme="dark"] .av-blk { background: #2a2238; color: #e9dcf5; }
[data-theme="dark"] .av-panel-ok { background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.4); }
[data-theme="dark"] .av-panel-visit { background: rgba(234,88,12,.08); border-color: rgba(234,88,12,.4); }
[data-theme="dark"] .av-panel-no { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.4); }
[data-theme="dark"] .av-btn-ok:not(.is-on) { background: rgba(22,163,74,.12); color: #86efac; border-color: rgba(22,163,74,.4); }
[data-theme="dark"] .av-btn-visit:not(.is-on) { background: rgba(234,88,12,.12); color: #fdba74; border-color: rgba(234,88,12,.4); }
[data-theme="dark"] .av-btn-no:not(.is-on) { background: rgba(220,38,38,.12); color: #fca5a5; border-color: rgba(220,38,38,.4); }
[data-theme="dark"] .av-panel textarea, [data-theme="dark"] .av-office, [data-theme="dark"] .av-chip { background: #1b1625; border-color: #463a5a; }

.av-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.av-row { display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 12px; background: var(--surface); transition: border-color .15s ease, box-shadow .15s ease; }
.av-row:hover { border-color: var(--violet-300); box-shadow: var(--shadow-sm); }
.av-row .av-ava { width: 38px; height: 38px; font-size: .82rem; }
.av-row-name { min-width: 0; }
.av-row-name strong { display: block; color: var(--text-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-row-name small, .av-row-meta small { display: block; color: var(--text-muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-row-meta { min-width: 0; font-size: .88rem; color: var(--text-dark); }
.av-row-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-view { white-space: nowrap; }
.av-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: none; border-radius: 18px; background: transparent; overflow: visible; }
.av-dialog::backdrop { background: rgba(20, 12, 30, .55); backdrop-filter: blur(2px); }
.av-dialog .av-card { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.av-x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--surface); color: var(--text-dark); font-size: 1.2rem; line-height: 1; cursor: pointer; z-index: 2; }
.av-x:hover { background: var(--gray-light); }
.av-dialog .av-head { padding-right: 44px; }
@media (max-width: 760px) {
  .av-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .av-row-meta { display: none; }
}
[data-theme="dark"] .av-row { background: #221c2e; border-color: #3a3049; }
[data-theme="dark"] .av-row-name strong, [data-theme="dark"] .av-row-meta { color: #f1ecf6; }
[data-theme="dark"] .av-x { background: #2a2238; border-color: #3a3049; color: #f1ecf6; }

button.av-row { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.av-row:focus-visible { outline: 3px solid var(--violet-300); outline-offset: 2px; }
button.av-row:active { transform: scale(.995); }
.av-view { display: inline-flex; align-items: center; gap: 4px; font-size: .86rem; font-weight: 700; color: var(--violet-700); }
button.av-row:hover .av-view { color: var(--violet-900); }
[data-theme="dark"] .av-view { color: #d9c6ec; }

@media (max-width: 760px) {
  .rpt-table-wrap:has(.hs-table) { overflow: visible; }
  .rpt-table.hs-table { min-width: 0 !important; width: 100%; display: block; }
  .hs-table thead { display: none; }
  .hs-table tbody { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
  .hs-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; padding: 14px; border: 1px solid var(--border-color); border-radius: 14px; background: var(--surface); }
  .hs-table tr.hs-month { display: flex; align-items: center; padding: 4px 2px 0; border: none; background: none; }
  .hs-table tr.hs-month td { background: none !important; padding: 0 !important; color: var(--violet-800); }
  .hs-table td { display: block; padding: 0 !important; border: none !important; font-size: .92rem; min-width: 0; overflow-wrap: anywhere; }
  .hs-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
  .hs-table td.hs-c-no::before, .hs-table td.hs-c-status::before { display: none; }
  .hs-table td.hs-c-no { font-size: 1rem; }
  .hs-table td.hs-c-status { text-align: right; }
  .hs-table td.hs-c-status .rpt-time { display: block; margin-top: 4px; }
  .hs-table td.hs-c-name, .hs-table td.hs-c-wide { grid-column: 1 / -1; }
  .hs-table td.hs-c-name { font-weight: 700; }
  .hs-table tr.rpt-row td:last-child { padding-right: 0 !important; }
  .hs-table tr.rpt-row td:last-child::after { display: none; }
  .hs-table .hs-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
  .hs-table tr.rpt-empty { display: block; text-align: center; color: var(--text-muted); }
  [data-theme="dark"] .hs-table tr { background: #221c2e; border-color: #3a3049; }
  [data-theme="dark"] .hs-table tr.hs-month { background: none; }
  [data-theme="dark"] .hs-table tr.hs-month td { color: #d9c6ec; }
}

.terms-progress { height: 3px; background: var(--border-color); }
.terms-progress span { display: block; height: 100%; width: 0; background: var(--color-primary); transition: width .15s ease; }
.terms-dialog-foot { align-items: center; }
.terms-hint { margin-right: auto; font-size: .82rem; color: var(--text-muted); }
.terms-hint.ok { color: #16a34a; font-weight: 600; }
#termsAgree:disabled { opacity: .5; cursor: not-allowed; }
.as-consent.agreed span { color: var(--text-dark); }
[data-theme="dark"] .terms-progress { background: #362f4a; }
[data-theme="dark"] .as-consent.agreed span { color: #e5e0f5; }

.ra-page { max-width: 980px; }
.ra-form .section-title { margin: 18px 0 8px; }
.ra-form .section-title:first-child { margin-top: 0; }
.ra-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.ra-grid-4 { grid-template-columns: 1.3fr 1fr 1.3fr .6fr; }
.ra-checks { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 4px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.ra-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; margin: 0; }
.ra-check input { width: 18px !important; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--color-primary); }
.ra-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.ra-foot .help-text { margin: 0; flex: 1; min-width: 240px; }
.ra-slip { max-width: 560px; }
.ra-slip-ok { margin: 0 0 6px; color: #16a34a; font-weight: 700; }
.ra-slip h3 { margin: 0 0 14px; }
.ra-slip dl { display: grid; grid-template-columns: 190px 1fr; gap: 10px 14px; margin: 0 0 14px; align-items: center; }
.ra-slip dt { color: var(--text-muted); font-size: .9rem; }
.ra-slip dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ra-temp { font-family: Consolas, Menlo, monospace; font-size: 1.5rem; letter-spacing: 3px; color: var(--violet-800); background: var(--violet-50); border: 1px solid var(--violet-200); border-radius: 10px; padding: 6px 12px; justify-self: start; }
.ra-slip-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .ra-grid, .ra-grid-4 { grid-template-columns: 1fr; } .ra-slip dl { grid-template-columns: 1fr; gap: 2px; } }
@media print {
  body * { visibility: hidden; }
  #raSlip, #raSlip * { visibility: visible; }
  #raSlip { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; border: 1px dashed #000; }
  .ra-slip-actions { display: none !important; }
}
[data-theme="dark"] .ra-temp { background: #2a2238; border-color: #463a5a; color: #e9dcf5; }


.terms-dialog { width: min(760px, calc(100vw - 24px)); max-height: min(88vh, 920px); border-radius: 22px; box-shadow: 0 30px 80px rgba(30,14,48,.45); background: #fbf9fd; }
.terms-dialog::backdrop { background: rgba(18,10,28,.6); backdrop-filter: blur(3px); }
.terms-dialog[open] { animation: termsIn .22s ease-out; }
@keyframes termsIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.terms-dialog-head { padding: 20px 22px; border: 0; background: linear-gradient(135deg, #4a2268 0%, #7b3fa8 60%, #a35cc9 100%); color: #fff; }
.terms-head-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.terms-icon { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.16); display: grid; place-items: center; flex-shrink: 0; }
.terms-dialog-head h2, [data-theme="dark"] .terms-dialog-head h2 { color: #fff; font-size: 1.12rem; font-weight: 800; line-height: 1.3; }
.terms-sub { margin: 3px 0 0; font-size: .8rem; color: rgba(255,255,255,.78); }
.terms-x { border: 0; background: rgba(255,255,255,.14); color: #fff; border-radius: 12px; width: 38px; height: 38px; transition: background .15s; }
.terms-x:hover { background: rgba(255,255,255,.26); }
.terms-progress { height: 5px; background: #ece4f3; }
.terms-progress span { background: linear-gradient(90deg, #7b3fa8, #c06bd6); border-radius: 0 4px 4px 0; }
.terms-dialog-body { padding: 18px 22px 26px; scroll-behavior: smooth; }
.terms-dialog-body:focus { outline: none; }
.terms-dialog-body .terms-body > p:nth-of-type(2) { background: #fff; border: 1px solid #ece4f3; border-radius: 14px; padding: 14px 16px; }
.terms-updated { display: inline-block; margin: 2px 0 12px !important; padding: 4px 10px; border-radius: 999px; background: #efe6f7; color: #6b3d8c; font-size: .74rem !important; font-weight: 600; }
.terms-dialog-body .terms-body h3 { display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; padding-top: 16px; border-top: 1px solid #ece4f3; font-size: .98rem; font-weight: 800; color: #3e1d57; }
.terms-dialog-body .terms-body h3::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: linear-gradient(#7b3fa8, #c06bd6); flex-shrink: 0; }
.terms-dialog-body .terms-body p, .terms-dialog-body .terms-body li { color: #4a4257; }
.terms-dialog-body .terms-body ul { list-style: none; margin: 0 0 8px; padding: 0; }
.terms-dialog-body .terms-body li { position: relative; padding-left: 20px; margin-bottom: 7px; }
.terms-dialog-body .terms-body li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: #a35cc9; }
.terms-dialog-body .terms-body strong { color: #2d1840; }
.terms-dialog-body .terms-body h3:nth-of-type(9) { color: #b42323; }
.terms-dialog-body .terms-body h3:nth-of-type(9)::before { background: #e04848; }
.terms-dialog-body .terms-body h3:nth-of-type(9) + p { background: #fdeeee; border: 1px solid #f6caca; border-radius: 12px; padding: 12px 14px; color: #7a1d1d; }
.terms-dialog-foot { padding: 14px 20px; gap: 10px; border-top: 1px solid #ece4f3; background: #fff; flex-wrap: wrap; }
.terms-dialog-foot .btn { border-radius: 999px; padding: 10px 20px; font-weight: 700; }
.terms-dialog-foot #termsAgree:disabled { opacity: .45; cursor: not-allowed; }
.terms-hint { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #f4eefa; color: #6b5b7b; font-size: .8rem; }
.terms-hint.ok { background: #e6f6ec; color: #1d7a43; }
.terms-hint.ok::before { content: "✓"; font-weight: 800; }
@media (max-width: 600px) {
  .terms-dialog { width: 100vw; max-width: 100vw; height: 92vh; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .terms-dialog[open] { animation: termsUp .25s ease-out; }
  @keyframes termsUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .terms-dialog-head { padding: 16px; }
  .terms-dialog-body { padding: 14px 16px 22px; }
  .terms-dialog-foot { padding: 12px 16px; }
  .terms-hint { width: 100%; justify-content: center; }
  .terms-dialog-foot .btn { flex: 1; white-space: nowrap; padding: 10px 12px; font-size: .9rem; }
}
[data-theme="dark"] .terms-dialog { background: #1d1829; }
[data-theme="dark"] .terms-progress { background: #2f2840; }
[data-theme="dark"] .terms-dialog-body .terms-body > p:nth-of-type(2) { background: #251f33; border-color: #362f4a; }
[data-theme="dark"] .terms-updated { background: #2f2542; color: #d6b8ef; }
[data-theme="dark"] .terms-dialog-body .terms-body h3 { color: #e3cdf5; border-color: #362f4a; }
[data-theme="dark"] .terms-dialog-body .terms-body p, [data-theme="dark"] .terms-dialog-body .terms-body li { color: #c9c1d8; }
[data-theme="dark"] .terms-dialog-body .terms-body strong { color: #f1e8fb; }
[data-theme="dark"] .terms-dialog-body .terms-body h3:nth-of-type(9) { color: #ff9b9b; }
[data-theme="dark"] .terms-dialog-body .terms-body h3:nth-of-type(9) + p { background: #3a1f24; border-color: #5e2a32; color: #ffd0d0; }
[data-theme="dark"] .terms-dialog-foot { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .terms-hint { background: #2a2438; color: #b7accb; }
[data-theme="dark"] .terms-hint.ok { background: #1c3a28; color: #8be0aa; }


.admin-actions .profile-btn.active { background: var(--violet-100); }
.am-menu { min-width: 280px; }
.am-menu .am-label { margin: 8px 10px 2px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.am-menu > a { align-items: center; }
.am-menu > a > span { display: flex; flex-direction: column; line-height: 1.25; }
.am-menu > a small { font-size: .74rem; font-weight: 400; color: var(--text-muted); }
.am-menu > a.on { background: var(--violet-50); color: var(--violet-800); font-weight: 600; }
[data-theme="dark"] .am-menu > a.on { background: #2f2842; color: #e3cdf5; }
.sb-badge[hidden] { display: none !important; }
.sb-badge.sb-pop { animation: sbPop .5s ease; }
@keyframes sbPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.ev-page { display: flex; justify-content: center; padding: 40px 16px 56px; }
.ev-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--border-color); border-radius: 22px; padding: 32px 28px 26px; text-align: center; box-shadow: 0 18px 50px rgba(60,30,90,.10); }
.ev-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #4a2268, #a35cc9); }
.ev-card h1 { font-size: 1.4rem; margin: 0 0 6px; color: var(--violet-800); }
.ev-sub { margin: 0 0 20px; color: var(--text-muted); line-height: 1.55; }
.ev-sub strong { color: var(--text-dark); }
.ev-form { display: flex; flex-direction: column; gap: 12px; }
.ev-code { width: 100%; text-align: center; font: 800 1.9rem/1 Consolas, Menlo, monospace; letter-spacing: .5em; padding: 14px 0 14px .5em; border: 2px solid #e4d8ee; border-radius: 16px; background: #faf7fc; color: var(--text-dark); }
.ev-code:focus { outline: none; border-color: #7b3fa8; box-shadow: 0 0 0 4px rgba(123,63,168,.15); background: #fff; }
.ev-btn { width: 100%; border-radius: 999px; padding: 12px; font-weight: 700; }
.ev-spam { margin: 20px 0 6px; text-align: left; background: #fff8e8; border: 1px solid #f3dfae; border-radius: 14px; padding: 14px 16px; font-size: .88rem; color: #6b4a00; }
.ev-spam strong { display: block; margin-bottom: 6px; color: #7a5200; }
.ev-spam ul { margin: 0; padding-left: 18px; }
.ev-spam li { margin-bottom: 4px; line-height: 1.5; }
.ev-actions { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ev-actions form { margin: 0; }
.ev-link { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; font-weight: 600; color: #7b3fa8; cursor: pointer; text-decoration: none; }
.ev-link:hover { text-decoration: underline; }
.ev-link:disabled { color: var(--text-muted); cursor: default; text-decoration: none; }
.ev-dot { color: var(--text-muted); }
.ev-foot { margin: 12px 0 0; font-size: .78rem; color: var(--text-muted); }
[data-theme="dark"] .ev-card { background: #211c30; border-color: #362f4a; }
[data-theme="dark"] .ev-card h1 { color: #e3cdf5; }
[data-theme="dark"] .ev-code { background: #2a2438; border-color: #463a5a; color: #fff; }
[data-theme="dark"] .ev-spam { background: #3a2f17; border-color: #5c4a22; color: #f3dca5; }
[data-theme="dark"] .ev-spam strong { color: #ffd98a; }
[data-theme="dark"] .ev-link { color: #d2a8f0; }


.g-or { display: flex; align-items: center; gap: 10px; width: 100%; margin: 14px 0 10px; color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.g-or::before, .g-or::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }
.g-btn-wrap { display: flex; justify-content: center; min-height: 44px; width: 100%; }
.g-verified { position: relative; width: 100%; }
.g-verified input { width: 100%; padding-right: 92px !important; background: #f1f8f3 !important; }
.g-badge { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #e6f6ec; color: #1d7a43; font-size: .72rem; font-weight: 700; }
[data-theme="dark"] .g-or::before, [data-theme="dark"] .g-or::after { background: #362f4a; }
[data-theme="dark"] .g-verified input { background: #1c2e24 !important; }
[data-theme="dark"] .g-badge { background: #1c3a28; color: #8be0aa; }

/* Resident header at dashboard v2 */
.site-header.resident-bar { background: rgba(255,255,255,.78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(122,75,153,.12); box-shadow: 0 6px 24px -18px rgba(63,35,82,.45); }
[data-theme="dark"] .site-header.resident-bar { background: rgba(24,20,34,.8); border-bottom-color: #2f2840; }
.resident-bar .nav-links { gap: 6px; background: var(--violet-50); border: 1px solid var(--violet-100); padding: 5px; border-radius: 999px; }
.resident-bar .nav-links > a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-weight: 600; }
.resident-bar .nav-links > a .ni { opacity: .75; }
.resident-bar .nav-links > a:hover { background: #fff; color: var(--violet-800); }
.resident-bar .nav-links > a.active { background: #fff; color: var(--violet-800); box-shadow: 0 4px 14px -6px rgba(63,35,82,.35); }
.resident-bar .nav-links > a.active .ni { opacity: 1; color: var(--violet-600); }
[data-theme="dark"] .resident-bar .nav-links { background: #221c2e; border-color: #2f2840; }
[data-theme="dark"] .resident-bar .nav-links > a { color: #b9b0c9; }
[data-theme="dark"] .resident-bar .nav-links > a:hover, [data-theme="dark"] .resident-bar .nav-links > a.active { background: #322a44; color: #f1e7fa; }
.rnav-cta { display: inline-flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: 999px; background: linear-gradient(135deg, var(--violet-600), var(--violet-800)); color: #fff !important; font-weight: 700; font-size: .9rem; text-decoration: none; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(84,48,107,.7); transition: transform .15s ease, box-shadow .15s ease; }
.rnav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(84,48,107,.8); }
.resident-bar .nav-right { gap: 10px; }
.resident-bar .icon-btn { width: 42px; height: 42px; border-radius: 12px; background: var(--violet-50); border: 1px solid var(--violet-100); }
.resident-bar .profile-btn { border-radius: 999px; padding: 4px 12px 4px 4px; gap: 9px; }
.resident-bar .profile-btn .pname { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.resident-bar .profile-btn .pname b { font-size: .88rem; }
.resident-bar .profile-btn .pname small { font-size: .68rem; color: var(--text-muted); font-weight: 500; }
@media (max-width: 1280px) {
  .resident-bar .nav-links { display: contents; background: none; border: 0; padding: 0; }
  .resident-bar .nav-links > a { padding: 12px 16px; border-radius: 12px; }
}
@media (max-width: 900px) {
  .resident-bar .rnav-cta { display: none; }
  .resident-bar .hamburger { display: none; }
  .resident-bar .main-nav { display: none; }
  .resident-bar .profile-btn .pname { display: none; }
  .resident-bar .profile-btn { padding: 3px; }
}

.rtab { display: none; }
@media (max-width: 900px) {
  .rtab { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 940; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px 6px; border-radius: 22px; background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border: 1px solid rgba(122,75,153,.14); box-shadow: 0 14px 34px -14px rgba(63,35,82,.5); }
  .rtab a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 14px; color: var(--text-muted); font-size: .68rem; font-weight: 600; text-decoration: none; }
  .rtab a.on { color: var(--violet-700); }
  .rtab a.on::before { content: ''; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 3px; background: var(--violet-600); }
  .rtab .rtab-add i { width: 52px; height: 52px; margin-top: -26px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--violet-500), var(--violet-800)); box-shadow: 0 10px 22px -8px rgba(84,48,107,.8); border: 4px solid var(--surface); }
  .rtab .rtab-add i .ni { width: 24px; height: 24px; }
  .rtab .rtab-add.on::before { display: none; }
  .rtab-badge { position: absolute; top: 2px; right: calc(50% - 20px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .64rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
  [data-theme="dark"] .rtab { background: rgba(30,25,42,.92); border-color: #362f4a; }
  [data-theme="dark"] .rtab a.on { color: #e3c9f0; }
  body:has(.rtab) { padding-bottom: 92px; }
  body:has(.rtab) .site-footer { padding-bottom: 100px; }
  body:has(.rtab) .qx { bottom: 96px; }
  body:has(.rtab) .back-to-top { bottom: 150px; }
  body:has(.rtab) .pwa-install { bottom: 96px; }
  body:has(.rtab) .cd[data-state="closed"] .cd-launch { display: none; }
  body:has(.rtab) .cd[data-state="min"] { bottom: 86px; }
  body:has(#chatDock[data-state="open"]) .rtab { display: none; }
}

.rd2 { padding-top: 26px; }
.rd2 svg { flex-shrink: 0; width: 18px; height: 18px; }
.rd2-q-ico svg { width: 22px; height: 22px; }
.rd2-news-img > svg { width: 24px; height: 24px; }
.rd2-assure svg { width: 16px; height: 16px; margin-top: 1px; }
.rd2-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: center; padding: 36px 38px; border-radius: 26px; color: #fff; margin-bottom: 18px;
  background: radial-gradient(60% 90% at 100% 0%, rgba(232,160,214,.55) 0%, transparent 60%), radial-gradient(50% 70% at 0% 100%, rgba(120,92,230,.45) 0%, transparent 60%), linear-gradient(135deg, #5b3577 0%, #3a1f4e 100%);
  box-shadow: 0 24px 50px -24px rgba(58,31,78,.7); }
.rd2-hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.rd2-hero > * { position: relative; }
.rd2-date { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .8; margin: 0 0 8px; }
.rd2-hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.15; margin: 0 0 10px; }
.rd2-hero h1 span { background: linear-gradient(90deg, #ffd6f2, #ffffff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rd2-hero-text { margin: 0 0 22px; opacity: .88; max-width: 520px; line-height: 1.55; }
.rd2-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.rd2-btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 20px; border-radius: 14px; font-weight: 700; font-size: .95rem; text-decoration: none; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.rd2-btn:hover { transform: translateY(-2px); }
.rd2-btn-light { background: #fff; color: var(--violet-800); box-shadow: 0 12px 26px -10px rgba(0,0,0,.45); }
.rd2-btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.rd2-btn-ghost:hover { background: rgba(255,255,255,.2); }
.rd2-btn-solid { background: linear-gradient(135deg, var(--violet-600), var(--violet-800)); color: #fff; }
.rd2-assure { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; font-size: .8rem; opacity: .78; max-width: 520px; }
.rd2-hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rd2-hs { padding: 18px; border-radius: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.rd2-hs b { display: block; font-family: var(--font-heading); font-size: 2rem; line-height: 1; margin-bottom: 6px; }
.rd2-hs span { font-size: .8rem; opacity: .82; }
.rd2-hs:first-child { background: rgba(255,255,255,.95); color: var(--violet-900); }
.rd2-hs:first-child span { opacity: .7; }
.rd2-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.rd2-stat { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-color); }
.rd2-stat b { display: block; font-family: var(--font-heading); font-size: 1.8rem; color: var(--violet-800); }
.rd2-stat span { font-size: .82rem; color: var(--text-muted); }

.rd2-sos { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 18px; border-radius: 16px; background: #fff1f0; border: 1px solid #fecdca; color: #7a271a; text-decoration: none; }
.rd2-sos-ico { width: 40px; height: 40px; border-radius: 12px; background: #d92d20; color: #fff; display: flex; align-items: center; justify-content: center; animation: rd2-ping 2.4s ease-in-out infinite; }
.rd2-sos-text { flex: 1; font-size: .88rem; line-height: 1.4; }
.rd2-sos-text b { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #b42318; }
.rd2-sos-btn { padding: 8px 16px; border-radius: 999px; background: #d92d20; color: #fff; font-weight: 800; font-size: .9rem; }
@keyframes rd2-ping { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,45,32,.45); } 50% { box-shadow: 0 0 0 8px rgba(217,45,32,0); } }
@media (prefers-reduced-motion: reduce) { .rd2-sos-ico { animation: none; } }
[data-theme="dark"] .rd2-sos { background: #2c1514; border-color: #5c2420; color: #fecdca; }

.rd2-quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 22px; }
.rd2-q { --c: var(--violet-600); --bg: var(--violet-50); position: relative; display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-color); color: var(--text-dark); text-decoration: none; overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.rd2-q::after { content: ''; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--bg); opacity: .9; transition: transform .25s ease; }
.rd2-q:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 16px 30px -18px var(--c); }
.rd2-q:hover::after { transform: scale(1.5); }
.rd2-q > * { position: relative; z-index: 1; }
.rd2-q-ico { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--c); margin-bottom: 10px; }
.rd2-q b { font-size: .95rem; }
.rd2-q small { font-size: .78rem; color: var(--text-muted); }
.q-violet { --c: #7a4b99; --bg: #f3ecf8; } .q-blue { --c: #2563eb; --bg: #e8effe; } .q-amber { --c: #c2410c; --bg: #fff1e6; } .q-green { --c: #059669; --bg: #e3f7ef; } .q-pink { --c: #c026d3; --bg: #fbe8fd; }
[data-theme="dark"] .rd2-q { background: #1f1a2b; border-color: #322a44; }
[data-theme="dark"] .q-violet { --bg: #33264a; } [data-theme="dark"] .q-blue { --bg: #1c2a4a; --c: #7aa2ff; } [data-theme="dark"] .q-amber { --bg: #3a2414; --c: #fb9a5b; } [data-theme="dark"] .q-green { --bg: #133429; --c: #4ad3a3; } [data-theme="dark"] .q-pink { --bg: #3a1a3f; --c: #ee86f8; } [data-theme="dark"] .q-violet { --c: #d0a7ee; }

.rd2-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.rd2-main, .rd2-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rd2-main .ev-carousel { margin-bottom: 0; }
.rd2-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: 20px; padding: 20px; box-shadow: 0 10px 30px -26px rgba(63,35,82,.6); }
[data-theme="dark"] .rd2-card, [data-theme="dark"] .rd2-stat { background: #1f1a2b; border-color: #322a44; }
.rd2-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.rd2-card-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.02rem; color: var(--text-dark); }
.rd2-card-head h3 svg { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--violet-50); color: var(--violet-700); }
[data-theme="dark"] .rd2-card-head h3 svg { background: #2c2440; color: #d0a7ee; }
.rd2-more { font-size: .82rem; font-weight: 700; color: var(--violet-700); text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--violet-50); }
.rd2-more:hover { background: var(--violet-100); }
[data-theme="dark"] .rd2-more { background: #2c2440; color: #e3c9f0; }
.rd2-muted { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; color: var(--text-muted); font-size: .8rem; }
.rd2-muted svg { width: 14px; height: 14px; }
.rd2-none { color: var(--text-muted); font-size: .9rem; margin: 4px 0; }

.rd2-empty { text-align: center; padding: 18px 10px 6px; }
.rd2-empty-ico { display: inline-flex; width: 60px; height: 60px; border-radius: 20px; align-items: center; justify-content: center; background: var(--violet-50); color: var(--violet-600); margin-bottom: 10px; }
.rd2-empty-ico svg { width: 28px; height: 28px; }
.rd2-empty p { color: var(--text-muted); max-width: 380px; margin: 0 auto 16px; }
.rd2-latest { display: block; padding: 18px; border-radius: 16px; background: linear-gradient(180deg, var(--violet-50), transparent); border: 1px solid var(--violet-100); color: inherit; text-decoration: none; transition: border-color .15s ease; }
.rd2-latest:hover { border-color: var(--violet-300); }
[data-theme="dark"] .rd2-latest { background: linear-gradient(180deg, #2a2238, transparent); border-color: #362f4a; }
.rd2-latest-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.rd2-no { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; font-weight: 700; color: var(--violet-700); background: var(--surface); padding: 4px 9px; border-radius: 8px; border: 1px solid var(--violet-100); }
.rd2-latest-title { display: block; font-size: 1.08rem; margin-bottom: 4px; color: var(--text-dark); }
.rd2-progress { height: 8px; border-radius: 999px; background: var(--violet-100); margin: 16px 0 12px; overflow: hidden; }
.rd2-progress span { display: block; height: 100%; width: max(var(--p), 6%); border-radius: inherit; background: linear-gradient(90deg, var(--violet-500), #c026d3); }
[data-theme="dark"] .rd2-progress { background: #322a44; }
.rd2-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 0; }
.rd2-steps li { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-muted); }
.rd2-steps i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; background: var(--violet-100); color: var(--violet-700); flex-shrink: 0; }
.rd2-steps li.done i { background: #059669; color: #fff; }
.rd2-steps li.current { color: var(--text-dark); font-weight: 700; }
.rd2-steps li.current i { background: var(--violet-700); color: #fff; box-shadow: 0 0 0 4px var(--violet-100); }
.rd2-action { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--violet-200); font-size: .86rem; }
.rd2-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .85rem; font-weight: 700; color: var(--violet-700); }
.rd2-go svg { width: 16px; height: 16px; transition: transform .15s ease; }
.rd2-latest:hover .rd2-go svg { transform: translateX(3px); }

.rd2-row { display: flex; gap: 14px; padding: 12px; margin: 0 -8px; border-radius: 14px; color: inherit; text-decoration: none; }
.rd2-row:hover { background: var(--violet-50); }
[data-theme="dark"] .rd2-row:hover { background: #2a2238; }
.rd2-cal { width: 54px; flex-shrink: 0; border-radius: 14px; overflow: hidden; text-align: center; border: 1px solid var(--violet-200); background: var(--surface); }
.rd2-cal small { display: block; background: var(--violet-700); color: #fff; font-size: .66rem; font-weight: 800; text-transform: uppercase; padding: 3px 0; }
.rd2-cal b { display: block; font-family: var(--font-heading); font-size: 1.35rem; padding: 4px 0 6px; color: var(--text-dark); }
.rd2-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rd2-note { font-size: .8rem; color: var(--text-muted); background: var(--violet-50); padding: 6px 10px; border-radius: 10px; }

.rd2-news { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rd2-news-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--border-color); color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.rd2-news-item:hover { border-color: var(--violet-300); transform: translateY(-2px); }
.rd2-news-img { position: relative; width: 58px; height: 58px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--violet-100), #fbe8fd); color: var(--violet-600); display: flex; align-items: center; justify-content: center; }
.rd2-news-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rd2-news-item strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .88rem; line-height: 1.35; }
.rd2-news-item small { display: block; color: var(--text-muted); font-size: .75rem; margin-top: 3px; }
[data-theme="dark"] .rd2-news-item { border-color: #322a44; }

.rd2-hot { background: linear-gradient(160deg, #fff7f6, var(--surface) 55%); }
[data-theme="dark"] .rd2-hot { background: linear-gradient(160deg, #2a1a1d, #1f1a2b 55%); }
.rd2-hot .rd2-card-head h3 svg { background: #fee4e2; color: #d92d20; }
.rd2-hot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--border-color); }
.rd2-hot-row:first-of-type { border-top: 0; }
.rd2-hot-row strong { display: block; font-size: .9rem; }
.rd2-hot-row small { display: block; font-size: .76rem; color: var(--text-muted); }
.rd2-call { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fee4e2; color: #b42318; font-weight: 700; font-size: .8rem; text-decoration: none; white-space: nowrap; }
.rd2-call svg { width: 14px; height: 14px; }
.rd2-call:hover { background: #d92d20; color: #fff; }
[data-theme="dark"] .rd2-call { background: #4a1f1c; color: #fecdca; }
.rd2-edu { display: flex; flex-direction: column; gap: 6px; padding: 12px; margin-bottom: 8px; border-radius: 14px; background: var(--violet-50); color: var(--text-dark); text-decoration: none; transition: background .15s ease; }
.rd2-edu:hover { background: var(--violet-100); }
[data-theme="dark"] .rd2-edu { background: #2a2238; }
.rd2-edu strong { font-size: .9rem; }
.rd2-tag { align-self: flex-start; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #c026d3; }
.rd2-how { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; position: relative; }
.rd2-how li { display: flex; gap: 12px; }
.rd2-how i { font-style: normal; width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet-500), var(--violet-800)); }
.rd2-how strong { display: block; font-size: .9rem; }
.rd2-how small { display: block; font-size: .8rem; color: var(--text-muted); }

.rd2-section { margin-top: 26px; }
.rd2-section-title { font-size: 1.15rem; margin: 0 0 14px; }
.rd2-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rd2-tip { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-color); }
[data-theme="dark"] .rd2-tip { background: #1f1a2b; border-color: #322a44; }
.rd2-tip-n { display: inline-block; font-family: var(--font-heading); font-weight: 800; font-size: 1.4rem; background: linear-gradient(135deg, var(--violet-500), #c026d3); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 6px; }
.rd2-tip h4 { margin: 0 0 6px; font-size: .98rem; }
.rd2-tip p { margin: 0; font-size: .86rem; color: var(--text-muted); line-height: 1.55; }
.rd2-faqs { margin-top: 18px; }
.rd2-faq { border-top: 1px solid var(--border-color); }
.rd2-faq:first-of-type { border-top: 0; }
.rd2-faq summary { cursor: pointer; list-style: none; padding: 14px 30px 14px 0; font-weight: 600; position: relative; }
.rd2-faq summary::-webkit-details-marker { display: none; }
.rd2-faq summary::after { content: '+'; position: absolute; right: 4px; top: 10px; font-size: 1.3rem; color: var(--violet-600); transition: transform .2s ease; }
.rd2-faq[open] summary::after { transform: rotate(45deg); }
.rd2-faq p { margin: 0 0 14px; color: var(--text-muted); font-size: .9rem; }

@media (max-width: 1100px) { .rd2-quick { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) { .rd2-hero { grid-template-columns: 1fr; } .rd2-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .rd2 { padding-top: 14px; }
  .rd2-hero { padding: 24px 20px; border-radius: 22px; gap: 20px; }
  .rd2-hero-cta .rd2-btn { flex: 1 1 100%; justify-content: center; }
  .rd2-hs { padding: 14px; } .rd2-hs b { font-size: 1.6rem; }
  .rd2-stats { grid-template-columns: 1fr 1fr; }
  .rd2-quick { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rd2-quick .rd2-q:last-child { grid-column: span 2; }
  .rd2-q { padding: 14px; }
  .rd2-news { grid-template-columns: 1fr; }
  .rd2-steps li span { font-size: .74rem; }
  .rd2-card { padding: 16px; border-radius: 18px; }
}
.rd2-quick { grid-template-columns: repeat(4, 1fr); }
.rd2-q-arrow { position: absolute !important; right: 14px; bottom: 14px; color: var(--c); opacity: 0; transform: translateX(-4px); transition: opacity .18s ease, transform .18s ease; }
.rd2-q-arrow svg { width: 18px; height: 18px; }
.rd2-q:hover .rd2-q-arrow { opacity: 1; transform: none; }
@media (max-width: 1100px) { .rd2-quick { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rd2-quick .rd2-q:last-child { grid-column: auto; } .rd2-q-arrow { opacity: .6; transform: none; } }
@media (max-width: 640px) {
  .rd2-hero-stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .rd2-hs { padding: 10px 6px; text-align: center; border-radius: 14px; }
  .rd2-hs b { font-size: 1.35rem; margin-bottom: 4px; }
  .rd2-hs span { font-size: .64rem; line-height: 1.2; display: block; }
  .rd2-hero h1 { font-size: 1.55rem; }
  .rd2-assure { display: none; }
}
@media (max-width: 900px) {
  body:has(.rtab) .qx { left: auto; right: 12px; bottom: 96px; padding: 9px 12px; font-size: .8rem; }
  body:has(.rtab) .back-to-top { right: 12px; bottom: 146px; }
}
[data-theme="dark"] .rd2-q, [data-theme="dark"] .rd2-card-head h3, [data-theme="dark"] .rd2-latest-title, [data-theme="dark"] .rd2-steps li.current, [data-theme="dark"] .rd2-row strong, [data-theme="dark"] .rd2-news-item strong, [data-theme="dark"] .rd2-hot-row strong, [data-theme="dark"] .rd2-edu, [data-theme="dark"] .rd2-how strong, [data-theme="dark"] .rd2-tip h4, [data-theme="dark"] .rd2-faq summary, [data-theme="dark"] .rd2-section-title, [data-theme="dark"] .rd2-cal b, [data-theme="dark"] .rd2-stat b { color: #efe8f7; }
[data-theme="dark"] .rd2-q small, [data-theme="dark"] .rd2-muted, [data-theme="dark"] .rd2-none, [data-theme="dark"] .rd2-steps li, [data-theme="dark"] .rd2-tip p, [data-theme="dark"] .rd2-faq p, [data-theme="dark"] .rd2-how small, [data-theme="dark"] .rd2-hot-row small, [data-theme="dark"] .rd2-news-item small, [data-theme="dark"] .rd2-empty p { color: #a99fbb; }
[data-theme="dark"] .rd2-no, [data-theme="dark"] .rd2-cal, [data-theme="dark"] .rd2-action { background: #1a1524; border-color: #3a3150; color: #e3c9f0; }
[data-theme="dark"] .rd2-steps i { background: #322a44; color: #d0a7ee; }
[data-theme="dark"] .rd2-steps li.current i { background: #9867b8; color: #fff; box-shadow: 0 0 0 4px #322a44; }
[data-theme="dark"] .rd2-go { color: #d0a7ee; }
[data-theme="dark"] .rd2-note { background: #2a2238; color: #b9b0c9; }
[data-theme="dark"] .rd2-faq, [data-theme="dark"] .rd2-hot-row { border-color: #322a44; }
[data-theme="dark"] .resident-bar .icon-btn { background: #2a2438; border-color: #362f4a; color: #e5e0f5; }

@media (max-width: 900px) { .qx { display: none !important; } }

@media (max-width: 900px) {
  .resident-bar .brand { gap: 10px; min-width: 0; }
  .resident-bar .brand img.logo-img, .resident-bar .brand .logo-img { height: 42px; width: 42px; }
  .resident-bar .brand-text { display: flex !important; font-size: 1rem; }
  .resident-bar .brand-text small { display: block !important; font-size: .6rem; }
}

@media (max-width: 900px) { .back-to-top { display: none !important; } }

.chat-attach { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--violet-50); color: var(--violet-700); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s ease, color .15s ease; }
.chat-attach:hover { background: var(--violet-100); color: var(--violet-800); }
[data-theme="dark"] .chat-attach { background: #2a2438; color: #d0a7ee; }
.chat-attach-preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 12px 8px; padding: 8px 10px; border-radius: 14px; background: var(--violet-50); border: 1px solid var(--violet-100); font-size: .84rem; }
.chat-attach-preview[hidden] { display: none; }
.chat-attach-preview img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; }
.chat-attach-preview .cap-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dark); }
.chat-attach-preview .cap-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #fff; color: var(--text-dark); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.chat-attach-preview .cap-err { flex-basis: 100%; color: #b42318; font-weight: 600; }
.chat-attach-preview.busy img { opacity: .55; }
[data-theme="dark"] .chat-attach-preview { background: #221c2e; border-color: #362f4a; }
[data-theme="dark"] .chat-attach-preview .cap-name { color: #e5e0f5; }
[data-theme="dark"] .chat-attach-preview .cap-x { background: #2a2438; color: #e5e0f5; }
.chat-img { display: block; margin: 2px 0 6px; border-radius: 12px; overflow: hidden; max-width: 260px; background: rgba(0,0,0,.06); }
.chat-img img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.cp-bubble .chat-img { margin-top: 4px; }
.cd .chat-img { max-width: 220px; }
.cp-form .chat-attach { width: 42px; height: 42px; }
.chat-input-bar .chat-attach-preview { margin: 0 0 8px; }
@media (max-width: 900px) { body:has(.rtab) .cp { height: calc(100dvh - var(--header-h, 70px) - 96px); min-height: 0; } }

.rx-lead { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--violet-50); border: 1px solid var(--violet-100); color: var(--text-dark); font-size: .9rem; line-height: 1.5; }
.rx-step { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; font-size: 1.02rem; color: var(--text-dark); }
.rx-step:first-of-type { margin-top: 4px; }
.rx-step > span:first-child { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--violet-500), var(--violet-800)); color: #fff; font-size: .85rem; flex-shrink: 0; }
.rx-sub { font-weight: 500; color: var(--text-muted); font-size: .8rem; }
.rx-group { border: 1px solid var(--border-color); border-radius: 14px; padding: 12px 14px 14px; }
.rx-group legend { padding: 0 6px; font-weight: 600; }
.rx-group.rx-err { border-color: #e11d48; box-shadow: 0 0 0 3px rgba(225,29,72,.12); }
.rx-checks, .rx-radios { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 6px; }
.rx-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--border-color); background: var(--surface); cursor: pointer; font-size: .9rem; line-height: 1.35; transition: border-color .15s ease, background .15s ease; }
.rx-check input { margin-top: 2px; accent-color: var(--violet-700); width: 17px; height: 17px; flex-shrink: 0; }
.rx-check:has(input:checked) { border-color: var(--violet-600); background: var(--violet-50); }
.rx-alert { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff1f0; border: 1px solid #fecdca; color: #912018; font-size: .86rem; }
.rx-note { padding: 10px 12px; border-radius: 10px; background: var(--violet-50); color: var(--violet-800); font-size: .86rem; }
.rx-ev { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rx-ev-list { display: contents; }
.rx-ev-item { position: relative; width: 86px; height: 86px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); }
.rx-ev-item img { width: 100%; height: 100%; object-fit: cover; }
.rx-ev-item button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.rx-ev-add { width: 86px; height: 86px; border-radius: 12px; border: 1.5px dashed var(--violet-300); background: var(--violet-50); color: var(--violet-700); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: .7rem; font-weight: 600; cursor: pointer; text-align: center; padding: 6px; }
.rx-ev-add[hidden] { display: none; }
[data-theme="dark"] .rx-lead, [data-theme="dark"] .rx-note, [data-theme="dark"] .rx-ev-add { background: #221c2e; border-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .rx-check { background: #1f1a2b; border-color: #362f4a; color: #e5e0f5; }
[data-theme="dark"] .rx-check:has(input:checked) { background: #2c2440; border-color: #9867b8; }
[data-theme="dark"] .rx-step { color: #efe8f7; }

.rx-profile { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
.rx-block h4 { margin: 0 0 8px; font-size: .92rem; }
.rx-acts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rx-acts li { position: relative; padding: 8px 12px 8px 30px; border-radius: 10px; background: var(--violet-50); font-size: .9rem; }
.rx-acts li::before { content: ''; position: absolute; left: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--violet-600); }
.rx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rx-chip { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border-color); font-size: .88rem; font-weight: 600; }
.rx-chip small { font-size: .7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.rx-chip.rx-warn { border-color: #fecdca; background: #fff1f0; color: #912018; }
.rx-class { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, #f3ecf8, #fbe8fd); border: 1px solid var(--violet-200); font-size: .88rem; }
.rx-class small { display: block; margin-top: 4px; color: var(--text-muted); font-size: .76rem; }
.rx-law { flex-shrink: 0; padding: 4px 10px; border-radius: 8px; background: var(--violet-800); color: #fff; font-weight: 800; font-size: .78rem; white-space: nowrap; }
.rx-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.rx-gallery a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); }
.rx-gallery img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="dark"] .rx-acts li { background: #2a2238; }
[data-theme="dark"] .rx-chip { border-color: #362f4a; }
[data-theme="dark"] .rx-class { background: #2a2238; border-color: #3a3150; }
@media (max-width: 640px) { .rx-checks, .rx-radios { grid-template-columns: 1fr; } }
.form-group .rx-check, .rx-group .rx-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-weight: 500; }

.fl-card { margin-bottom: 18px; --fl: var(--violet-600); --flbg: var(--violet-50); }
.fl-tone-new { --fl: #7a4b99; --flbg: #f3ecf8; }
.fl-tone-info { --fl: #2563eb; --flbg: #e8effe; }
.fl-tone-wait { --fl: #a16207; --flbg: #fef6e0; }
.fl-tone-warn { --fl: #c2410c; --flbg: #fff1e6; }
.fl-tone-urgent { --fl: #b42318; --flbg: #fff1f0; }
.fl-tone-done { --fl: #047857; --flbg: #e3f7ef; }
.fl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.fl-head h3, .fl-head h4 { margin: 0; }
.fl-state, .fl-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--flbg); color: var(--fl); font-weight: 700; font-size: .82rem; white-space: nowrap; }
.fl-chip .rpt-dot { background: var(--fl); }
.fl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.fl-steps li { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 0 10px 0 0; }
.fl-steps li::after { content: ''; position: absolute; top: 15px; left: 38px; right: 8px; height: 2px; background: var(--border-color); }
.fl-steps li:last-child::after { display: none; }
.fl-steps li.done::after { background: #10b981; }
.fl-steps i { position: relative; z-index: 1; flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: .82rem; background: var(--surface); border: 2px solid var(--border-color); color: var(--text-muted); }
.fl-steps li.done i { background: #10b981; border-color: #10b981; color: #fff; }
.fl-steps li.on i { background: var(--fl); border-color: var(--fl); color: #fff; box-shadow: 0 0 0 4px var(--flbg); }
.fl-steps span { display: flex; flex-direction: column; padding-top: 34px; margin-left: -40px; min-width: 0; }
.fl-steps b { font-size: .85rem; color: var(--text-dark); }
.fl-steps small { font-size: .74rem; color: var(--text-muted); line-height: 1.3; }
.fl-steps li.on b { color: var(--fl); }
.fl-next { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--flbg); border-left: 4px solid var(--fl); }
.fl-next-text { flex: 1 1 320px; min-width: 0; }
.fl-next-text small { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--fl); }
.fl-next-text p { margin: 2px 0 2px; font-weight: 600; color: var(--text-dark); }
.fl-next form { margin: 0; }
.fl-law { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff1f0; border: 1px solid #fecdca; color: #912018; font-size: .85rem; }
.fl-done { margin: 14px 0 0; color: #047857; font-weight: 600; }
.fl-res { padding: 16px; border-radius: 16px; border: 1px solid var(--border-color); margin: 16px 0; }
.fl-res-msg { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--flbg); color: var(--text-dark); font-size: .9rem; }
.fl-guide { margin-top: 18px; }
.fl-guide summary { cursor: pointer; font-weight: 700; }
.fl-guide .fl-steps { margin: 16px 0 10px; }
.fl-guide-list { margin: 0; padding-left: 20px; font-size: .9rem; line-height: 1.6; }
.rpt-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px 2px; }
.rpt-pager[hidden] { display: none; }
.rpt-pager-info { font-size: .85rem; color: var(--text-muted); }
.rpt-pager-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rpt-pg { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--surface); color: var(--text-dark); font: inherit; font-weight: 600; cursor: pointer; }
.rpt-pg:hover:not(:disabled) { border-color: var(--violet-400); color: var(--violet-700); }
.rpt-pg.on { background: var(--violet-700); border-color: var(--violet-700); color: #fff; }
.rpt-pg:disabled { opacity: .45; cursor: default; }
.rpt-pg-gap { color: var(--text-muted); padding: 0 2px; }
.rpt-pager .rpt-input { width: auto; }
.sm-sub { display: block; font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.rs-flow { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--flbg); border-left: 4px solid var(--fl); }
.rs-flow small { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--fl); }
.rs-flow b { color: var(--text-dark); }
.rs-flow span { font-size: .85rem; color: var(--text-muted); }
[data-theme="dark"] .fl-steps i { background: #1f1a2b; border-color: #3a3150; }
[data-theme="dark"] .fl-steps b, [data-theme="dark"] .fl-next-text p, [data-theme="dark"] .rs-flow b, [data-theme="dark"] .fl-res-msg { color: #efe8f7; }
[data-theme="dark"] .fl-next, [data-theme="dark"] .rs-flow, [data-theme="dark"] .fl-res-msg, [data-theme="dark"] .fl-state, [data-theme="dark"] .fl-chip { background: #2a2238; }
[data-theme="dark"] .rpt-pg { background: #1f1a2b; border-color: #362f4a; color: #e5e0f5; }
@media (max-width: 700px) {
  .fl-steps { grid-template-columns: 1fr; gap: 10px; }
  .fl-steps li::after { display: none; }
  .fl-steps span { padding-top: 4px; margin-left: 0; }
}
.fl-steps li { flex-direction: column; gap: 8px; }
.fl-steps span { padding-top: 0; margin-left: 0; }
@media (max-width: 700px) { .fl-steps li { flex-direction: row; } }
.sm-time { white-space: nowrap; font-weight: 600; }
.table-scroll td .btn { white-space: nowrap; }
.rpt-older[hidden] { display: none !important; }

.hm-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.hm-form.hm-open { flex-direction: column; align-items: stretch; padding: 14px; border: 1px solid var(--violet-200); border-radius: 14px; background: var(--violet-50); }
.hm-form.hm-open > .dm-btn { align-self: flex-end; }
.hm-body[hidden], .hm-body [hidden] { display: none !important; }
.hm-title { margin: 4px 0 10px; font-weight: 800; color: var(--violet-800); text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.hm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.hm-form .form-group { margin-bottom: 10px; }
.hm-form label { font-size: .85rem; font-weight: 600; }
.hm-form textarea, .hm-form input[type=text], .hm-form select { width: 100%; }
.hm-results { display: grid; gap: 8px; }
.hm-off { opacity: .55; cursor: not-allowed; }
.hm-off small { color: #b42318; }
.hm-sum { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #f6f3fa; border-left: 4px solid var(--violet-500); font-size: .88rem; }
.hm-sum.hm-settled { background: #e3f7ef; border-color: #10b981; }
.hm-sum.hm-not_settled { background: #fff1f0; border-color: #e11d48; }
.hm-sum ol, .rs-terms { margin: 6px 0 0 18px; padding: 0; }
.hm-links { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 4px; font-size: .84rem; font-weight: 600; }
.hm-links a { color: var(--violet-700); }
[data-theme="dark"] .hm-form.hm-open { background: #221c2e; border-color: #362f4a; }
[data-theme="dark"] .hm-sum { background: #2a2238; }
@media (max-width: 640px) { .hm-grid { grid-template-columns: 1fr; } }

.rq-items { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 12px; }
.rq-items .rx-check { padding: 8px 10px; font-size: .86rem; }
.rq-dim { opacity: .72; }
.rq-form:not(:has(input[value=statement]:checked)) .rq-appt { display: none; }
.rq-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.rq-item { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-color); font-size: .86rem; }
.rq-item ul { margin: 6px 0 0 18px; padding: 0; }
.rq-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rq-top small { color: var(--text-muted); }
.rq-pill { padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: #fef6e0; color: #a16207; }
.rq-answered .rq-pill { background: #e3f7ef; color: #047857; }
.rq-note { margin: 6px 0 0; color: var(--text-muted); }
.rq-reply { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #f0faf5; }
.rq-reply p { margin: 4px 0 0; }
.rq-ask { margin: 16px 0; padding: 16px; border-radius: 16px; background: #fffaeb; border: 1px solid #fde68a; }
.rq-ask h4 { margin: 0 0 10px; color: #92400e; }
.rq-ask ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rq-ask li { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid #fde68a; }
.rq-ask li span { font-size: .86rem; color: var(--text-muted); }
.rq-answer { display: flex; flex-direction: column; gap: 8px; }
.rq-answer label { font-weight: 600; font-size: .88rem; }
.rq-answer .rq-file { font-weight: 500; font-size: .85rem; }
.rq-answer .btn { align-self: flex-start; }
[data-theme="dark"] .rq-ask { background: #2a2214; border-color: #5c4a1c; }
[data-theme="dark"] .rq-ask li { background: #1f1a2b; border-color: #5c4a1c; }
[data-theme="dark"] .rq-ask h4 { color: #fcd34d; }
[data-theme="dark"] .rq-item { border-color: #362f4a; }
[data-theme="dark"] .rq-reply { background: #13291f; }
.rq-answer textarea { font: inherit; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #fde68a; background: #fff; }
[data-theme="dark"] .rq-answer textarea { background: #1f1a2b; color: #e5e0f5; border-color: #5c4a1c; }

.am-menu { max-height: calc(100vh - 90px); overflow-y: auto; }

.ad2 { padding-top: 24px; }
.ad2 svg { flex-shrink: 0; }
.ad2-hero { display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap; padding: 28px 30px; margin-bottom: 18px; border-radius: 24px; color: #fff;
  background: radial-gradient(60% 120% at 100% 0%, rgba(232,160,214,.5) 0%, transparent 60%), radial-gradient(50% 90% at 0% 100%, rgba(120,92,230,.4) 0%, transparent 60%), linear-gradient(135deg, #5b3577, #33183f); box-shadow: 0 22px 48px -26px rgba(58,31,78,.8); }
.ad2-date { margin: 0 0 6px; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.ad2-hero h1 { margin: 0 0 6px; color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.ad2-hero h1 span { background: linear-gradient(90deg, #ffd6f2, #fff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ad2-sub { margin: 0; opacity: .88; }
.ad2-quick { display: flex; gap: 10px; flex-wrap: wrap; }
.ad2-qbtn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px; border-radius: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; transition: background .15s ease, transform .15s ease; }
.ad2-qbtn:first-child { background: #fff; color: var(--violet-800); }
.ad2-qbtn:hover { transform: translateY(-2px); background: rgba(255,255,255,.2); }
.ad2-qbtn:first-child:hover { background: #fff; }
.ad2-qbtn b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #e11d48; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; }
.ad2-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.ad2-kpi { --k: #7a4b99; --kb: #f3ecf8; position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-color); text-decoration: none; color: var(--text-dark); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.ad2-kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--kb); }
.ad2-kpi > * { position: relative; z-index: 1; }
.ad2-kpi:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -20px var(--k); }
.ad2-kico { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--kb); color: var(--k); margin-bottom: 10px; }
.ad2-kpi b { font-family: var(--font-heading); font-size: 2rem; line-height: 1; color: var(--k); }
.ad2-kpi > span:not(.ad2-kico) { font-weight: 700; margin-top: 4px; }
.ad2-kpi small { color: var(--text-muted); font-size: .78rem; }
.k-violet { --k: #7a4b99; --kb: #f3ecf8; } .k-rose { --k: #e11d48; --kb: #ffe4ea; } .k-teal { --k: #0d9488; --kb: #dcf5f2; } .k-green { --k: #059669; --kb: #e3f7ef; }
.ad2-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.ad2-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad2-card { padding: 20px; border-radius: 20px; }
.ad2-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.ad2-card-head h3 { margin: 0; font-size: 1.02rem; }
.ad2-card-head a { font-size: .84rem; font-weight: 700; color: var(--violet-700); text-decoration: none; }
.ad2-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 10px; color: var(--text-muted); text-align: center; }
.ad2-empty svg { width: 34px; height: 34px; color: #10b981; }
.ad2-empty p { margin: 0; }
.ad2-task { --fl: var(--violet-600); display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 0; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--border-color); text-decoration: none; color: inherit; overflow: hidden; transition: border-color .15s ease, transform .15s ease; }
.ad2-task:hover { border-color: var(--fl); transform: translateX(2px); }
.ad2-task-bar { align-self: stretch; width: 5px; background: var(--fl); flex-shrink: 0; }
.ad2-task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ad2-task-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ad2-task b { font-size: .92rem; }
.ad2-task small { color: var(--text-muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ad2-task > svg { width: 18px; height: 18px; color: var(--text-muted); }
.ad2-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ad2-mini a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--violet-50); color: var(--text-dark); text-decoration: none; font-size: .85rem; }
.ad2-mini svg { width: 20px; height: 20px; color: var(--violet-700); }
.ad2-agenda { display: flex; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 12px; text-decoration: none; color: inherit; }
.ad2-agenda:hover { background: var(--violet-50); }
.ad2-cal { width: 48px; flex-shrink: 0; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--violet-200); }
.ad2-cal small { display: block; background: var(--violet-700); color: #fff; font-size: .62rem; font-weight: 800; padding: 2px 0; }
.ad2-cal b { display: block; font-family: var(--font-heading); font-size: 1.2rem; padding: 2px 0 4px; }
.ad2-agenda.today .ad2-cal small { background: #e11d48; }
.ad2-ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad2-ag-main small { color: var(--text-muted); font-size: .8rem; }
.ad2-pipe { margin-bottom: 18px; }
.ad2-bar { display: flex; gap: 4px; height: 16px; border-radius: 999px; overflow: hidden; background: var(--violet-50); }
.ad2-bar a { display: block; min-width: 10px; transition: opacity .15s ease; }
.ad2-bar a:hover { opacity: .8; }
.ad2-legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.ad2-legend a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-color); text-decoration: none; color: var(--text-dark); font-size: .86rem; }
.ad2-legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.ad2-legend span { flex: 1; }
.ad2-legend b { font-family: var(--font-heading); font-size: 1.1rem; }
.ad2-bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 30px; gap: 10px; align-items: center; padding: 6px 0; font-size: .86rem; }
.ad2-bar-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad2-bar-row b { text-align: right; }
.ad2-hbar { height: 8px; border-radius: 999px; background: var(--violet-50); overflow: hidden; }
.ad2-hbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-500), #c026d3); }
.ad2-hbar-rose i { background: linear-gradient(90deg, #fb7185, #e11d48); }
.ad2-fact { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: .88rem; }
.ad2-fact span { color: var(--text-muted); }
.ad2-gad { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--violet-700); text-decoration: none; font-size: .88rem; }
.ad2-toast { position: fixed; right: 24px; bottom: 24px; z-index: 960; display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 14px; background: #1f1630; color: #fff; box-shadow: 0 16px 34px -12px rgba(0,0,0,.5); }
.ad2-toast[hidden] { display: none; }
.ad2-toast a { color: #f0c4ff; font-weight: 700; }
[data-theme="dark"] .ad2-kpi, [data-theme="dark"] .ad2-task, [data-theme="dark"] .ad2-legend a { background: #1f1a2b; border-color: #322a44; color: #efe8f7; }
[data-theme="dark"] .k-violet { --kb: #33264a; --k: #d0a7ee; } [data-theme="dark"] .k-rose { --kb: #42192a; --k: #fb7185; } [data-theme="dark"] .k-teal { --kb: #12332f; --k: #2dd4bf; } [data-theme="dark"] .k-green { --kb: #133429; --k: #34d399; }
[data-theme="dark"] .ad2-mini a, [data-theme="dark"] .ad2-bar, [data-theme="dark"] .ad2-hbar { background: #2a2238; color: #efe8f7; }
[data-theme="dark"] .ad2-agenda:hover { background: #2a2238; }
@media (max-width: 1200px) { .ad2-kpis { grid-template-columns: repeat(2, 1fr); } .ad2-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .ad2-grid, .ad2-grid-3 { grid-template-columns: 1fr; } .ad2-legend { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ad2-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .ad2-kpi { padding: 14px; } .ad2-kpi b { font-size: 1.6rem; } .ad2-mini { grid-template-columns: 1fr; } .ad2-hero { padding: 22px 18px; } }

.ca-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.ca-list { padding: 14px; border-radius: 18px; position: sticky; top: calc(var(--header-h, 85px) + 14px); }
.ca-head { margin: 4px 6px 10px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.ca-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text-dark); border: 1px solid transparent; }
.ca-item:hover { background: var(--violet-50); }
.ca-item.on { background: var(--violet-50); border-color: var(--violet-300); }
.ca-item.off { opacity: .6; }
.ca-name { font-weight: 700; font-size: .92rem; }
.ca-meta { font-size: .76rem; color: var(--text-muted); }
.ca-add { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--violet-300); }
.ca-add summary { cursor: pointer; font-weight: 700; color: var(--violet-700); font-size: .88rem; }
.ca-add form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ca-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ca-cat { padding: 18px; border-radius: 18px; }
.ca-cat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.ca-switch { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--violet-50); font-weight: 600; font-size: .86rem; margin-bottom: 16px; cursor: pointer; }
.ca-cat-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ca-acts { padding: 18px; border-radius: 18px; }
.ca-acts-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ca-acts-head h3 { margin: 0; }
.ca-act { display: grid; grid-template-columns: 110px minmax(0, 1fr) 170px 80px auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-color); }
.ca-act.off { opacity: .55; }
.ca-act input[type=text], .ca-act select { width: 100%; }
.ca-stage { justify-self: start; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--violet-50); color: var(--violet-700); }
.ca-st-review { background: #e8effe; color: #1d4ed8; } .ca-st-hearing { background: #dcf5f2; color: #0f766e; } .ca-st-resolution { background: #e3f7ef; color: #047857; } .ca-st-none { background: #f1f1f4; color: #6b7280; }
.ca-on { display: flex; gap: 6px; align-items: center; font-size: .82rem; }
.ca-btns { display: flex; gap: 6px; }
.ca-new { border-top: 2px dashed var(--violet-200); margin-top: 6px; padding-top: 12px; }
[data-theme="dark"] .ca-item:hover, [data-theme="dark"] .ca-item.on, [data-theme="dark"] .ca-switch { background: #2a2238; }
@media (max-width: 1000px) { .ca-grid { grid-template-columns: 1fr; } .ca-list { position: static; } .ca-act { grid-template-columns: 1fr 1fr; } .ca-act input[type=text] { grid-column: 1 / -1; } .ca-act .ca-stage { display: none; } }

.fl-guide-acts { margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border-color); }
.fl-guide-acts summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.ga-count { margin-left: auto; padding: 2px 10px; border-radius: 999px; background: var(--violet-50); color: var(--violet-700); font-size: .78rem; }
.ga-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ga-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--violet-50); }
.ga-list li.done { background: #e3f7ef; }
.ga-check { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; border: 2px solid var(--violet-300); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; }
.ga-list li.done .ga-check { background: #10b981; border-color: #10b981; color: #fff; }
.ga-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .88rem; }
.ga-text small { color: var(--text-muted); font-size: .74rem; }
.ga-list form { margin: 0; }
[data-theme="dark"] .ga-list li { background: #2a2238; } [data-theme="dark"] .ga-list li.done { background: #13291f; }
.ca-act input[type=text], .ca-act select, .ca-add input, .ca-add textarea { padding: 8px 10px; border: 1.5px solid var(--border-color); border-radius: 10px; font: inherit; font-size: .88rem; background: var(--surface); color: var(--text-dark); min-width: 0; }
.ca-act input[type=text]:focus, .ca-act select:focus { outline: none; border-color: var(--violet-500); }
[data-theme="dark"] .ca-act input[type=text], [data-theme="dark"] .ca-act select, [data-theme="dark"] .ca-add input, [data-theme="dark"] .ca-add textarea { background: #1f1a2b; border-color: #362f4a; color: #e5e0f5; }

/* ===== GAD Reports v2 + Dashboard "Bagong report" spotlight ===== */
.gr2 .gr-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 26px 28px; margin-bottom: 16px; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(236,72,153,.35), transparent 55%), linear-gradient(135deg, #5b2d82, #2e1645); box-shadow: 0 18px 40px -22px rgba(46,22,69,.7); }
.gr2 .gr-hero h2 { margin: 0 0 4px; color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.gr2 .gr-hero p { margin: 0; opacity: .85; }
.gr2 .gr-eyebrow { font-size: .74rem !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75 !important; margin-bottom: 6px !important; }
.gr-hbtn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 13px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.gr-hbtn:hover { transform: translateY(-2px); background: rgba(255,255,255,.2); color: #fff; }
.gr-hbtn.solid { background: #fff; color: var(--violet-800); border-color: #fff; }
.gr-hbtn.solid:hover { background: #fff; color: var(--violet-800); }
.gr-period { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 700; font-size: .88rem; color: var(--violet-800); background: var(--violet-50); padding: 8px 12px; border-radius: 10px; }
.gr2 .gr-kpi { position: relative; overflow: hidden; border-radius: 18px; padding: 18px 18px 16px; box-shadow: 0 6px 20px -16px rgba(46,22,69,.45); transition: transform .2s ease, box-shadow .2s ease; }
.gr2 .gr-kpi:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(46,22,69,.55); }
.gr2 .gr-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--kc, #8a57b0); }
.gr2 .gr-kpi.k2 { --kc: #0d9488; } .gr2 .gr-kpi.k3 { --kc: #2563eb; } .gr2 .gr-kpi.k4 { --kc: #ea580c; } .gr2 .gr-kpi.k5 { --kc: #e11d48; }
.gr2 .gr-kpi strong { font-size: 2.1rem; color: var(--kc, var(--violet-800)); }
.gr-meter { display: block; height: 7px; margin-top: 6px; border-radius: 999px; background: #e6f4f2; overflow: hidden; }
.gr-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14b8a6, #0d9488); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.gr2 .gr-card { border-radius: 18px; }
.gr-grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) !important; margin-bottom: 18px; }
.gr2 .gr-grid { margin-bottom: 18px; }
.gr2 .gr-col { text-decoration: none; }
.gr2 .gr-col-bar { width: 64%; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #c49be0, #8a57b0); transition: height .8s cubic-bezier(.2,.8,.2,1), filter .15s ease; }
.gr2 .gr-col:hover .gr-col-bar, .gr2 .gr-col.on .gr-col-bar { background: linear-gradient(180deg, #a06ac6, #5b2d82); filter: drop-shadow(0 6px 10px rgba(91,45,130,.35)); }
.gr2 .gr-bar { transition: width .9s cubic-bezier(.2,.8,.2,1); background: linear-gradient(90deg, #a777c9, #7a4b99); }
.gr2 .gr-bar-alt { background: linear-gradient(90deg, #2dd4bf, #0f766e); }
.gr2 .gr-bar-rose { background: linear-gradient(90deg, #fb7185, #e11d48); }
.gr-old { font-style: normal; font-size: .68rem; font-weight: 700; color: #9a3412; background: #ffedd5; padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.gr-donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.gr-donut { width: 170px; height: 170px; flex: none; }
.gr-seg-arc { transition: stroke-dasharray 1s cubic-bezier(.2,.8,.2,1); }
.gr-donut-num { font: 800 24px var(--font-heading, inherit); fill: var(--text-dark); }
.gr-donut-lab { font-size: 11px; fill: var(--text-muted); }
.gr-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 150px; flex: 1; }
.gr-legend li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.gr-legend i { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.gr-legend b { margin-left: auto; font-size: 1rem; }
.gr-law { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gr-law li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; }
.gr-law-tag { font-size: .72rem; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.gr-law-txt { font-size: .85rem; color: var(--text-dark); line-height: 1.3; }
.gr-law b { font-size: 1.05rem; color: var(--c); }
.gr-law-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: #f3f0f7; overflow: hidden; }
.gr-law-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.gr-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.gr-pills span { font-size: .78rem; background: #fff1f2; color: #9f1239; padding: 4px 10px; border-radius: 999px; }
.gr-js .gr-anim { opacity: 0; transform: translateY(14px); transition: opacity .55s ease var(--d, 0ms), transform .55s cubic-bezier(.2,.8,.2,1) var(--d, 0ms); }
.gr-js .gr-anim.in { opacity: 1; transform: none; }
.gr-js .gr-anim.in.gr-kpi:hover { transform: translateY(-3px); }
@media (max-width: 1100px) { .gr-grid-main { grid-template-columns: 1fr !important; } }
@media (max-width: 768px) {
  .gr2 .gr-hero { padding: 20px; border-radius: 18px; }
  .gr2 .gr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gr2 .gr-kpi.k1 { grid-column: 1 / -1; }
  .gr-period { margin-left: 0; }
  .gr2 .gr-cols { gap: 3px; }
  .gr2 .gr-col-lab { font-size: .66rem; }
}
@media print {
  .gr2 .gr-hero { background: none !important; color: #000; box-shadow: none; padding: 0 0 8px; }
  .gr2 .gr-hero h2 { color: #000; }
  .gr-js .gr-anim { opacity: 1 !important; transform: none !important; }
  .gr-period { display: none; }
  .gr2 .gr-kpi, .gr2 .gr-card { box-shadow: none; break-inside: avoid; }
  .gr-seg-arc, .gr2 .gr-bar, .gr2 .gr-col-bar, .gr-law-bar i, .gr-meter i { transition: none !important; }
}

/* Dashboard: malaking "Bagong report" */
.ad2-hero { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); grid-template-areas: "g n" "q n"; align-items: center; row-gap: 18px; column-gap: 26px; }
.ad2-hero > div:first-child { grid-area: g; align-self: end; }
.ad2-hero .ad2-quick { grid-area: q; align-self: start; }
.ad2-hero .ad2-qbtn:first-child { background: rgba(255,255,255,.12); color: #fff; }
.ad2-hero .ad2-qbtn:first-child:hover { background: rgba(255,255,255,.2); }
.ad2-new { grid-area: n; display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 18px; border-radius: 20px; background: #fff; color: var(--text-dark); text-decoration: none;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,.45); transition: transform .2s ease, box-shadow .2s ease; position: relative; overflow: hidden; }
.ad2-new::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, #e11d48, #c026d3, #7a4b99); }
.ad2-new:hover { transform: translateY(-3px); box-shadow: 0 26px 46px -18px rgba(0,0,0,.5); color: var(--text-dark); }
.ad2-new-top { display: flex; align-items: center; gap: 14px; }
.ad2-new-ico { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #f4eefa; color: var(--violet-800); flex: none; }
.ad2-new-ico svg { width: 26px; height: 26px; }
.ad2-new.has .ad2-new-ico { background: #ffe4e6; color: #e11d48; }
.ad2-new.has .ad2-new-ico i { position: absolute; inset: -4px; border-radius: 19px; border: 2px solid #fb7185; animation: adPulse 1.8s ease-out infinite; }
.ad2-new-lab { display: flex; flex-direction: column; font-weight: 800; font-size: 1.15rem; line-height: 1.2; color: var(--text-dark); }
.ad2-new-lab small { font-weight: 500; font-size: .8rem; color: var(--text-muted); }
.ad2-new-num { margin-left: auto; font: 800 3.4rem/1 var(--font-heading, inherit); color: var(--violet-800); letter-spacing: -.02em; }
.ad2-new.has .ad2-new-num { color: #e11d48; }
.ad2-new-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ad2-new-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 11px; background: #faf7fd; font-size: .84rem; }
.ad2-new-list code { font-size: .78rem; font-weight: 700; color: var(--violet-800); background: none; padding: 0; }
.ad2-new-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad2-new-list small { color: var(--text-muted); font-size: .74rem; white-space: nowrap; }
.ad2-new-cta { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 13px; background: linear-gradient(135deg, #e11d48, #be185d); color: #fff; font-weight: 700; font-size: .92rem; }
.ad2-new-cta svg { width: 18px; height: 18px; transition: transform .2s ease; }
.ad2-new:hover .ad2-new-cta svg { transform: translateX(4px); }
.ad2-new:not(.has) .ad2-new-cta { background: var(--violet-800); }
.ad2-new-empty { margin: 0; font-size: .86rem; color: var(--text-muted); }
.ad2-new.bump { animation: adBump .6s ease; }
@keyframes adPulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes adBump { 0%, 100% { transform: none; } 30% { transform: scale(1.04); } 60% { transform: scale(.98); } }
@media (max-width: 900px) {
  .ad2-hero { grid-template-columns: 1fr; grid-template-areas: "g" "n" "q"; }
  .ad2-new-num { font-size: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) { .ad2-new.has .ad2-new-ico i, .ad2-new.bump { animation: none; } }
.gr-grid-main > .gr-card { display: flex; flex-direction: column; }
.gr-grid-main .gr-donut-wrap { flex: 1; }
@media (min-width: 1101px) { .gr-grid-main .gr-donut-wrap { flex-direction: column; } .gr-grid-main .gr-legend { width: 100%; } }

/* ===== Dark mode: puti at malinaw ang lahat ng text ===== */
[data-theme="dark"] {
  --text-dark: #ffffff; --text-muted: #f1ecf8; --surface: #211c30; --border-color: #3a3150;
  --gray-light: #2a2340; --violet-50: #2a2340; --violet-100: #31294a;
}
html[data-theme="dark"] body :is(h1, h2, h3, h4, h5, h6, p, span, small, strong, b, em, i, u, td, th, dt, dd, li, label, legend, summary, div, a, code, time, figcaption, caption, blockquote, address, pre, cite, mark):not(.btn):not(button):not([class*="badge"]):not(.fl-chip):not(.fl-state):not(.rpt-status):not(.gr-law-tag):not(.rd2-tag):not(.video-meta):not([class*="tag"]):not(.req) { color: #fff; }
html[data-theme="dark"] body :is(input, select, textarea) { color: #fff; }
html[data-theme="dark"] body ::placeholder { color: #cfc6e0; opacity: 1; }
html[data-theme="dark"] body option { background: #211c30; color: #fff; }
/* Mga kulay na chip — mas maliwanag sa dark mode */
[data-theme="dark"] .fl-chip, [data-theme="dark"] .fl-state, [data-theme="dark"] .rpt-status { color: #f0e3fb; }
[data-theme="dark"] .fl-tone-info { color: #bfdbfe !important; }
[data-theme="dark"] .fl-tone-warn { color: #fed7aa !important; }
[data-theme="dark"] .fl-tone-urgent { color: #fecaca !important; }
[data-theme="dark"] :is(.fl-tone-done, .fl-tone-ok, .fl-state, .fl-done) { color: #a7f3d0 !important; }
[data-theme="dark"] .gr-law-tag { color: #fff; background: color-mix(in srgb, var(--c) 45%, #211c30); }
[data-theme="dark"] :is(.rd2-tag, .video-meta, [class*="tag"]) { color: #f5d0fe; }
/* Puting kahon sa light mode → madilim sa dark mode */
[data-theme="dark"] .ad2-new { background: #211c30; box-shadow: 0 20px 40px -18px rgba(0,0,0,.7); }
[data-theme="dark"] .ad2-new-list li { background: #2a2340; }
[data-theme="dark"] .ad2-new-ico { background: #31294a; }
[data-theme="dark"] .ad2-new.has .ad2-new-ico { background: #4c1d2b; color: #fda4af; }
[data-theme="dark"] .gr-hbtn.solid, [data-theme="dark"] .gr-hbtn.solid:hover { background: #fff; color: #3f2352 !important; }
[data-theme="dark"] .gr-hbtn.solid svg { color: #3f2352; }
[data-theme="dark"] .gr-meter, [data-theme="dark"] .gr-law-bar, [data-theme="dark"] .gr-bar-track { background: #2a2340; }
[data-theme="dark"] .gr-pills span { background: #4c1d2b; color: #fecdd3; }
[data-theme="dark"] .gr-old { background: #4a2a12; color: #fed7aa; }
html[data-theme="dark"] body :is([style*="color:var(--violet-"], [style*="color: var(--violet-"], [style*="color:var(--text"], [style*="color: var(--text"]):not(.btn):not(button) { color: #fff !important; }
[data-theme="dark"] .cp-chip { color: #fff; border-color: #4a3f63; }
[data-theme="dark"] :is(.rv-att, .rs-pill, .rs-att, .ca-stage) { background: #31294a; color: #fff !important; }
[data-theme="dark"] :is(.rv-att-ok, .rs-pill-up, .rs-att-ok, .ca-st-resolution) { background: rgba(16,185,129,.2); color: #a7f3d0 !important; }
[data-theme="dark"] :is(.rv-att-warn, .rs-pill-wait, .rs-att-warn) { background: rgba(251,146,60,.2); color: #fed7aa !important; }
[data-theme="dark"] :is(.rv-att-bad, .rs-att-bad) { background: rgba(239,68,68,.2); color: #fecaca !important; }
[data-theme="dark"] :is(.rs-pill-moved, .ca-st-review) { background: rgba(59,130,246,.22); color: #bfdbfe !important; }
[data-theme="dark"] .ca-st-hearing { background: rgba(20,184,166,.22); color: #99f6e4 !important; }
[data-theme="dark"] .rpt-new-tag { color: #fff; }
[data-theme="dark"] .rd2-btn-light, [data-theme="dark"] .rd2-btn-light * { color: #3f2352 !important; }
html[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] .logo-fallback { background: linear-gradient(135deg, #9867b8, #54306b) !important; color: #fff !important; }

/* Admin dashboard hero — pang-sistema */
.ad2-hero h1 { margin-bottom: 4px !important; }
.ad2-clock { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .95; }
.ad2-clock svg { width: 18px; height: 18px; opacity: .8; }
.ad2-clock small { font-size: .68rem; font-weight: 800; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.16); }
.ad2-status { display: flex; flex-wrap: wrap; gap: 8px; }
.ad2-st { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; color: #fff; text-decoration: none; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); transition: background .15s ease; }
a.ad2-st:hover { background: rgba(255,255,255,.22); color: #fff; }
.ad2-st.st-red { background: #e11d48; border-color: #e11d48; }
.ad2-st.st-red i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: adBlink 1.2s ease-in-out infinite; }
.ad2-st.st-rose { background: rgba(244,63,94,.28); border-color: rgba(251,113,133,.5); }
.ad2-st.st-ok { background: rgba(16,185,129,.25); border-color: rgba(52,211,153,.5); }
.ad2-who { margin: 12px 0 0; font-size: .8rem; opacity: .75; }
@keyframes adBlink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ad2-st.st-red i { animation: none; } }

/* Admin sa phone: bottom tab bar gaya ng resident */
@media (max-width: 900px) {
  body:has(.atab) .sidebar-toggle { display: none !important; }
  .atab .atab-menu { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border: 0; background: none; border-radius: 14px; color: var(--text-muted); font: inherit; font-size: .68rem; font-weight: 600; cursor: pointer; }
  body.sidebar-open .atab .atab-menu { color: var(--violet-700); }
  [data-theme="dark"] body.sidebar-open .atab .atab-menu { color: #e3c9f0; }
  .atab .rtab-add i { position: relative; background: linear-gradient(135deg, #f43f5e, #be185d); box-shadow: 0 10px 22px -8px rgba(190,24,93,.8); }
  .atab .rtab-add:not(.has) i { background: linear-gradient(135deg, var(--violet-500), var(--violet-800)); box-shadow: 0 10px 22px -8px rgba(84,48,107,.8); }
  .atab .rtab-add.has i::after { content: ""; position: absolute; inset: -4px; border-radius: 20px; border: 2px solid #fb7185; animation: adPulse 1.8s ease-out infinite; }
  .atab .rtab-add i em { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #fff; color: #be185d; font-style: normal; font-size: .68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
  .rtab-dot { position: absolute; top: 4px; right: calc(50% - 14px); width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid var(--surface); }
  .atab .rtab-badge[hidden] { display: none; }
  body:has(.atab) .sidebar { bottom: 0; padding-bottom: 110px; }
  body:has(.atab) .ad2-toast { bottom: 96px; }
  /* Dashboard ng admin sa phone — mas siksik at moderno */
  .ad2-hero { padding: 20px 18px !important; border-radius: 22px !important; }
  .ad2-quick { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 8px !important; }
  .ad2-qbtn { flex-direction: column; justify-content: center; text-align: center; gap: 6px !important; padding: 12px 6px !important; font-size: .74rem !important; line-height: 1.2; }
  .ad2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .ad2-kpi { padding: 14px !important; }
}
@media (prefers-reduced-motion: reduce) { .atab .rtab-add.has i::after { animation: none; } }
/* Hero na walang malaking pamagat */
.ad2-hero .ad2-clock { font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 700; margin-top: 2px; }
@media (max-width: 900px) {
  [data-theme="dark"] .atab .rtab-add i em { color: #be185d !important; }
  .ad2-hero .ad2-clock { font-size: .98rem; flex-wrap: wrap; row-gap: 4px; }
  .ad2-status { gap: 6px; }
  .ad2-st { font-size: .74rem; padding: 5px 10px; }
  .ad2-who { font-size: .74rem; }
}
@media (max-width: 900px) { .ad2-hero .ad2-clock svg { display: none; } }

/* Mga Residente (admin): may pahina */
a.rpt-pg, span.rpt-pg { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a.rpt-pg:hover { border-color: var(--violet-400); color: var(--violet-700); }
a.rpt-pg.on, a.rpt-pg.on:hover { color: #fff; }
span.rpt-pg[aria-disabled="true"] { opacity: .45; }
.au-card { padding: 0 !important; overflow: hidden; }
.au-head { padding: 14px 18px; font-size: .9rem; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.au-head strong { color: var(--text-dark); font-size: 1rem; }
.au-wrap { overflow-x: auto; }
.au-table { width: 100%; margin: 0 !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
.au-card .rpt-pager { padding: 12px 18px 14px; border-top: 1px solid var(--border-color); }
@media (max-width: 600px) { .au-card .rpt-pager { justify-content: center; } .au-card .rpt-pager-info { width: 100%; text-align: center; } }
@media (max-width: 700px) {
  .au-wrap { overflow: visible; }
  .au-table, .au-table tbody { display: block; width: 100%; min-width: 0 !important; }
  .au-table thead { display: none; }
  .au-table tr { display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
  .au-table td { display: block; padding: 0 !important; border: 0 !important; white-space: normal; word-break: break-word; }
  .au-table td::before { display: none !important; }
  .au-table td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; }
  .au-table td:nth-child(4) { grid-column: 2; grid-row: 1; text-align: right; }
  .au-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; font-size: .86rem; }
  .au-table td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; font-size: .86rem; }
  .au-table td:nth-child(3):empty { display: none; }
  .au-table td:nth-child(5) { grid-column: 1; grid-row: 4; font-size: .78rem; color: var(--text-muted); align-self: center; }
  .au-table td:nth-child(6) { grid-column: 2; grid-row: 4; text-align: right; }
  .au-table td[colspan] { grid-column: 1 / -1; text-align: center; }
}

/* Oras ng opisina ng Barangay Hall */
.office-hours { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 4px; padding: 12px 14px; border-radius: 14px; background: #f0fdfa; border: 1px solid #99f6e4; color: #134e4a; }
.office-hours > svg { flex: none; margin-top: 2px; color: #0d9488; }
.office-hours strong { display: block; font-size: .9rem; margin-bottom: 4px; }
.office-hours ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.office-hours li { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 12px; font-size: .86rem; }
.office-hours li b { font-weight: 700; }
.office-hours.oh-compact { margin: 10px 0 0; background: rgba(255,255,255,.6); }
.rv-banner-endorse { flex-wrap: wrap; }
.rv-banner-endorse .office-hours { flex-basis: 100%; }
[data-theme="dark"] .office-hours { background: rgba(20,184,166,.12); border-color: rgba(45,212,191,.35); color: #fff; }
[data-theme="dark"] .office-hours > svg { color: #5eead4; }

/* Others: paalala at paglipat ng kategorya */
.rx-oth-tip { margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: .86rem; line-height: 1.45; }
.rx-oth-tip[hidden] { display: none; }
[data-theme="dark"] .rx-oth-tip { background: rgba(251,146,60,.14); border-color: rgba(251,146,60,.4); color: #fff; }
.rv-reclass { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--violet-50); border: 1px dashed var(--violet-200, #e7daf0); }
.rv-reclass .help-text { width: 100%; margin: 0; font-size: .8rem; }
.rv-reclass select { flex: 1 1 180px; min-width: 0; padding: 7px 10px; border: 1px solid var(--border-color); border-radius: 8px; font: inherit; font-size: .88rem; background: var(--surface); color: var(--text-dark); }

/* ===== Notifications — parang Facebook ===== */
.notif-dropdown { width: 380px; max-height: min(80vh, 640px); padding: 0 0 8px; border-radius: 16px; box-shadow: 0 18px 50px -12px rgba(30,20,50,.35); overflow-y: auto; overscroll-behavior: contain; }
.nf-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 6px; background: inherit; }
.notif-dropdown { background: var(--surface, #fff); }
.nf-head h3 { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--text-dark); font-family: var(--font-heading); }
.nf-markall { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 8px; border-radius: 8px; color: var(--violet-700); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.nf-markall:hover { background: var(--violet-50); }
.nf-tabs { position: sticky; top: 52px; z-index: 2; display: flex; gap: 6px; padding: 4px 16px 8px; background: var(--surface, #fff); }
.nf-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 0; padding: 7px 14px; border-radius: 999px; background: transparent; color: var(--text-dark); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
.nf-tabs button:hover { background: var(--violet-50); }
.nf-tabs button.on { background: var(--violet-100); color: var(--violet-800); }
.nf-tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: .68rem; display: inline-flex; align-items: center; justify-content: center; }
.nf-tab-count[hidden] { display: none; }
.nf-sec { padding: 10px 16px 4px; font-size: .95rem; font-weight: 800; color: var(--text-dark); }
.notif-item.nf-item { display: flex; align-items: center; gap: 12px; margin: 0 8px; padding: 8px 8px; border: 0; border-radius: 10px; font-weight: 400; background: transparent; }
.notif-item.nf-item:hover { background: var(--violet-50); }
.notif-item.nf-item.unread { background: transparent; border-left: 0; font-weight: 400; }
.notif-item.nf-item.unread:hover { background: var(--violet-50); }
.nf-av { position: relative; flex: none; width: 56px; height: 56px; }
.nf-av img, .nf-ini { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--violet-400, #b58fcf), var(--violet-700)); color: #fff; font-weight: 800; font-size: 1.05rem; }
.nf-ini-ico { background: #64748b; }
.nf-type { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface, #fff); }
.nf-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nf-msg { font-size: .9rem; line-height: 1.35; color: var(--text-dark); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nf-msg b { font-weight: 700; }
.nf-time { margin: 0 !important; font-size: .78rem !important; color: var(--text-muted) !important; font-weight: 500 !important; }
.notif-item.unread .nf-time { color: var(--violet-700) !important; font-weight: 700 !important; }
.notif-item.unread .nf-msg { font-weight: 600; }
.nf-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--violet-600); }
.nf-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; color: var(--text-muted); }
.nf-empty p { margin: 0; }
.notif-badge { box-shadow: 0 0 0 2px var(--surface, #fff); }
[data-theme="dark"] .notif-dropdown, [data-theme="dark"] .nf-head, [data-theme="dark"] .nf-tabs { background: #211c30; }
[data-theme="dark"] .nf-tabs button.on { background: #3a2f55; color: #fff; }
[data-theme="dark"] .notif-item.nf-item:hover, [data-theme="dark"] .nf-tabs button:hover, [data-theme="dark"] .nf-markall:hover { background: #2c2540; }
[data-theme="dark"] .nf-dot { background: #c084fc; }
[data-theme="dark"] .notif-item.unread .nf-time { color: #d8b4fe !important; }
[data-theme="dark"] .nf-type { border-color: #211c30; }
[data-theme="dark"] .nf-markall { color: #e9d5ff; }
@media (max-width: 900px) {
  .notif-dropdown { width: auto; max-height: calc(100vh - var(--header-h, 70px) - 90px); }
  .nf-av, .nf-av img, .nf-ini { width: 48px; height: 48px; }
}
.nf-head { justify-content: flex-start; }
.nf-head h3 { margin-right: auto; }
.nf-sound { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--violet-700); cursor: pointer; }
.nf-sound:hover { background: var(--violet-50); }
.nf-sound .nf-snd-off, .nf-sound.off .nf-snd-on { display: none; }
.nf-sound.off .nf-snd-off { display: block; }
.nf-sound.off { color: var(--text-muted); }
[data-theme="dark"] .nf-sound { color: #e9d5ff; }
[data-theme="dark"] .nf-sound:hover { background: #2c2540; }
.icon-btn.nf-ring svg { animation: nfRing .9s ease; transform-origin: 50% 4px; }
@keyframes nfRing { 0%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 75% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.nf-ring svg { animation: none; } }
.nf-head h3 { white-space: nowrap; font-size: 1.25rem; }
.nf-markall { white-space: nowrap; padding: 6px; }
.nf-head { gap: 4px; padding-right: 10px; }

/* Header ng resident: kasya kahit mahaba ang Tagalog na label */
.resident-bar .brand-text small { white-space: nowrap; }
.resident-bar .nav-links > a { white-space: nowrap; }
@media (min-width: 1281px) and (max-width: 1560px) {
  .site-header.resident-bar .main-nav { gap: 12px; }
  .site-header.resident-bar .nav-links { gap: 2px; }
  .site-header.resident-bar .nav-links > a { padding: 8px 12px; font-size: .9rem; gap: 6px; }
  .resident-bar .rnav-cta { padding: 9px 14px; font-size: .86rem; }
  .resident-bar .nav-right { gap: 8px; }
}
@media (min-width: 1281px) and (max-width: 1420px) {
  .site-header.resident-bar .nav-links > a .ni { display: none; }
  .site-header.resident-bar .nav-links > a { padding: 8px 11px; }
  .resident-bar .profile-btn .pname small { display: none; }
}
/* Dark mode: kita ang "Aktibong report" (puting kahon) */
html[data-theme="dark"] body .rd2-hs:first-child { background: rgba(255,255,255,.95); }
html[data-theme="dark"] body .rd2-hs:first-child b, html[data-theme="dark"] body .rd2-hs:first-child span { color: #3f2352 !important; }

/* Buo ang bilog ng menu ng resident kahit naka-Tagalog */
@media (min-width: 1281px) { .site-header.resident-bar .nav-links { flex: 0 0 auto; max-width: none; } }

/* Phone: mas maliit na tab bar, nawawala kapag nag-scroll pababa */
@media (max-width: 900px) {
  .rtab { left: 12px; right: 12px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding: 3px 4px; border-radius: 20px; transition: transform .28s ease, opacity .28s ease; will-change: transform; }
  .rtab a, .atab .atab-menu { gap: 2px; padding: 5px 2px 4px; font-size: .62rem; }
  .rtab .ni { width: 20px; height: 20px; }
  .rtab .rtab-add i { width: 44px; height: 44px; margin-top: -20px; border-radius: 15px; border-width: 3px; }
  .rtab .rtab-add i .ni { width: 21px; height: 21px; }
  .rtab-badge { top: 0; min-width: 16px; height: 16px; font-size: .58rem; right: calc(50% - 18px); }
  .rtab a.on::before { width: 18px; }
  body.tab-hide .rtab { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
  body:has(.rtab) { padding-bottom: 78px; }
  body:has(.rtab) .qx { bottom: 84px; }
  body.tab-hide .qx { bottom: 16px; }
  /* Mga dropdown: kasya sa screen at maaabot ang Logout */
  .dd-menu, .notif-dropdown { max-height: calc(100dvh - var(--header-h, 70px) - 100px - env(safe-area-inset-bottom, 0px)) !important; overscroll-behavior: contain; }
  .am-menu { min-width: 0; }
  .profile-menu > a, .am-menu > a { padding: 9px 12px; font-size: .9rem; }
  .am-menu > a small { font-size: .7rem; }
  .am-menu .am-label { margin: 6px 10px 0; }
  .profile-menu .pm-head, .profile-menu .am-head { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .rtab { transition: none; } }

/* ===== Report view: malinaw na pagkakasunod-sunod ===== */
.rv-step { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; letter-spacing: .01em; background: var(--violet-50); color: var(--violet-800); }
.rv-step b { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.rv-step em { font-style: normal; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.06); }
.rv-step-now { background: var(--violet-700); color: #fff; box-shadow: 0 6px 16px -8px rgba(84,48,107,.7); }
.rv-step-now em { background: #fff; color: var(--violet-800); }
.rv-step-done { background: #ecfdf5; color: #047857; }
.rv-step-next { background: #f3f4f6; color: #6b7280; }
.rv-h-wrap { display: flex; flex-direction: column; align-items: flex-start; }
.card.rv-sec-now { border-color: var(--violet-400, #b58fcf); box-shadow: 0 0 0 3px rgba(152,103,184,.18), var(--shadow-md); }
.card.rv-sec-done { opacity: .97; }
.sm-card .sm-card-head { flex-wrap: wrap; }
.sm-card .sm-card-head > .rv-step { flex: 0 0 auto; max-width: max-content; margin-right: 100%; }
.rv-jump { position: sticky; top: calc(var(--header-h, 70px) + 6px); z-index: 30; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding: 6px; border-radius: 14px; background: color-mix(in srgb, var(--surface, #fff) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.rv-jump::-webkit-scrollbar { display: none; }
.rv-jump-a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-size: .84rem; font-weight: 600; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.rv-jump-a:hover { background: var(--violet-50); color: var(--violet-800); }
.rv-jump-a i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; background: var(--violet-100); color: var(--violet-800); }
.rv-jump-a.now { background: var(--violet-700); color: #fff; }
.rv-jump-a.now i { background: #fff; color: var(--violet-800); }
.rv-jump-a.done i { background: #10b981; color: #fff; }
:target { scroll-margin-top: calc(var(--header-h, 70px) + 70px); }
#rvDetails, #request, #bpo, #summons, #endorse, #rvHistory { scroll-margin-top: calc(var(--header-h, 70px) + 70px); }
[data-theme="dark"] .rv-step { background: #2c2540; color: #fff; }
[data-theme="dark"] .rv-step-now { background: #7a4b99; }
[data-theme="dark"] .rv-step-done { background: rgba(16,185,129,.18); color: #a7f3d0; }
[data-theme="dark"] .rv-step-next { background: #2a2438; color: #fff; }
[data-theme="dark"] .rv-jump { background: rgba(33,28,48,.9); border-color: #362f4a; }
[data-theme="dark"] .rv-jump-a i { background: #3a2f55; color: #fff; }
@media (max-width: 900px) { .rv-jump { top: calc(var(--header-h, 64px) + 4px); } }

/* Report form: abiso sa kulang na field */
.rx-invalid { border-radius: 12px; outline: 2px solid rgba(225,29,72,.55); outline-offset: 6px; }
fieldset.rx-invalid { outline-offset: 2px; }
.rx-invalid :is(input:not([type=radio]):not([type=checkbox]), select, textarea):invalid { border-color: #e11d48 !important; box-shadow: 0 0 0 3px rgba(225,29,72,.12); }
.rx-field-err { margin: 8px 0 0; color: #be123c; font-size: .86rem; font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.rx-field-err::before { content: "!"; flex: 0 0 18px; height: 18px; border-radius: 50%; background: #e11d48; color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.rx-toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; top: 84px; z-index: 1200; max-width: min(520px, calc(100vw - 32px)); box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; border-radius: 14px; background: #be123c; color: #fff; box-shadow: 0 16px 34px -12px rgba(190,18,60,.55); font-size: .92rem; }
.rx-toast strong { font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; opacity: .9; }
.rx-toast[hidden] { display: none; }
.rx-toast-in { animation: rxToastIn .28s ease-out; }
@keyframes rxToastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .rx-toast { top: 76px; width: calc(100vw - 32px); } }
[data-theme="dark"] .rx-field-err { color: #fda4af; }
html[data-theme="dark"] body .rx-toast, html[data-theme="dark"] body .rx-toast * { color: #fff; }

/* Anunsyo: Facebook-style na feed at gallery */
.fbfeed { max-width: 680px; margin: 0 auto; display: grid; gap: 22px; }
.fbp { background: var(--surface, #fff); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(31,22,48,.06), 0 10px 28px -18px rgba(31,22,48,.25); text-align: left; }
.fbp-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 6px; }
.fbp-ava { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: 0 0 44px; display: grid; place-items: center; background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; font-weight: 800; font-size: 1.1rem; }
.fbp-ava img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.fbp-head strong { display: block; font-size: .98rem; line-height: 1.25; }
.fbp-head small { display: block; color: var(--text-muted); font-size: .8rem; margin-top: 2px; }
.fbp-text { padding: 8px 18px 14px; }
.fbp-text h3 { margin: 0 0 6px; font-size: 1.12rem; line-height: 1.35; }
.fbp-text h3 a { color: inherit; text-decoration: none; }
.fbp-text h3 a:hover { text-decoration: underline; }
.fbp-text p { margin: 0; font-size: .97rem; line-height: 1.6; color: var(--text-color, inherit); overflow-wrap: anywhere; }
.fbp-more { font-weight: 700; color: var(--violet-600); text-decoration: none; white-space: nowrap; }
.fbp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border-color); font-size: .9rem; }
.fbp-foot a { font-weight: 700; color: var(--violet-600); text-decoration: none; }
.fbp-foot span { color: var(--text-muted); font-size: .84rem; }

.fbg { display: grid; gap: 3px; background: var(--border-color); }
.fbg-item { position: relative; display: block; overflow: hidden; background: #ece7f5; min-height: 0; }
.fbg-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.fbg-item:hover img { transform: scale(1.025); }
.fbg-1 .fbg-item img { height: auto; max-height: 720px; }
.fbg-2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 340px; }
.fbg-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 320px 220px; }
.fbg-3 .fbg-item:first-child { grid-column: 1 / -1; }
.fbg-4 { grid-template-columns: 1fr 1fr; grid-auto-rows: 260px; }
.fbg-5 { grid-template-columns: repeat(6, 1fr); grid-template-rows: 300px 200px; }
.fbg-5 .fbg-item:nth-child(-n+2) { grid-column: span 3; }
.fbg-5 .fbg-item:nth-child(n+3) { grid-column: span 2; }
.fbg-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15,10,25,.55); color: #fff; font-size: 2rem; font-weight: 800; }
@media (max-width: 600px) {
  .fbfeed { gap: 16px; }
  .fbp { border-radius: 14px; }
  .fbg-2 { grid-auto-rows: 200px; }
  .fbg-3 { grid-template-rows: 220px 150px; }
  .fbg-4 { grid-auto-rows: 170px; }
  .fbg-5 { grid-template-rows: 200px 130px; }
}
.dt-gallery { border-bottom: 1px solid var(--border-color); }
.dt-gallery .fbg-1 .fbg-item img { max-height: 80vh; object-fit: contain; background: #111; }

/* Lightbox */
.fbl { position: fixed; inset: 0; z-index: 2000; background: rgba(8,5,14,.92); display: flex; align-items: center; justify-content: center; }
.fbl[hidden] { display: none; }
.fbl img { max-width: min(1200px, 92vw); max-height: 86vh; object-fit: contain; border-radius: 6px; }
.fbl-x { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 1.8rem; cursor: pointer; }
.fbl-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.fbl-nav[hidden] { display: none; }
.fbl-prev { left: 16px; } .fbl-next { right: 16px; }
.fbl-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; background: rgba(0,0,0,.45); padding: 4px 12px; border-radius: 999px; }
html[data-theme="dark"] body .fbl :is(button, span) { color: #fff; }

/* Admin: pagpili ng maraming larawan */
.anp { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.anp-list { display: flex; flex-wrap: wrap; gap: 10px; }
.anp-item { position: relative; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); background: #f3eefb; }
.anp-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anp-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(15,10,25,.7); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.anp-add { width: 96px; height: 96px; border-radius: 12px; border: 2px dashed var(--border-color); background: transparent; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .74rem; font-weight: 600; cursor: pointer; text-align: center; padding: 6px; }
.anp-add:hover { border-color: #8b5cf6; color: #6d28d9; }
.anp-add[hidden] { display: none; }
.anp-keep { cursor: pointer; }
.anp-keep input { position: absolute; opacity: 0; pointer-events: none; }
.anp-cover { position: absolute; left: 4px; bottom: 4px; background: rgba(15,10,25,.7); color: #fff; font-size: .66rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.anp-del { position: absolute; inset: 0; display: none; place-items: center; text-align: center; background: rgba(190,18,60,.72); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px; }
.anp-keep:has(input:checked) .anp-del { display: grid; }
.anp-keep:has(input:checked) img { filter: grayscale(1); }
html[data-theme="dark"] body :is(.anp-x, .anp-cover, .anp-del, .fbg-more) { color: #fff; }
html[data-theme="dark"] .fbg-item, html[data-theme="dark"] .anp-item { background: #2a2438; }
html[data-theme="dark"] body .wg-steps .wg-num { color: #4c2a6e !important; }

/* Kaganapan: listahan, tabs at gallery ng nakaraang event */
.evl-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--violet-50, #f6f1fb); border: 1px solid var(--border-color); margin: 0 0 18px; }
.evl-tabs a { padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--text-muted); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.evl-tabs a span { font-size: .75rem; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: rgba(122,75,153,.12); display: inline-grid; place-items: center; }
.evl-tabs a.on { background: var(--violet-600); color: #fff; box-shadow: 0 6px 14px -8px rgba(76,42,110,.6); }
.evl-tabs a.on span { background: rgba(255,255,255,.22); color: #fff; }
.evl-month { margin: 22px 0 10px; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 800; }
.evl-month:first-of-type { margin-top: 4px; }
.evl-item { display: grid; grid-template-columns: 78px 1fr 220px; gap: 18px; align-items: stretch; background: var(--surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: 0 10px 26px -20px rgba(31,22,48,.35); }
.evl-item.evl-today { border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168,85,247,.15), 0 10px 26px -20px rgba(31,22,48,.35); }
.evl-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; background: linear-gradient(160deg, var(--violet-600), #5b3480); color: #fff; text-decoration: none; padding: 10px 6px; line-height: 1.1; height: fit-content; }
.evl-date b { font-size: 1.9rem; font-weight: 800; }
.evl-date small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; opacity: .9; font-weight: 700; }
.evl-main { min-width: 0; }
.evl-main h3 { margin: 6px 0 6px; font-size: 1.15rem; line-height: 1.3; }
.evl-main h3 a { color: inherit; text-decoration: none; }
.evl-main h3 a:hover { text-decoration: underline; }
.evl-chip { display: inline-block; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #ede9fe; color: #5b21b6; }
.evl-chip-today { background: #fae8ff; color: #a21caf; }
.evl-chip-soon { background: #fef3c7; color: #92400e; }
.evl-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 6px; color: var(--text-muted); font-size: .88rem; }
.evl-desc { margin: 0 0 12px; font-size: .93rem; line-height: 1.55; }
.evl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.evl-cover { display: block; border-radius: 12px; overflow: hidden; background: #ece7f5; }
.evl-cover img { width: 100%; height: 100%; min-height: 150px; max-height: 190px; object-fit: cover; display: block; }
.evp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.evp-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
.evp-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -20px rgba(31,22,48,.45); }
.evp-img { position: relative; display: block; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #ede9fe, #f5d0fe); }
.evp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.evp-count { position: absolute; left: 10px; bottom: 10px; background: rgba(15,10,25,.72); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.evp-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.evp-body small { color: var(--text-muted); font-size: .8rem; }
.evp-body strong { font-size: 1rem; line-height: 1.3; }
.evp-body em { font-style: normal; color: var(--text-muted); font-size: .84rem; }
.dt-photo-count { align-self: center; font-size: .86rem; color: var(--text-muted); font-weight: 600; }
.ev-nimg { color: var(--text-muted); }
.ev-docs-hint { font-size: .8rem; font-weight: 700; color: var(--violet-600); }
@media (max-width: 760px) {
  .evl-item { grid-template-columns: 64px 1fr; gap: 12px; padding: 14px; }
  .evl-cover { grid-column: 1 / -1; grid-row: 1; }
  .evl-cover img { max-height: 200px; }
  .evl-date b { font-size: 1.5rem; }
  .evl-tabs { display: flex; }
  .evl-tabs a { flex: 1; justify-content: center; }
}
html[data-theme="dark"] body :is(.evl-date, .evl-date *, .evl-tabs a.on, .evl-tabs a.on *, .evp-count) { color: #fff; }
html[data-theme="dark"] .evl-tabs { background: #211c30; }
html[data-theme="dark"] body .evl-chip { background: #3a2f55; color: #fff; }
html[data-theme="dark"] body .evl-chip-soon { background: #5a4310; color: #fff; }
html[data-theme="dark"] body .evl-chip-today { background: #5b1f63; color: #fff; }
html[data-theme="dark"] .evl-cover, html[data-theme="dark"] .evp-img { background: #2a2438; }

/* Landing: mas kita ang mga batas (RA) */
.law-hl { display: inline; font-weight: 800; color: var(--violet-700, #5b2f7d); background: linear-gradient(transparent 55%, rgba(192,132,252,.38) 55%); padding: 0 2px; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.wg-text .law-hl { font-size: 1.02em; }
html[data-theme="dark"] body .law-hl { color: #f5d0fe; background: linear-gradient(transparent 55%, rgba(168,85,247,.45) 55%); }

/* RA: bold lang, walang highlight */
.law-hl, .wg-text .law-hl, html[data-theme="dark"] body .law-hl { font-weight: 700; color: inherit; background: none; padding: 0; font-size: inherit; border-radius: 0; }
