/* iTrak Global Styles (itrak.css) */
/* Updated to match landing page design */

/* Import Inter font to match landing page */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Landing page color scheme */
  --itr-brand-600: #137fec; 
  --itr-brand-700: #0d6efd;
  --itr-brand-500: #3b82f6;
  --itr-bg: #f0f8ff; 
  --itr-surface: #ffffff; 
  --itr-panel: #f9fafb;
  --itr-border: #e5e7eb; 
  --itr-border-strong: #d1d5db;
  --itr-text: #111827; 
  --itr-text-muted: #6b7280;
  --itr-focus: #137fec;
  
  /* Spacing */
  --sp-2: 8px; 
  --sp-3: 12px; 
  --sp-4: 16px; 
  --sp-6: 24px;
  
  /* Border radius */
  --rad-sm: 6px; 
  --rad-md: 8px; 
  --rad-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Typography */
  --fs-sm: 13px; 
  --fs-md: 14px; 
  --fs-lg: 16px;
  --fs-xl: 20px; 
  --fs-2xl: 24px;
  --fw-normal: 400;
  --fw-medium: 500; 
  --fw-semibold: 600;
  --fw-bold: 700;
  
  /* Table colors */
  --table-row-hover: #f9fafb; 
  --table-header: #f3f4f6;
  
  /* Status colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

body { 
  background: var(--itr-bg); 
  color: var(--itr-text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.5;
}

/* Override default Blazor sidebar gradient */
.sidebar {
  background-image: none !important;
  background-color: var(--itr-surface) !important;
}

/* Ensure all form controls have proper contrast */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
input[type="date"], 
input[type="time"], 
textarea, 
select {
  background-color: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
}

input[type="checkbox"], 
input[type="radio"] {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

input[type="checkbox"]:checked, 
input[type="radio"]:checked {
  background-color: var(--itr-brand-600) !important;
  border-color: var(--itr-brand-600) !important;
}

/* Blazor specific form controls */
.blazor-input, 
.blazor-select, 
.blazor-checkbox {
  background-color: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
}
a { color: var(--itr-focus); }
a:hover { text-decoration: underline; }

.itr-panel { background:var(--itr-surface); border:1px solid var(--itr-border);
  border-radius:0 0 var(--rad-lg) var(--rad-lg); box-shadow:var(--shadow-sm); margin-bottom:var(--sp-6); }
.itr-panel--header { padding:var(--sp-4); border-bottom:1px solid var(--itr-border);
  font-size:var(--fs-xl); font-weight:var(--fw-semibold); }
.itr-panel--body { padding:0; }

.itr-btn { display:inline-flex; align-items:center; justify-content:center;
  height:40px; padding:0 var(--sp-4); border-radius:var(--rad-sm); border:1px solid transparent;
  font-weight:var(--fw-medium); cursor:pointer; }
.itr-btn--primary { background:var(--itr-brand-600); color:#fff; }
.itr-btn--primary:hover { background:var(--itr-brand-700); }
.itr-btn--secondary { background:var(--itr-panel); color:var(--itr-text); border-color:var(--itr-border); }

.itr-table-wrap { border:1px solid var(--itr-border); border-radius:var(--rad-lg); overflow:auto; }
.itr-table { width:100%; border-collapse:separate; border-spacing:0; }
.itr-table thead th { background:var(--table-header); font-size:var(--fs-sm); font-weight:var(--fw-semibold);
  padding:var(--sp-3) var(--sp-4); border-bottom:1px solid var(--itr-border-strong); }
.itr-table tbody td { padding:var(--sp-3) var(--sp-4); border-bottom:1px solid var(--itr-border); }
.itr-table tbody tr:hover { background:var(--table-row-hover); }
.itr-cell--actions { text-align:center; white-space:nowrap; padding:4px; }

.itr-icon-btn { display:inline-flex; align-items:center; justify-content:center;
  width:24px; height:24px; border-radius:var(--rad-sm); border:1px solid var(--itr-border);
  background:var(--itr-surface); margin-right:4px; padding:2px; }
.itr-icon-btn:hover { background:var(--itr-panel); }

/* Search Form Styles */
.itr-search-form { 
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0 0 0.375rem 0.375rem;
  margin-bottom: 0;
  padding: 1rem;
}

.itr-search-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

/* Group 1: Main Search Fields */
.itr-group-1 {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.itr-form-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.itr-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
}

.itr-form-field.wide {
  flex: 1;
  min-width: 200px;
}

.itr-form-field.checkbox-field {
  min-width: 140px;
  justify-content: flex-end;
}

.itr-form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  margin: 0;
}

.itr-form-field .form-select-sm,
.itr-form-field .form-control-sm {
  font-size: 0.875rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
  height: auto;
}

.itr-form-field .form-select-sm {
  padding-right: 2.25rem !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Group 3: Status Checkboxes */
.itr-group-3 {
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.itr-group-3 h6 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
}

.itr-status-checkboxes-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.itr-status-checkboxes-vertical .form-check {
  margin-bottom: 0;
}

.itr-status-checkboxes-vertical .form-check-label {
  font-size: 0.875rem;
  margin-left: 0.25rem;
}

/* Group 4: Date Search */
.itr-group-4 {
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.itr-group-4 h6 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
}

.itr-group-4 small {
  font-size: 0.75rem;
  color: #6c757d;
}

.itr-date-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Group 5: Action Buttons */
.itr-group-5 {
  min-width: 120px;
}

.itr-action-buttons-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.itr-action-buttons-vertical .btn {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

/* Group 2: Bottom Section */
.itr-group-2 {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #e9ecef;
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 0.375rem 0.375rem;
}

.itr-bottom-right {
  display: flex;
  align-items: center;
}

.itr-search-form .btn-sm {
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
}

@media (max-width: 1200px) {
  .itr-search-content {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  
  .itr-group-3, .itr-group-4, .itr-group-5 {
    min-width: 100px;
  }
}

@media (max-width: 768px) {
  .itr-search-content {
    flex-direction: column;
  }
  
  .itr-form-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .itr-form-field {
    min-width: 100%;
  }
  
  .itr-group-3, .itr-group-4, .itr-group-5 {
    min-width: 100%;
  }
  
  .itr-status-checkboxes-vertical {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .itr-action-buttons-vertical {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Status Column Styles */
.itr-status-column { font-size: 11px; padding: 1px; }
.itr-status-checkboxes { font-size: 11px; padding: 1px; }
.itr-status-checkbox-item { margin-bottom: 1px; }

/* Date Search Styles */
.itr-date-search-column { font-size: 11px; padding: 1px; }
.itr-date-label-from { padding-right: 4px; }
.itr-date-label-to { padding-right: 20px; }
.itr-form-date-sm { width: 90px; font-size: 11px; padding: 1px; display: inline-block; }

/* Action Buttons Styles */
.itr-action-buttons { }
.itr-btn-stack { margin-bottom: 3px; display: block; width: 100%; font-size: 11px; }
.itr-btn-stack:last-child { margin-bottom: 0; }

/* Button Section Styles */
.itr-button-section { }
.itr-button-inline { display: inline-block; }
.itr-button-float-right { float: right; }

/* Table Styles */
.itr-table-fixed { table-layout: fixed; width: 100%; }
.itr-col-actions { width: 60px; }
.itr-col-id { width: 50px; }
.itr-col-title { width: 200px; }
.itr-col-seq { width: 50px; }
.itr-col-status { width: 80px; }
.itr-col-group { width: 80px; }
.itr-col-developer { width: 140px; }
.itr-col-tester { width: 140px; }
.itr-col-category { width: 80px; }
.itr-col-last-comment { width: 120px; }
.itr-col-created { width: 120px; }
.itr-col-sprint-version { width: 80px; }
.itr-col-points { width: 80px; }
.itr-col-actual { width: 100px; }

/* Grid Cell Styles */
.itr-cell-developer { font-size: 12px; }
.itr-cell-tester { font-size: 12px; }
.itr-icon-spacing { margin-left: 2px; }
