/* UID Agent Admin - Simple Modern Style */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --pending-color: #6366f1;
  --bg-light: #f8fafc;
  --border-color: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-light);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header */
header {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav a {
  margin-right: 1.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

/* Main Content */
main {
  padding: 2rem 1.5rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.container.wide {
  max-width: 1600px;
}

h1 {
  margin: 0 0 1.5rem 0;
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Forms */
form {
  margin-bottom: 1.5rem;
}

input[type="text"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

button,
.btn {
  padding: 0.625rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background 0.2s;
}

button:hover,
.btn:hover {
  background: var(--primary-hover);
}

button.secondary,
.btn.secondary {
  background: #6b7280;
}

button.secondary:hover,
.btn.secondary:hover {
  background: #4b5563;
}

button.danger,
.btn.danger {
  background: var(--error-color);
}

button.danger:hover,
.btn.danger:hover {
  background: #dc2626;
}

a.button {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background 0.2s;
}

a.button:hover {
  background: var(--primary-hover);
}

a.button.secondary {
  background: #6b7280;
  color: white;
}

a.button.secondary:hover {
  background: #4b5563;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  table-layout: auto;
}

table thead {
  background: var(--bg-light);
}

table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table td {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9375rem;
}

table tbody tr:hover {
  background: var(--bg-light);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.success {
  background: #d1fae5;
  color: #065f46;
}

.status-badge.failed {
  background: #fee2e2;
  color: #991b1b;
}

.status-badge.pending {
  background: #e0e7ff;
  color: #3730a3;
}

.status-badge.api {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.system {
  background: #f3f4f6;
  color: #374151;
}

/* Messages */
.message,
.error,
.warning {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.message {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Search/Filter Forms */
form[method="get"] {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 1.25rem;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

form[method="get"] input[type="text"],
form[method="get"] select {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

form[method="get"] button {
  margin: 0;
}

/* Inline Forms */
form[style*="inline"] {
  display: inline;
}

form[style*="inline"] button {
  background: transparent;
  color: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border-color);
}

form[style*="inline"] button:hover {
  background: var(--bg-light);
}

/* Login Page */
.wrap {
  max-width: 400px;
  margin: 10vh auto;
  background: white;
  padding: 2.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.wrap h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Utility Classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-secondary { color: var(--text-secondary); }

/* Responsive */
@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  nav a {
    margin-right: 1rem;
  }
  
  main {
    padding: 1rem;
  }
  
  table {
    font-size: 0.875rem;
  }
  
  table th,
  table td {
    padding: 0.5rem;
  }
  
  form[method="get"] {
    flex-direction: column;
  }
  
  form[method="get"] input,
  form[method="get"] select {
    width: 100%;
  }
}

