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

:root {
  --navy: #1a2b5c;
  --blue: #3b5bdb;
  --blue-light: #e8edff;
  --green: #40c057;
  --yellow: #fab005;
  --red: #fa5252;
  --gray: #f8f9fa;
  --border: #e9ecef;
  --text: #212529;
  --muted: #868e96;
  --white: #ffffff;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: #f0f2f5; }

/* AUTH */
.auth-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f0f2f5; }
.auth-box { background: var(--white); border-radius: 16px; padding: 40px; width: 400px; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.auth-logo { display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 28px; font-size: 20px; font-weight: 700; color: var(--navy); }
.logo-circle { width: 48px; height: 48px; background: var(--navy); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 20px; }
.logo-circle.small { width: 36px; height: 36px; font-size: 15px; }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.tab-btn { flex: 1; padding: 10px; border: none; background: var(--gray); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); transition: all .2s; }
.tab-btn.active { background: var(--blue); color: white; }

/* LAYOUT */
.layout { display: flex; height: 100vh; }
.sidebar { width: 240px; background: var(--navy); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 16px; color: white; font-weight: 700; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar-bottom { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; color: rgba(255,255,255,.7); cursor: pointer; text-decoration: none; font-size: 14px; border-radius: 0; transition: all .2s; }
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: var(--blue); color: white; border-radius: 0; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; background: white; border-bottom: 1px solid var(--border); }
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.bell { cursor: pointer; font-size: 18px; }
#page-content { padding: 24px; flex: 1; }

/* INPUTS */
.input { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; outline: none; transition: border .2s; margin-bottom: 12px; background: white; }
.input:focus { border-color: var(--blue); }
select.input { cursor: pointer; }

/* BUTTONS */
.btn-primary { background: var(--blue); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .2s; }
.btn-primary:hover { opacity: .88; }
.btn-primary.full { width: 100%; }
.btn-secondary { background: white; color: var(--blue); border: 1.5px solid var(--blue); padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; }
.btn-secondary:hover { background: var(--blue-light); }
.btn-danger { background: white; color: var(--red); border: 1.5px solid var(--red); padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { background: none; border: 1.5px solid var(--border); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all .2s; }
.btn-icon:hover { border-color: var(--blue); }
.btn-icon.del:hover { border-color: var(--red); }

/* CARDS */
.card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 22px; font-weight: 700; }
.back-btn { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--muted); margin-right: 8px; }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; border-bottom: 1.5px solid var(--border); cursor: pointer; user-select: none; }
th:hover { color: var(--text); }
td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray); }
.td-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* FILTERS */
.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input { position: relative; }
.search-input input { padding-left: 32px; }
.search-input::before { content: '🔍'; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; pointer-events: none; }
.filter-select { padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; cursor: pointer; background: white; }

/* BADGES */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-green { background: #d3f9d8; color: #2f9e44; }
.badge-yellow { background: #fff3bf; color: #e67700; }
.badge-blue { background: #dbe4ff; color: #3b5bdb; }
.badge-gray { background: #f1f3f5; color: #868e96; }
.badge-red { background: #ffe3e3; color: #c92a2a; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-card .label { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.stat-card .value { font-size: 32px; font-weight: 700; color: var(--blue); }

/* COMPETITION CARDS */
.comp-card { background: white; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); display: flex; align-items: center; justify-content: space-between; }
.comp-card-info { flex: 1; }
.comp-card-title { font-size: 16px; font-weight: 600; margin: 6px 0 4px; }
.comp-card-meta { font-size: 13px; color: var(--muted); display: flex; gap: 16px; }
.comp-card-actions { display: flex; gap: 8px; align-items: center; }

/* FORM */
.form-section { margin-bottom: 20px; }
.form-section-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; color: var(--muted); font-weight: 500; }
.form-group .input { margin-bottom: 0; }
.toggle-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 14px; }
toggle-row input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }

/* PAGINATION */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; }
.page-btn { width: 32px; height: 32px; border: 1.5px solid var(--border); border-radius: 8px; background: white; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.page-btn.active { background: var(--blue); color: white; border-color: var(--blue); }
.page-btn:hover:not(.active) { border-color: var(--blue); color: var(--blue); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: white; border-radius: 16px; padding: 28px; min-width: 360px; max-width: 500px; width: 90%; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-type-btn { width: 100%; padding: 14px; border: 1.5px solid var(--border); border-radius: 10px; background: white; font-size: 15px; font-weight: 500; cursor: pointer; margin-bottom: 10px; transition: all .2s; color: var(--blue); }
.modal-type-btn:hover { border-color: var(--blue); background: var(--blue-light); }

/* TABS */
.tabs { display: flex; gap: 0; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--border); margin-bottom: 20px; width: fit-content; }
.tab { padding: 8px 20px; border: none; background: white; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); transition: all .2s; }
.tab.active { background: var(--blue-light); color: var(--blue); }

/* PROFILE CARD */
.profile-card { background: white; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 20px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: white; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }
.profile-info { flex: 1; }
.profile-name { font-size: 18px; font-weight: 700; }
.profile-role { font-size: 13px; color: var(--muted); margin-top: 2px; }

.error-msg { color: var(--red); font-size: 13px; margin-top: 8px; min-height: 18px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 15px; }

/* SWITCH */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 24px; transition: .3s; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
input:checked + .slider { background: var(--blue); }
input:checked + .slider:before { transform: translateX(20px); }

/* ===== UNIADE REDESIGN ===== */
/* Sidebar */
.sidebar { width: 279px; background: transparent; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-logo { width: 279px; height: 84px; min-height: 84px; background: #122587; display: flex; align-items: center; justify-content: center; padding: 0; border-bottom: none; flex-shrink: 0; }
.sidebar-logo-img { width: 97px; height: 52px; object-fit: contain; filter: brightness(0) invert(1); }
.sidebar-body { flex: 1; background: #FFFFFF; border-right: 1px solid #D2D8F9; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; overflow-y: auto; }
.nav-top { display: flex; flex-direction: column; gap: 12px; }
.nav-bottom { display: flex; flex-direction: column; gap: 12px; }
.nav-item { width: 239px; height: 44px; min-height: 44px; border-radius: 24px !important; padding: 12px 32px; display: flex; align-items: center; gap: 12px; color: #4A65E8; font-size: 16px; line-height: 19px; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .15s; background: transparent !important; }
.nav-item:hover { background: rgba(74,101,232,0.08) !important; color: #4A65E8; }
.nav-item.active { background: #4A65E8 !important; color: #FFFFFF !important; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 20px; display: flex; align-items: center; justify-content: center; font-size: 0; }
.nav-icon svg { width: 20px; height: 20px; display: block; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Global topbar override */
#global-topbar { height: 84px !important; min-height: 84px; padding: 0 40px !important; justify-content: flex-end !important; background: #FFFFFF; border-bottom: 1px solid #D2D8F9; display: flex; align-items: center; flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: 32px; }
.bell-btn { width: 32px; height: 32px; border: 1px solid #4A65E8; border-radius: 24px; display: flex; align-items: center; justify-content: center; color: #4A65E8; cursor: pointer; flex-shrink: 0; }
.bell-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top-user { display: flex; align-items: center; gap: 12px; }
.top-name { font-size: 16px; line-height: 19px; font-weight: 400; color: #1A1A1A; white-space: nowrap; }
.avatar-sm { width: 44px; height: 44px; border-radius: 50%; background: #D2D8F9; flex-shrink: 0; }

/* Dashboard screen */
.dash-screen { margin: -24px -40px; background: #F2F2F2; padding: 40px; min-height: calc(100vh - 84px); font-family: Roboto, Arial, sans-serif; }
.dash-top-row { display: flex; gap: 20px; margin-bottom: 20px; align-items: flex-start; }

/* Profile card */
.db-profile-card { flex: 0 0 391px; width: 391px; height: 140px; background: #FFFFFF; border-radius: 24px; padding: 20px; display: flex; align-items: center; gap: 20px; }
.db-avatar-lg { width: 100px; height: 100px; border-radius: 50%; background: #D2D8F9; flex-shrink: 0; }
.db-profile-text { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.db-profile-name { font-size: 24px; line-height: 28px; font-weight: 500; color: #1A1A1A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.db-profile-team { font-size: 18px; line-height: 21px; font-weight: 400; color: #666666; }

/* Stat cards */
.db-stat-card { flex: 0 0 325px; width: 325px; height: 139px; background: #FFFFFF; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.db-stat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.db-stat-title { font-size: 16px; line-height: 19px; font-weight: 500; color: #333333; flex: 1; }
.db-arrow-btn { width: 32px; height: 32px; border-radius: 24px; color: #4A65E8; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.db-arrow-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.db-stat-value { font-size: 56px; line-height: 66px; font-weight: 500; color: #4A65E8; }

/* Events panel */
.events-panel { background: #FFFFFF; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.events-title { font-size: 24px; line-height: 28px; font-weight: 500; color: #333333; }
.events-list { display: flex; flex-direction: column; gap: 12px; }
.event-card { border: 1px solid #A5B2F3; border-radius: 24px; background: #FFFFFF; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.event-top { display: flex; flex-direction: column; gap: 12px; }
.event-meta-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tag { height: 28px; border-radius: 24px; background: #DBF8D3; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; color: #2E8316; font-size: 12px; line-height: 14px; font-weight: 500; white-space: nowrap; }
.tiny-meta { display: flex; align-items: center; gap: 8px; color: #999999; font-size: 14px; line-height: 16px; font-weight: 400; white-space: nowrap; }
.tiny-meta svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.event-title { font-size: 20px; line-height: 23px; font-weight: 500; color: #1A1A1A; }
.event-bottom { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.event-meta-bottom { display: flex; align-items: center; gap: 20px; }
.details-btn { min-width: 120px; height: 32px; border: 0; border-radius: 24px; background: #4A65E8; color: #FFFFFF; display: inline-flex; justify-content: center; align-items: center; padding: 0 20px; font-size: 14px; line-height: 16px; font-weight: 500; font-family: inherit; cursor: pointer; }
.see-all { align-self: center; color: #4A65E8; font-size: 16px; line-height: 19px; font-weight: 500; cursor: pointer; }

/* ===== PAGES.JS DESIGN SYSTEM ===== */

/* Page layout */
#page-content { padding: 24px 40px; flex: 1; background: #F2F2F2; }
.page-title { font-size: 28px; font-weight: 700; color: #1A1A1A; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.back-btn { background: none; border: none; cursor: pointer; color: #4A65E8; display: flex; align-items: center; padding: 0; }
.form-section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #1A1A1A; }
.form-field-label { font-size: 13px; color: #999; margin-bottom: 4px; }
.req-star { color: #E5484D; margin-left: 2px; }

/* Pill inputs */
.input-pill { width: 100%; padding: 10px 16px; border: 1.5px solid #A5B2F3; border-radius: 24px; font-size: 15px; outline: none; transition: border .2s; background: white; font-family: inherit; color: #1A1A1A; }
.input-pill:focus { border-color: #4A65E8; }
.input-pill::placeholder { color: #A5B2F3; }
input[type="date"].input-pill::-webkit-calendar-picker-indicator { opacity: 0; width: 0; padding: 0; margin: 0; }
textarea.input-pill { resize: vertical; min-height: 100px; border-radius: 16px; line-height: 1.5; }
.float-label-wrap { position: relative; flex: 1; display: flex; flex-direction: column; }
.float-label { position: absolute; left: 16px; top: 10px; font-size: 15px; color: #A5B2F3; pointer-events: none; transition: all .15s; }
.float-label-wrap .input-pill:focus ~ .float-label,
.float-label-wrap .input-pill:not(:placeholder-shown) ~ .float-label { top: -10px; font-size: 11px; background: white; padding: 0 4px; color: #4A65E8; }

/* Search & filter inputs */
.input-search { padding: 10px 16px 10px 40px; border: 1.5px solid #A5B2F3; border-radius: 24px; font-size: 14px; outline: none; background: white; color: #1A1A1A; font-family: inherit; transition: border .2s; }
.input-search:focus { border-color: #4A65E8; }
.input-search::placeholder { color: #A5B2F3; }
.filter-date-pill { padding: 10px 40px 10px 16px; border: 1.5px solid #A5B2F3; border-radius: 24px; font-size: 14px; outline: none; background: white; color: #A5B2F3; font-family: inherit; min-width: 140px; cursor: pointer; transition: border .2s; }
.filter-date-pill:focus { border-color: #4A65E8; }
.filter-date-pill::placeholder { color: #A5B2F3; }
.filters { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }

/* Buttons */
.btn-primary { background: #4A65E8; color: white; border: none; padding: 10px 24px; border-radius: 24px; font-size: 15px; font-weight: 500; cursor: pointer; transition: opacity .2s; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; }
.btn-primary:hover { opacity: .88; }
.btn-secondary { background: white; color: #4A65E8; border: 1.5px solid #4A65E8; padding: 9px 20px; border-radius: 24px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; }
.btn-secondary:hover { background: #f0f3ff; }
.btn-danger { background: white; color: #E5484D; border: 1.5px solid #E5484D; padding: 9px 20px; border-radius: 24px; font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-family: inherit; }
.btn-export { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border: 1.5px solid #D2D8F9; border-radius: 24px; background: white; color: #4A65E8; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; transition: border .2s; }
.btn-export:hover { border-color: #4A65E8; }
.btn-bookmark { display: none !important; }
.btn-icon { background: none; border: 1.5px solid #D2D8F9; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #4A65E8; transition: all .2s; flex-shrink: 0; }
.btn-icon:hover { border-color: #4A65E8; }
.btn-icon.del { color: #E5484D; }
.btn-icon.del:hover { border-color: #E5484D; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Card */
.card { background: white; border-radius: 24px; padding: 24px; }

/* Custom dropdown */
.dd { position: relative; display: inline-flex; flex-direction: column; }
.dd-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border: 1.5px solid #A5B2F3; border-radius: 24px; background: white; cursor: pointer; font-size: 14px; color: #1A1A1A; font-family: inherit; min-width: 0; width: 100%; transition: border .2s; white-space: nowrap; }
.dd-trigger.dd-open, .dd-trigger:focus { border-color: #4A65E8; outline: none; }
.dd-label { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-placeholder { color: #A5B2F3; }
.dd-muted .dd-label { color: #A5B2F3; }
.dd-chevron { flex-shrink: 0; transition: transform .2s; }
.dd-trigger.dd-open .dd-chevron { transform: rotate(180deg); }
.dd-panel { display: none; position: fixed; background: white; border: 1.5px solid #D2D8F9; border-radius: 16px; box-shadow: 0 8px 24px rgba(74,101,232,.12); z-index: 9999; overflow-y: auto; max-height: 280px; padding: 8px 0; }
.dd-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; cursor: pointer; font-size: 14px; color: #1A1A1A; gap: 8px; transition: background .12s; }
.dd-item:hover { background: #f0f3ff; }
.dd-item.selected { color: #4A65E8; }
.dd-item-text { flex: 1; }
.dd-check { flex-shrink: 0; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: white; border-radius: 24px; }
th { text-align: left; padding: 14px 16px; color: #999; font-size: 13px; font-weight: 500; border-bottom: 1px solid #D2D8F9; cursor: pointer; user-select: none; }
td { padding: 14px 16px; border-bottom: 1px solid #F2F2F2; vertical-align: middle; color: #1A1A1A; font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbff; }
.td-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; }
.page-btn { width: 36px; height: 36px; border: 1.5px solid #D2D8F9; border-radius: 50%; background: white; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all .2s; color: #4A65E8; font-family: inherit; }
.page-btn.active { background: #4A65E8; color: white; border-color: #4A65E8; }
.page-btn:hover:not(.active):not(:disabled) { border-color: #4A65E8; }
.page-btn:disabled { opacity: .4; cursor: default; }

/* Form rows */
.form-section { margin-bottom: 24px; }
.form-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.form-row.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.toggle-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: #1A1A1A; }

/* Competition cards (Figma event-card style) */
.comp-card { background: #FFFFFF; border: 1px solid #A5B2F3; border-radius: 24px; padding: 20px; margin-bottom: 12px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; box-shadow: none !important; }
.comp-card-info { width: 100%; }
.comp-card-top { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.comp-card-date-range { display: flex; align-items: center; gap: 6px; color: #999; font-size: 14px; }
.comp-card-title { font-size: 20px; font-weight: 500; color: #1A1A1A; margin: 0 0 12px; }
.comp-card-meta { display: flex; align-items: center; gap: 16px; color: #999; font-size: 14px; flex: 1; }
.comp-card-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.comp-card-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Badge / Status tags */
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 14px; border-radius: 24px; font-size: 12px; font-weight: 500; white-space: nowrap; height: 28px; }
.badge-green { background: #DBF8D3; color: #2E8316; }
.badge-yellow { background: #FFF3BF; color: #A86800; }
.badge-blue { background: #DBE4FF; color: #3B5BDB; }
.badge-gray { background: #F1F3F5; color: #666; }
.badge-red { background: #FFE3E3; color: #C92A2A; }

/* Dashboard (pages.js version, for backwards compat) */
.dashboard-top { display: flex; gap: 20px; margin-bottom: 20px; align-items: stretch; flex-wrap: wrap; }
.profile-block { flex: 0 0 391px; background: white; border-radius: 24px; padding: 20px; display: flex; align-items: center; gap: 20px; }
.avatar-lg-img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.stat-block { flex: 1; min-width: 200px; background: white; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-label { font-size: 16px; font-weight: 500; color: #333; display: flex; align-items: center; justify-content: space-between; }
.stat-value { font-size: 56px; font-weight: 500; color: #4A65E8; line-height: 1.1; }
.section-card { background: white; border-radius: 24px; padding: 20px; }
.section-title { font-size: 24px; font-weight: 500; color: #333; margin-bottom: 16px; }

/* Outline button (Оставить заявку style) */
.ev-outline-btn { min-width: 140px; height: 32px; border: 1.5px solid #4A65E8; border-radius: 24px; background: white; color: #4A65E8; display: inline-flex; justify-content: center; align-items: center; padding: 0 16px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; transition: background .15s; }
.ev-outline-btn:hover { background: #f0f3ff; }
.ev-trash-btn { width: 32px; height: 32px; border: 1.5px solid #D2D8F9; border-radius: 50%; background: white; color: #E5484D; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: border .15s; padding: 0; }
.ev-trash-btn:hover { border-color: #E5484D; }
.ev-trash-btn svg { stroke: currentColor; }

/* My-comp card top row */
.mc-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mc-card-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Tabs */
.main-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: white; border-radius: 24px; padding: 6px; border: 1.5px solid #D2D8F9; width: fit-content; }
.main-tab { padding: 8px 20px; border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; color: #999; border-radius: 20px; transition: all .2s; font-family: inherit; }
.main-tab.active { background: #4A65E8; color: white; }
.sub-tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.sub-tab { padding: 8px 20px; border: 1.5px solid #D2D8F9; background: white; cursor: pointer; font-size: 13px; font-weight: 500; color: #999; border-radius: 20px; transition: all .2s; font-family: inherit; }
.sub-tab.active { border-color: #4A65E8; color: #4A65E8; background: #f0f3ff; }

/* Category rows */
.cat-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #F2F2F2; }
.cat-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 24px; background: #f0f3ff; color: #4A65E8; font-size: 13px; font-weight: 500; gap: 6px; }

/* Upload zone */
.upload-zone { border: 2px dashed #D2D8F9; border-radius: 16px; padding: 40px 20px; text-align: center; cursor: pointer; transition: border .2s; background: white; }
.upload-zone:hover { border-color: #4A65E8; }
.upload-zone-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #999; }
.upload-zone-text { font-size: 15px; color: #4A65E8; font-weight: 500; }

/* Analytics */
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.analytics-card { background: white; border-radius: 16px; padding: 20px; }
.analytics-label { font-size: 13px; color: #999; margin-bottom: 8px; }
.analytics-val { font-size: 32px; font-weight: 700; color: #4A65E8; }
.analytics-mini { font-size: 13px; color: #999; margin-top: 4px; }
.analytics-stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #F2F2F2; font-size: 14px; }

/* Accordion */
.accordion-section { margin-bottom: 12px; }
.accordion-hdr { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: white; border-radius: 16px; cursor: pointer; font-size: 15px; font-weight: 500; color: #1A1A1A; border: 1.5px solid #D2D8F9; gap: 12px; transition: border .2s; }
.accordion-hdr:hover { border-color: #4A65E8; }
.accordion-body { padding: 16px 20px; background: white; border-radius: 0 0 16px 16px; border: 1.5px solid #D2D8F9; border-top: none; display: none; }
.acc-chevron { flex-shrink: 0; transition: transform .2s; stroke: #4A65E8; }

/* Email grid */
.email-grid { display: flex; flex-direction: column; gap: 8px; }
.email-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #f8f9ff; border-radius: 12px; font-size: 14px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: white; border-radius: 24px; padding: 32px; min-width: 360px; max-width: 480px; width: 90%; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: #1A1A1A; text-align: center; }
.modal-actions { display: flex; flex-direction: column; gap: 12px; }
.modal-type-btn { width: 100%; padding: 14px; border: 1.5px solid #D2D8F9; border-radius: 24px; background: white; font-size: 16px; font-weight: 500; cursor: pointer; color: #4A65E8; font-family: inherit; transition: border .2s; }
.modal-type-btn:hover { border-color: #4A65E8; background: #f0f3ff; }

/* Error/empty */
.error-msg { color: #E5484D; font-size: 13px; margin-top: 8px; min-height: 18px; }
.empty-state { text-align: center; padding: 60px 20px; color: #999; font-size: 15px; }

/* ===== FIXES FROM REFERENCE HTML ===== */


/* Page title: 32px 500 like reference */
.page-title { font-size: 32px !important; font-weight: 500 !important; }

/* Search/filter border: #A5B2F3 like reference, height 44px */
.input-search { border: 1px solid #A5B2F3 !important; height: 44px; padding: 12px 20px 12px 40px !important; font-size: 16px !important; }
.filter-date-pill { border: 1px solid #A5B2F3 !important; height: 44px !important; font-size: 16px !important; }
.dd-trigger { border: 1px solid #A5B2F3 !important; height: 44px !important; font-size: 16px !important; padding: 12px 20px !important; }

/* Export/primary buttons: 44px height, 16px, bigger padding */
.btn-export { height: 44px !important; border: 1px solid #4A65E8 !important; font-size: 16px !important; padding: 12px 32px !important; }
.btn-primary { height: 44px !important; font-size: 16px !important; padding: 12px 32px !important; line-height: 1; }

/* Delete button: pink #E2508F like reference */
.btn-icon.del { color: #E2508F !important; }
.btn-icon.del:hover { border-color: #E2508F !important; }
.ev-trash-btn { color: #E2508F !important; }
.ev-trash-btn:hover { border-color: #E2508F !important; }

/* Table header: #788BED color, 16px */
th { color: #788BED !important; font-size: 16px !important; font-weight: 400 !important; text-transform: none !important; }
td { border-bottom: 1px solid #E6E6E6 !important; font-size: 16px !important; }
tr:last-child td { border-bottom: none !important; }

/* Alternating table rows */

/* Round action icons (edit=blue, del=pink) */
.btn-icon { border-radius: 24px !important; width: 32px !important; height: 32px !important; }

/* Input-pill height 44px */
.input-pill { height: 44px; padding: 10px 16px !important; }
textarea.input-pill { height: auto !important; }

/* event-card remove fixed width */
.event-card { width: 100% !important; }
.event-top { width: 100% !important; }
.event-bottom { width: 100% !important; }
.event-title { width: 100% !important; }
.events-title { width: 100% !important; font-size: 24px; font-weight: 500; color: #333333; }
.events-list { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.see-all { align-self: flex-start; }
.events-panel { align-items: stretch !important; }

/* Top-name right size */
.top-name { font-size: 16px; font-weight: 400; color: #1A1A1A; white-space: nowrap; }

/* Secondary btn height 44px too for consistency */
.btn-secondary { height: 44px !important; font-size: 16px !important; padding: 12px 32px !important; }

.page-header .btn-primary { height: 44px !important; font-size: 16px !important; padding: 12px 32px !important; }

/* Nav icons: thin outline, fill:none, stroke-only like reference */
.nav-icon svg { fill: none !important; stroke: currentColor !important; stroke-width: 1.5 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }

/* Figma icons are fill-based (Phosphor Regular) - override previous fill:none */
.nav-icon svg { fill: currentColor !important; stroke: none !important; stroke-width: 0 !important; }

/* ─── TYPOGRAPHY FIXES ─────────────────────────────────────────── */
.sidebar-body { font-family: Roboto, Arial, sans-serif; }
.nav-item { font-family: Roboto, Arial, sans-serif; }
#global-topbar, .top-name { font-family: Roboto, Arial, sans-serif; }
.stat-value { line-height: 66px !important; }
.stat-label { line-height: 19px; }
.section-title { line-height: 28px; }
.comp-card-title { line-height: 23px; }
.comp-card-meta { line-height: 16px; }
.comp-card-date-range { line-height: 16px; }
.badge { line-height: 14px; }
.dashboard-heading { font-family: Manrope, sans-serif; font-size: 50px; line-height: 54px; font-weight: 600; color: #020202; margin-bottom: 20px; }

/* ===== CENTERED 1440 APP FRAME ===== */
body {
  background: #FFFFFF !important;
}

#main-app.layout {
  width: 1440px;
  min-width: 1440px;
  min-height: 1024px;
  margin: 0 auto;
  overflow: hidden;
  background: #F2F2F2;
  border-left: 1px solid #D2D8F9;
  border-right: 1px solid #D2D8F9;
}

#main-app .sidebar {
  flex: 0 0 279px;
  width: 279px;
  min-height: 1024px;
}

#main-app .content {
  flex: 0 0 1161px;
  width: 1161px;
  min-height: 1024px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===== DASHBOARD DESIGN FIXES ===== */
#main-app {
  font-family: 'Roboto', Arial, sans-serif !important;
}

#main-app .events-panel {
  min-height: 617px;
}

#main-app .event-card {
  min-height: 147px;
}

#main-app .see-all {
  align-self: center !important;
  margin-top: auto;
}

#main-app .avatar-sm,
#main-app .db-avatar-lg {
  
  background-size: cover;
  background-position: center;
  background-color: transparent;
}

/* ===== GYMNAST PROFILE PAGE ===== */
.gp-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.gp-gymnast-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
}
.avatar-gp {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #D2D8F9;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-color: #D2D8F9;
}
.gp-gymnast-name {
  font-size: 20px;
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.3;
}
.gp-gymnast-sub {
  font-size: 13px;
  color: #999;
  margin-top: 5px;
}
.gp-info-card {
  padding: 20px 24px;
}
.gp-info-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 8px;
}
.gp-info-value {
  font-size: 32px;
  font-weight: 700;
  color: #4A65E8;
  line-height: 1;
}
.gp-info-note {
  font-size: 13px;
  color: #999;
  margin-top: 6px;
}
.gp-main-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.gp-left-col, .gp-right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sums-table-head {
  margin-bottom: 16px;
}
.sums-table-title {
  font-size: 17px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 4px;
}
.sums-table-note {
  font-size: 13px;
  color: #999;
}
.sums-table {
  width: 100%;
  border-collapse: collapse;
}
.sums-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: #999;
  padding: 8px 10px;
  border-bottom: 1px solid #E6E6E6;
  white-space: nowrap;
}
.sums-table td {
  padding: 10px;
  border-bottom: 1px solid #F5F5F5;
  font-size: 14px;
}
.sums-table tr:last-child td { border-bottom: none; }
.sums-table tr.gp-active td { background: #F5F7FF; }
.tournament-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}
.tournament-date {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}
.sums-value {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}
.sums-total {
  font-size: 15px;
  font-weight: 700;
  color: #4A65E8;
}
.sums-delta-pos { font-size: 13px; font-weight: 500; color: #2E8316; }
.sums-delta-neg { font-size: 13px; font-weight: 500; color: #E2508F; }
.sums-delta-first { font-size: 12px; color: #999; }
.result-breakdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.result-breakdown-title {
  font-size: 18px;
  font-weight: 600;
  color: #1A1A1A;
}
.result-breakdown-subtitle {
  margin-top: 4px;
  color: #999;
  font-size: 13px;
}
.result-breakdown-badge {
  height: 28px;
  border-radius: 24px;
  background: #DBF8D3;
  color: #2E8316;
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.apparatus-tabs-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.apparatus-bottom-tab {
  height: 36px;
  border-radius: 24px;
  border: 1px solid #D2D8F9;
  background: #fff;
  color: #4A65E8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.apparatus-bottom-tab.active {
  background: #4A65E8;
  border-color: #4A65E8;
  color: #fff;
}
.component-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.component-card {
  border: 1px solid #A5B2F3;
  border-radius: 16px;
  padding: 10px 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.component-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font-size: 12px;
}
.component-name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}
.bar-da { background: #4A65E8; }
.bar-db { background: #2E8316; }
.bar-a  { background: #E2508F; }
.bar-e  { background: #333; }
.bar-sum { background: #122587; }
.component-value {
  color: #1A1A1A;
  font-size: 22px;
  font-weight: 600;
}
.component-value.sum-value { color: #4A65E8; }
.result-breakdown-footer {
  border-top: 1px solid #E6E6E6;
  padding-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.result-note-label { color: #999; font-size: 12px; margin-bottom: 4px; }
.result-note-value { color: #333; font-size: 14px; font-weight: 500; }
.charts-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.charts-title { font-size: 17px; font-weight: 600; color: #1A1A1A; }
.apparatus-label {
  font-size: 13px;
  color: #4A65E8;
  background: #EEF0FD;
  border-radius: 12px;
  padding: 3px 12px;
}
.apparatus-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.apparatus-tab {
  height: 32px;
  border-radius: 20px;
  border: 1px solid #D2D8F9;
  background: #fff;
  color: #4A65E8;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.apparatus-tab.active {
  background: #4A65E8;
  border-color: #4A65E8;
  color: #fff;
}
.legend-row { display: flex; gap: 16px; margin-bottom: 14px; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #666; }
.legend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.legend-dot.da { background: #4A65E8; }
.legend-dot.db { background: #2E8316; }
.legend-dot.a  { background: #E2508F; }
.legend-dot.e  { background: #333; }
.legend-dot.sum { background: #122587; }
.metric-chart-list { display: flex; flex-direction: column; gap: 14px; }
.metric-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.metric-chart-name { font-size: 13px; color: #666; }
.metric-chart-delta { font-size: 13px; font-weight: 500; color: #2E8316; }
.metric-chart-svg { width: 100%; height: 72px; display: block; overflow: visible; }
.metric-chart-svg .gridline { stroke: #E6E6E6; stroke-width: 1; }
.metric-chart-svg .axis-text { font-size: 10px; fill: #999; }
.metric-line-da { fill: none; stroke: #4A65E8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric-line-db { fill: none; stroke: #2E8316; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric-line-a  { fill: none; stroke: #E2508F; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric-line-e  { fill: none; stroke: #333;    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric-line-sum { fill: none; stroke: #122587; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.metric-dot { fill: #fff; stroke-width: 2; }
.metric-dot.da { stroke: #4A65E8; }
.metric-dot.db { stroke: #2E8316; }
.metric-dot.a  { stroke: #E2508F; }
.metric-dot.e  { stroke: #333; }
.metric-dot.sum { stroke: #122587; }
.gp-empty-charts {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
}

.contact-chip { display:inline-flex;align-items:center;gap:6px;padding:5px 10px 5px 14px;background:#EEF1FD;border:1.5px solid #A5B2F3;border-radius:20px;font-size:14px;color:#2B3A8A;white-space:nowrap; }
.chip-remove { background:none;border:none;cursor:pointer;color:#9AA4CC;padding:0;line-height:1;font-size:13px;display:flex;align-items:center; }
.chip-remove:hover { color:var(--danger); }
.data-table { width:100%;border-collapse:collapse; }
.data-table th { text-align:left;padding:10px 16px;font-size:13px;color:var(--muted);font-weight:500;border-bottom:1.5px solid var(--line);background:#FAFBFF; }
.data-table td { padding:12px 16px;font-size:14px;border-bottom:1px solid var(--line);vertical-align:top; }
.data-table tbody tr:hover { background:#F5F7FF; }
.data-table tbody tr:last-child td { border-bottom:none; }



/* ── Report bug button ── */
.report-bug-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted, #888);
  background: transparent;
  border: 1px solid var(--line, #E2E6F0);
  border-radius: 20px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.report-bug-btn:hover {
  color: var(--primary, #4A6CF7);
  border-color: var(--primary, #4A6CF7);
  background: #F0F3FF;
}

/* ── Toast ── */
.toast {
  padding: 12px 22px;
  background: #1E293B;
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  pointer-events: none;
  animation: toast-in .2s ease;
}
@keyframes toast-in {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}


/* ── Wizard ── */
.wizard-steps { display:flex; gap:0; margin-bottom:24px; }
.wizard-step { flex:1; padding:12px 8px; text-align:center; border-bottom:3px solid var(--line); color:var(--muted); font-size:13px; transition:all .2s; }
.wizard-step.active { border-color:var(--primary); color:var(--primary); font-weight:600; }
.wizard-step.done { border-color:#22c55e; color:#22c55e; }
.wizard-step-num { font-size:20px; font-weight:700; margin-bottom:2px; }
.toggle-row { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:14px; }
.doc-item { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--line); }
.doc-item a { flex:1; font-size:13px; color:var(--primary); overflow:hidden; text-overflow:ellipsis; }

/* ── WYSIWYG ── */
.wysiwyg-toolbar { display:flex; gap:3px; padding:6px 8px; background:#F8F9FF; border:1px solid var(--line); border-radius:8px 8px 0 0; flex-wrap:wrap; align-items:center; }
.wysiwyg-toolbar button { padding:4px 8px; border:1px solid var(--line); border-radius:4px; background:#fff; cursor:pointer; font-size:13px; min-width:28px; line-height:1; }
.wysiwyg-toolbar button:hover { background:var(--primary); color:#fff; border-color:var(--primary); }
.wysiwyg-sep { width:1px; height:16px; background:var(--line); margin:0 4px; }
.wysiwyg-content { min-height:120px; padding:12px; border:1px solid var(--line); border-top:none; border-radius:0 0 8px 8px; outline:none; font-size:14px; line-height:1.6; }
.wysiwyg-content:empty::before { content: attr(placeholder); color: var(--muted); }

/* ── Upload zone ── */
.upload-zone { border:2px dashed var(--line); border-radius:8px; padding:20px; text-align:center; color:var(--muted); cursor:pointer; font-size:14px; transition:border-color .15s,color .15s; }
.upload-zone:hover { border-color:var(--primary); color:var(--primary); }

/* ── DnD categories ── */
.cat-row { display:flex; align-items:center; gap:8px; padding:8px 12px; border:1px solid var(--line); border-radius:6px; margin-bottom:4px; background:#fff; transition:background .1s,border-color .1s; cursor:default; }
.cat-row.dragging { opacity:0.4; }
.cat-row.drag-over { border-top:3px solid var(--primary); }
.drag-handle { cursor:grab; color:var(--muted); font-size:16px; user-select:none; flex-shrink:0; }
.drag-handle:active { cursor:grabbing; }
.cat-name { flex:1; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── Badges ── */
.badge { display:inline-block; padding:3px 10px; border-radius:12px; font-size:12px; font-weight:500; line-height:1.4; }
.badge-green { background:#D1FAE5; color:#065F46; }
.badge-gray { background:#F3F4F6; color:#6B7280; }
.badge-blue { background:#EEF2FF; color:#3730A3; }
.badge-yellow { background:#FEF3C7; color:#92400E; }
.badge-red { background:#FEE2E2; color:#991B1B; }

.empty-hint { color: var(--muted, #888); font-size: 13px; }
