/* KSA Attendance Admin Panel Styles */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --error: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }
  
  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: #f9fafb;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
  }
  
  h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.75rem;
  }
  
  /* Fieldset styling */
  fieldset {
    border: none;
    background-color: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
  }
  
  legend {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--gray-900);
    padding: 0 0.5rem;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
  }
  
  /* Form controls */
  label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin: 1rem 0 0.375rem;
    font-size: 0.9375rem;
  }
  
  small {
    color: var(--gray-500);
    font-size: 0.875rem;
  }
  
  input, select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background-color: white;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  
  input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  }
  
  button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background-color: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 1.25rem;
  }
  
  button:hover {
    background-color: var(--primary-dark);
  }
  
  button:active {
    transform: translateY(1px);
  }
  
  /* Results area */
  .result {
    margin-top: 1rem;
    padding: 1.25rem;
    background-color: var(--gray-100);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    line-height: 1.5;
    overflow-x: auto;
  }
  
  /* Status colors */
  .ok {
    color: var(--success);
    font-weight: 600;
  }
  
  .fail {
    color: var(--error);
    font-weight: 600;
  }
  
  /* Responsive adjustments */
  @media (max-width: 640px) {
    body {
      padding: 1rem;
    }
    
    fieldset {
      padding: 1.25rem 1rem;
    }
    
    h1 {
      font-size: 1.5rem;
    }
  }
  
  /* Add loading indicator animation */
  @keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
  }
  
  .result:has(#createRes:contains("⌛")),
  .result:has(#statusRes:contains("⌛")) {
    animation: pulse 1.5s infinite;
  }
  
  /* Add a subtle header background */
  body:before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background-color: var(--primary);
    opacity: 0.05;
    z-index: -1;
  }