/* ========================================
   Enterprise V9 - Unified CSS System
   מערכת CSS מאוחדת ומקצועית
   Tailwind CSS v4 + Custom Components
   ======================================== */

@layer components {

/* Tailwind CSS - נטען דרך base.html, אז לא צריך כאן */
/* @tailwind base; */
/* @tailwind components; */
/* @tailwind utilities; */

/* ========================================
   Enhanced Variables - משתנים משופרים
   כולל תמיכה ב-Dark Mode ומערכת צבעים מתקדמת
   ======================================== */
/* הערה: כל הקבצים האלה כבר נטענים ב-base.html בסדר הנכון */
/* אין צורך לייבא אותם כאן כדי למנוע כפילויות */
/* @import "design-system/variables-enhanced.css"; - נטען דרך tokens.css */
/* @import "design-system.css"; - לא קיים */
/* @import "accessibility-enhanced.css"; - נטען ב-base.html */
/* @import "utilities/rtl-advanced.css"; - נטען ב-base.html */
/* @import "advanced-components.css"; - נטען ב-base.html */
/* @import "components-enhanced.css"; - נטען ב-base.html */
/* @import "dark-mode-enhanced.css"; - נטען ב-base.html */
/* @import "theme-system.css"; - נטען ב-base.html */
/* @import "animations-enhanced.css"; - נטען ב-base.html */

/* ========================================
   Unified Component System
   ======================================== */

/* הערה: כללי כפתורים (buttons) הועברו ל-components/buttons.css */
/* כללי כפתורים מאוחדים נמצאים ב-components/buttons.css */

/* כלל פוקוס בסיסי אחד (במקום לשכפל בכל וריאנט) */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  @apply outline-none ring-2 ring-offset-2;
}

/* Form System - שימוש בטוקנים */
.form-group {
  @apply mb-4;
}

.form-label {
  @apply block text-sm font-medium text-gray-700 mb-1;
}

.form-input {
  @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200;
}

.form-select {
  @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200;
}

.form-textarea {
  @apply w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 resize-y;
}

.form-error {
  @apply text-sm text-red-600 mt-1;
}

.form-help {
  @apply text-sm text-gray-500 mt-1;
}

/* Card System */
.card {
  @apply bg-secondary-800 rounded-lg shadow-sm border border-secondary-600 overflow-hidden;
}

.card-header {
  @apply px-6 py-4 border-b border-secondary-600 bg-secondary-700;
}

.card-body {
  @apply px-6 py-4;
}

.card-footer {
  @apply px-6 py-4 border-t border-secondary-600 bg-secondary-700;
}

/* Table System */
.table {
  @apply min-w-full divide-y divide-gray-200;
}

.table th {
  @apply px-6 py-3 text-xs font-medium text-gray-300 uppercase tracking-wider bg-secondary-700;
}

.table td {
  @apply px-6 py-4 whitespace-nowrap text-sm text-gray-100;
}

.table-striped tbody tr:nth-child(even) {
  @apply bg-secondary-700;
}

/* Alert System - שימוש בטוקנים */
.alert {
  @apply px-4 py-3 rounded-md border;
}

.alert-success {
  @apply p-4 rounded-md border bg-green-50 border-green-200 text-green-800;
}

.alert-warning {
  @apply p-4 rounded-md border bg-yellow-50 border-yellow-200 text-yellow-800;
}

.alert-error {
  @apply p-4 rounded-md border bg-red-50 border-red-200 text-red-800;
}

.alert-info {
  @apply p-4 rounded-md border bg-blue-50 border-blue-200 text-blue-800;
}

/* ========================================
   Module-Specific Styles
   ======================================== */

/* Projects Module */
.projects-grid {
  @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6;
}

.project-card {
  @apply bg-secondary-800 rounded-lg shadow-sm border border-secondary-600 p-4 hover:shadow-md transition-shadow duration-200;
}

.project-status {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.project-status-active {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800;
}

.project-status-pending {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 text-yellow-800;
}

.project-status-completed {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800;
}

/* Employees Module */
.employee-card {
  @apply bg-white rounded-lg shadow-sm border p-4 hover:shadow-md transition-shadow duration-200;
}

.employee-avatar {
  @apply w-12 h-12 rounded-full bg-gray-200 flex items-center justify-center;
}

.employee-status {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.employee-status-active {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800;
}

.employee-status-inactive {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800;
}

/* Contractors Module */
.contractor-card {
  @apply bg-white rounded-lg shadow-sm border p-4 hover:shadow-md transition-shadow duration-200;
}

.contractor-rating {
  @apply flex items-center gap-1; /* במקום space-x-1 - תמיכה טבעית ב-RTL */
}

.contractor-rating-star {
  @apply w-4 h-4 text-yellow-400;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Mobile First Approach */
@media (max-width: 640px) {
  .card-header,
  .card-body,
  .card-footer {
    @apply px-4 py-3;
  }
  
  .table th,
  .table td {
    @apply px-3 py-2;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .projects-grid {
    @apply grid-cols-2;
  }
}

/* Desktop */
@media (min-width: 1025px) {
  .projects-grid {
    @apply grid-cols-3;
  }
}

/* ========================================
   RTL Support
   ======================================== */

[dir="rtl"] .table th,
[dir="rtl"] .table td {
  @apply text-right;
}

[dir="rtl"] .form-input,
[dir="rtl"] .form-select,
[dir="rtl"] .form-textarea {
  @apply text-right;
}

/* ========================================
   Accessibility
   ======================================== */

/* High Contrast Mode */
@media (prefers-contrast: high) {
  /* הערה: כללי כפתורים (buttons) הועברו ל-components/buttons.css */
  /* כללי כפתורים מאוחדים נמצאים ב-components/buttons.css */
  
  .card {
    @apply border-2;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    @apply transition-none;
  }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  /* הערה: כללי כפתורים (buttons) הועברו ל-components/buttons.css */
  /* כללי כפתורים מאוחדים נמצאים ב-components/buttons.css */
  
  .card {
    @apply border border-gray-300 shadow-none;
  }
  
  .table {
    @apply border border-gray-300;
  }
  
  .table th,
  .table td {
    @apply border border-gray-300;
  }
}
} /* סיום @layer components */
