/* بوابة الأمن والسلامة المدرسية - الثانوية 152 بنات */

:root {
  --color-primary: #13B6A7;
  --color-primary-dark: #0F9B8E;
  --color-primary-light: #CFEFEA;
  --color-success: #2DBA63;
  --color-info: #2C9FD6;
  --color-warning: #E0A50F;
  --color-danger: #DC2626;
  --color-text-dark: #1F3340;
  --color-text-secondary: #6D7D85;
  --color-bg-soft: #F7FBFC;
  --color-border: #E6EDF1;
}

html, body {
  font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}

.font-tajawal { font-family: 'Tajawal', 'Cairo', sans-serif; }
.font-cairo { font-family: 'Cairo', 'Tajawal', sans-serif; }

/* الأقسام والبطاقات */
.section-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 32, 39, 0.04);
  transition: box-shadow .2s;
}
.section-card:hover {
  box-shadow: 0 6px 16px rgba(15, 32, 39, 0.06);
}

.item-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1rem;
  transition: all .2s;
}
.item-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* تقدم */
.progress-bar {
  height: 10px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar > div {
  height: 100%;
  border-radius: 999px;
  transition: width .6s ease;
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-success { background:#DCFCE7; color:#15803D; }
.badge-warning { background:#FEF3C7; color:#92400E; }
.badge-danger  { background:#FEE2E2; color:#B91C1C; }
.badge-info    { background:#DBEAFE; color:#1D4ED8; }
.badge-normal  { background:#E2E8F0; color:#475569; }
.badge-internal { background:#EDE9FE; color:#5B21B6; }

/* التبويبات في لوحة التحكم */
.admin-tab {
  color: #475569;
  background: transparent;
  transition: all .15s;
  white-space: nowrap;
}
.admin-tab:hover { background:#F1F5F9; }
.admin-tab.active {
  background: var(--color-primary);
  color: #fff;
}

/* الأزرار العامة */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  padding: .55rem 1.1rem;
  border-radius: .75rem;
  transition: background .15s;
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #E2E8F0;
  font-weight: 700;
  padding: .55rem 1.1rem;
  border-radius: .75rem;
  transition: background .15s;
}
.btn-secondary:hover { background:#F8FAFC; }

.btn-danger {
  background: #FEE2E2;
  color: #B91C1C;
  font-weight: 700;
  padding: .45rem .9rem;
  border-radius: .65rem;
  transition: background .15s;
}
.btn-danger:hover { background:#FECACA; }

.input-field {
  width: 100%;
  padding: .65rem .85rem;
  border-radius: .75rem;
  border: 1px solid #E2E8F0;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
}
.input-field:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(19, 182, 167, .15);
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: .25rem;
}

/* Toasts */
.toast {
  background: #1F3340;
  color: #fff;
  padding: .65rem 1.2rem;
  border-radius: .65rem;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
  animation: slideUp .25s ease;
}
.toast.toast-success { background:#15803D; }
.toast.toast-error   { background:#B91C1C; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* الجدول البسيط */
.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.simple-table th {
  background: #F8FAFC;
  text-align: right;
  padding: 10px;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid var(--color-border);
}
.simple-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}
.simple-table tbody tr:hover { background: #F8FAFC; }

/* Drag handle */
.drag-handle {
  cursor: grab;
  color: #94A3B8;
}
.drag-handle:active { cursor: grabbing; }

/* أزرار أيقونية صغيرة (في رؤوس الأقسام والبنود) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #94A3B8;
  background: transparent;
  transition: all .12s;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: #F1F5F9;
  color: #475569;
}

.sortable-ghost {
  opacity: .4;
  background:#F1F5F9 !important;
}

/* الطباعة */
@media print {
  body { background: #fff !important; }
  .no-print, .print\\:hidden { display: none !important; }
  #report-content {
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
  }
  .item-card, .section-card {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    break-inside: avoid;
  }
}

/* responsive */
@media (max-width: 640px) {
  .section-card { padding: 1rem; }
}
