:root {
  --primary-color: #0077b6;
  --secondary-color: #00b4d8;
  --accent-color: #90e0ef;
  --background-color: #f0f4f8;
  --surface-color: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --error-color: #ef4444;
  --success-color: #22c55e;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --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);
}

* {
  box-sizing: border-box;
}


html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select {
  font-family: inherit;
  font-size: 1rem;
}

/* Login Page Styles */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container>* {
  width: 100%;
  max-width: 420px;
}

.login-container h2 {
  color: var(--surface-color);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-container .form-group {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 1rem;
}

.login-container .form-group:first-of-type {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-bottom: 0;
  padding-bottom: 1.5rem;
}

.login-container .form-group:last-of-type {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding-top: 1.5rem;
}

.login-container .form-group:only-of-type {
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.login-container label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-container input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: all 0.2s ease;
  background-color: #f8fafc;
}

.login-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: var(--surface-color);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
}

.login-container input::placeholder {
  color: var(--text-secondary);
}

.login-container button {
  width: 100%;
  max-width: 420px;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--surface-color);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.login-container button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-container button:active {
  transform: translateY(0);
}

.login-container button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-container .error {
  background-color: #fee2e2;
  color: #991b1b;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  border-left: 4px solid var(--error-color);
  font-size: 0.875rem;
  max-width: 420px;
  width: 100%;
}

/* Responsive Design */

/* Admin Layout */
.admin-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.sidebar {
  width: 280px;
  background-color: var(--surface-color);
  padding: 2rem;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.sidebar h3 {
  margin-bottom: 2rem;
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 0.5rem;
}

.sidebar a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.75rem 1rem;
  display: block;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.sidebar a:hover {
  background-color: var(--background-color);
  color: var(--primary-color);
  transform: translateX(4px);
}

.sidebar button {
  width: 100%;
  margin-top: 2rem;
  background: none;
  border: 2px solid var(--error-color);
  color: var(--error-color);
  background-image: none;
  box-shadow: none;
}

.sidebar button:hover {
  background-color: #fef2f2;
}

.admin-content {
  flex: 1;
  padding: 3rem;
  overflow-y: auto;
}

.admin-content h2 {
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-size: 2rem;
}

/* Categories & Forms */
.selection-area,
.company-form-area {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.selection-area label,
.company-form-area label {
  font-weight: 600;
  min-width: fit-content;
}

.selection-area select,
.company-form-area input,
.company-form-area select {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  background-color: #f8fafc;
}

.categories-section,
.ranges-section,
.companies-section {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.add-cat,
.add-range,
.add-company {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.categories-section ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.categories-section li span {
  display: block;
  padding: 1rem;
  background: var(--background-color);
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.categories-section li span:hover {
  background: #e0e7ff;
  color: var(--primary-color);
}

.categories-section li.selected span {
  border-color: var(--primary-color);
  background: #eff6ff;
  color: var(--primary-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.875rem;
}

td button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  margin: 0;
  background: var(--error-color);
  width: auto;
}