:root {
  /* Professional Color Palette */
  --bg: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --bg-overlay: rgba(255, 255, 255, 0.98);
  --card: rgba(255, 255, 255, 0.95);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.12);
  --text: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;

  /* Professional Accent Colors */
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.1);
  --primary-border: rgba(59, 130, 246, 0.2);

  --secondary: #6b7280;
  --secondary-hover: #4b5563;
  --secondary-light: rgba(107, 114, 128, 0.1);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.2);

  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.1);
  --error-border: rgba(239, 68, 68, 0.2);

  --accent: #8b5cf6;
  --accent-light: rgba(139, 92, 246, 0.1);

  /* Subtle Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  z-index: -1;
}

.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 16px 16px 0 0;
}

h1 {
  margin: 0 0 2rem 0;
  color: var(--text);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  position: relative;
}

h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

h2 {
  margin: 2rem 0 1rem 0;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
}

h3 {
  margin: 1.5rem 0 1rem 0;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
}

/* Form Styles */
.field-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.field-row::before {
  content: '';
  position: absolute;
  left: -1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: var(--primary);
  border-radius: 2px;
  opacity: 0.6;
}

label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
  padding-top: 0.5rem;
}

select,
input[type='text'],
input[type='url'] {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.875rem;
  background: white;
  transition: all 0.2s ease;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

select:focus,
input[type='text']:focus,
input[type='url']:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background: white;
}

select:hover,
input[type='text']:hover,
input[type='url']:hover {
  border-color: var(--border-hover);
}

/* Button Styles */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
}

button:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-light);
}

button.secondary {
  background: var(--secondary);
  color: white;
}

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

button.secondary:focus {
  box-shadow: 0 0 0 3px var(--secondary-light);
}

/* Panel Styles */
.panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.panel p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--text);
}

/* Alert Styles */
.alert {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert.success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.alert.error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
}

/* Output Styles */
.sfid-output {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.875rem;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  word-break: break-all;
  color: var(--text);
  margin: 0.5rem 0;
  box-shadow: var(--shadow-sm);
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

th,
td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

th {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
  color: var(--text);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

/* Tab Styles */
.tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  gap: 0.25rem;
}

.tab {
  padding: 0.875rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  border-radius: 8px 8px 0 0;
}

.tab:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--primary-light);
}

.tab.active:hover {
  background: var(--primary-light);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Hidden Utility */
.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.875rem;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  label {
    padding-top: 0;
    margin-bottom: 0.25rem;
  }

  .tabs {
    flex-direction: column;
    border-bottom: none;
    gap: 0.125rem;
  }

  .tab {
    border-radius: 8px;
    border-bottom: none;
  }

  .tab.active {
    border-bottom: none;
  }

  table {
    font-size: 0.75rem;
  }

  th,
  td {
    padding: 0.5rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    margin: 0.5rem;
    padding: 1rem;
  }

  button {
    width: 100%;
    justify-content: center;
  }
}
