@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200;300;400;500;600;700;800&display=swap');

* { font-family: 'Assistant', sans-serif !important; box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; }
body { background: #F5F6F9; color: #0F172A; }

:root {
  --alabaster:       #F5F6F9;
  --charcoal:        #0F172A;
  --platinum:        #94A3B8;
  --celadon-mist:    #D4E8E6;
  --celadon-vapor:   #7FB8B3;
  --celadon-mineral: #1F8B83;
  --celadon:         #0E6E68;
  --celadon-abyss:   #0A5853;
  --celadon-void:    #063D3A;
  --success:         #0F8C5C;
  --warning:         #B8741A;
  --error:           #B23A2D;
  --info:            #3F4E7A;
}

/* GRADIENTS */
.gradient-hero   { background: linear-gradient(135deg, #0A5853 0%, #0E6E68 55%, #1F8B83 100%); }
.gradient-button { background: linear-gradient(180deg, #0E6E68 0%, #0A5853 100%); }
.gradient-card   { background: linear-gradient(160deg, #D4E8E6 0%, #F5F6F9 100%); }
.gradient-dark   { background: linear-gradient(180deg, #063D3A 0%, #0A5853 100%); }

/* BUTTONS */
.btn-primary {
  background: linear-gradient(180deg, #0E6E68 0%, #0A5853 100%);
  color: #F5F6F9;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(14,110,104,0.25);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: linear-gradient(180deg, #0A5853 0%, #0E6E68 100%); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: #0E6E68;
  border: 1.5px solid #0E6E68;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: #D4E8E6; }
.btn-danger {
  background: #B23A2D;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* CARDS */
.card {
  background: #F5F6F9;
  border: 1px solid #D4E8E6;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(14,110,104,0.06);
}
.card-featured { background: linear-gradient(160deg, #D4E8E6 0%, #F5F6F9 100%); }

/* STATUS PILLS */
.pill { border-radius: 20px; padding: 3px 12px; font-size: 11px; font-weight: 700; display: inline-block; }
.pill-focus     { background: #D4E8E6; color: #063D3A; }
.pill-general   { background: #F1F5F9; color: #475569; }
.pill-presenter { background: #0E6E68; color: #F5F6F9; }
.pill-joined    { background: #0F8C5C; color: #F5F6F9; }
.pill-leader    { background: #0E6E68; color: #F5F6F9; }
.pill-ok        { background: #D1FAE5; color: #0F8C5C; }
.pill-warning   { background: #FEF3C7; color: #B8741A; }
.pill-last      { background: #FEE2E2; color: #B23A2D; }

/* KICKER */
.kicker {
  font-size: 11px;
  font-weight: 700;
  color: #0E6E68;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: #0F172A;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 16px;
  text-align: start;
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid #D4E8E6; font-size: 14px; }
.data-table tr:hover { background: rgba(14,110,104,0.04); }
.data-table tr.rank-1 td { background: linear-gradient(160deg, #D4E8E6 0%, #F5F6F9 100%); }
.data-table tr.rank-last { border-inline-start: 3px solid #B23A2D; }
.data-table tr.joined td { background: rgba(15,140,92,0.06); }

/* FORM */
.form-group { margin-bottom: 20px; }
.form-label { font-size: 12px; font-weight: 700; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 6px; }
.form-input { width: 100%; padding: 11px 14px; border: 1.5px solid #D4E8E6; border-radius: 8px; background: #F5F6F9; color: #0F172A; font-size: 14px; outline: none; transition: border-color 0.2s; }
.form-input:focus { border-color: #0E6E68; box-shadow: 0 0 0 3px rgba(14,110,104,0.12); }

/* RADIO PILLS */
.radio-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill input[type="radio"] { display: none; }
.radio-pill label {
  padding: 8px 16px;
  border: 1.5px solid #D4E8E6;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.2s;
}
.radio-pill input:checked + label { border-color: #0E6E68; background: #D4E8E6; color: #063D3A; }

/* TOGGLE */
.toggle { position: relative; width: 48px; height: 26px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: #D4E8E6; border-radius: 26px; cursor: pointer; transition: .3s; }
.toggle-slider:before { content:''; position: absolute; width: 20px; height: 20px; inset-block-start: 3px; inset-inline-start: 3px; background: white; border-radius: 50%; transition: .3s; }
input:checked + .toggle-slider { background: #0F8C5C; }
input:checked + .toggle-slider:before { transform: translateX(-22px); }

/* TOAST */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: 14px; color: #F5F6F9; animation: slideDown .2s ease; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.toast-success { background: #0F8C5C; }
.toast-error   { background: #B23A2D; }
.toast-info    { background: #3F4E7A; }
@keyframes slideDown { from { opacity:0; transform: translateX(-50%) translateY(-12px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }

/* MODAL */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.55); z-index: 999; display: flex; align-items: center; justify-content: center; }
.modal { background: #F5F6F9; border-radius: 16px; padding: 32px; max-width: 480px; width: 90%; box-shadow: 0 24px 48px rgba(0,0,0,.2); }

/* TABS */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #D4E8E6; margin-bottom: 28px; overflow-x: auto; }
.tab { padding: 10px 18px; font-size: 13px; font-weight: 600; color: #94A3B8; border: none; background: none; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; white-space: nowrap; }
.tab.active { color: #0E6E68; border-bottom-color: #0E6E68; }

/* SCORE PREVIEW */
.score-preview { background: linear-gradient(160deg, #D4E8E6 0%, #F5F6F9 100%); border: 1.5px solid #0E6E68; border-radius: 10px; padding: 16px 20px; margin-bottom: 20px; }
.score-preview-pts { font-size: 36px; font-weight: 800; color: #0E6E68; }

/* KPI CARDS */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.kpi-card { background: white; border: 1px solid #D4E8E6; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(14,110,104,0.06); }
.kpi-value { font-size: 32px; font-weight: 800; color: #0E6E68; }
.kpi-label { font-size: 12px; font-weight: 600; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; }

/* HEADER */
.site-header { color: white; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.header-meta { font-size: 13px; opacity: 0.85; }

/* CONTAINER */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { margin-bottom: 32px; }
.section-title { font-size: 18px; font-weight: 700; color: #0F172A; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* FOOTER */
.site-footer { color: rgba(255,255,255,0.7); text-align: center; padding: 20px; font-size: 13px; margin-top: 48px; }

/* INLINE EDIT */
.icon-btn { background: none; border: none; cursor: pointer; padding: 6px; border-radius: 6px; color: #94A3B8; transition: all 0.2s; }
.icon-btn:hover { background: #D4E8E6; color: #0E6E68; }
.icon-btn.danger:hover { background: #FEE2E2; color: #B23A2D; }

/* COMBOBOX */
.combobox-wrap { position: relative; }
.combobox-dropdown { position: absolute; top: 100%; inset-inline-start: 0; width: 100%; background: white; border: 1.5px solid #D4E8E6; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); z-index: 100; max-height: 200px; overflow-y: auto; margin-top: 4px; }
.combobox-item { padding: 10px 14px; cursor: pointer; font-size: 14px; }
.combobox-item:hover, .combobox-item.active { background: #D4E8E6; color: #063D3A; }
.combobox-item.add-new { color: #0E6E68; font-weight: 600; border-top: 1px solid #D4E8E6; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .site-header { flex-direction: column; align-items: flex-start; padding: 16px; }
  .container { padding: 0 16px; }
  .data-table th, .data-table td { padding: 10px 12px; font-size: 13px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
}
