:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  min-width: 320px;
  height: 100vh;
  overflow: hidden;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
.sidebar {
  width: 220px;
  background: #2a3a4b;
  color: #fff;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  box-shadow: 2px 0 8px rgba(0,0,0,0.07);
  overflow-y: auto;
}
.sidebar-title {
  font-size: 1.3rem;
  font-weight: bold;
  padding: 2rem 1rem 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid #3c4a5a;
  margin-bottom: 1rem;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}
.sidebar nav button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 0.75rem 0;
  text-align: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar nav button.active,
.sidebar nav button:hover:not(:disabled) {
  background: #4f8cff;
}
.sidebar nav button:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding: 12px 12px 16px;
  border-top: 1px solid #3c4a5a;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #4f8cff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8eef4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: #8fa8bc;
  text-transform: capitalize;
}

.sidebar-user-company {
  font-size: 0.72rem;
  color: #7dd3fc;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.sidebar-settings-btn,
.sidebar-logout-btn {
  background: none;
  border: 1px solid #3c4a5a;
  color: #ccd8e2;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.sidebar-settings-btn:hover {
  background: #3c4a5a;
  color: #fff;
}

.sidebar-logout-btn:hover {
  background: #c0392b22;
  border-color: #c0392b;
  color: #ff7b72;
}
/* Consolidated ListView styles for Customer, Vendor, Ingredient, etc. */

.list-view {
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 2px 8px #0001;
}
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 24px 12px 24px;
  background: #fff;
  flex-shrink: 0;
  border-bottom: 1px solid #e8edf5;
}
.create-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 18px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}
.create-btn:hover {
  background: #125ea2;
}
.search-input {
  padding: 8px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 1rem;
  width: 200px;
  min-width: 120px;
}
.list-table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 24px 24px 24px;
}
.list-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  table-layout: fixed;
}
.list-table th, .list-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-table thead {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.list-row {
  cursor: pointer;
  transition: background 0.15s;
}
.list-row:hover {
  background: #f0f7ff;
}

/* Sort & Filter */
.list-table th.sortable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}
.list-table th.sortable:hover {
  background: #f0f7ff;
}
.sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.72rem;
  opacity: 0.4;
  vertical-align: middle;
}
.sort-icon.active {
  opacity: 1;
  color: #1976d2;
}
.filter-select {
  padding: 7px 10px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 0.92rem;
  background: #fff;
  color: #333;
  min-width: 130px;
  cursor: pointer;
}
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-badge.open {
  background: #e3f2fd;
  color: #1565c0;
}
.status-badge.completed {
  background: #e8f5e9;
  color: #2e7d32;
}
.city-state-zip-row {
  display: grid;
  width: 100%;
  grid-template-columns: 2fr 0.5fr 0.5fr;
  gap: 8px 12px;
  margin-bottom: 16px;
}
.city-state-zip-row .form-row {
  margin-bottom: 0;
}
.city-state-zip-row .form-row input,
.city-state-zip-row .form-row textarea {
  min-width: 0;
  max-width: 100%;
}
/* Consolidated FormView styles for Customer, Vendor, Ingredient, etc. */
/*
 * If you use a wrapper div inside <main> (e.g. <div class="main-content-wrapper">),
 * add this class to ensure flex children do not overflow vertically.
 */
.main-content-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.form-container {
display: flex;
align-items: flex-start;
height: 100%;
background: #fff;
margin: 0;
box-sizing: border-box;
min-height: 0;
width: 100%;
min-width: 0;
flex: 1 1 0;
overflow-x: hidden;
}

.std-form-view {
display: flex;
flex-direction: column;
flex: 1 1 0;
background: #fff;
margin: 0;
border-radius: 0;
box-shadow: 0 2px 8px #0001;
padding: 32px 32px 24px 32px;
overflow-y: auto;
overflow-x: hidden;
min-height: 100%;
box-sizing: border-box;
width: 100%;
min-width: 0;
height: 100%;
max-width: none;
}

.std-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 16px;
}
.form-grid-2col .form-row {
  margin-bottom: 0;
}

.form-grid-3col {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 16px;
}
.form-grid-3col .form-row {
  margin-bottom: 0;
}
.form-grid-3col .form-row input,
.form-grid-3col .form-row textarea {
  min-width: 0;
  max-width: 100%;
}
.form-grid-4col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 16px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
  flex-wrap: wrap;
}
.form-grid-4col .form-row {
  margin-bottom: 0;
}
.form-grid-4col .form-row input,
.form-grid-4col .form-row textarea {
  width: 100%;
  min-width: 0;
}

@media (max-width: 900px) {
  .form-grid-4col {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .form-grid-4col {
    grid-template-columns: 1fr;
  }
}
.form-row input[name="city"] {
  min-width: 0;
  max-width: 100%;
}
.city-state-zip-row .form-row input[name="state"],
.city-state-zip-row .form-row input[name="postal_code"] {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.form-row label {
  font-weight: 500;
  margin-bottom: 4px;
}
.form-row input, .form-row textarea {
  padding: 8px 10px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}
.form-row select {
  padding: 8px 10px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #fff;
  color: #222;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border 0.2s;
}
.form-row select:focus {
  border-color: #1976d2;
  outline: none;
}
.styled-select {
  /* Optional: add a dropdown arrow icon for consistency */
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
  padding-right: 32px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.save-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 22px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.save-btn:hover {
  background: #125ea2;
}
.cancel-btn {
  background: #fff;
  color: #1976d2;
  border: 1px solid #1976d2;
  border-radius: 4px;
  padding: 8px 22px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.cancel-btn:hover {
  background: #f0f7ff;
}
.edit-btn {
  background: #fff;
  color: #1976d2;
  border: 1px solid #1976d2;
  border-radius: 4px;
  padding: 6px 18px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.edit-btn:hover {
  background: #f0f7ff;
}
.delete-btn {
  background: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 22px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.delete-btn:hover {
  background: #b71c1c;
}
.attachment-sidebar-container {
  margin-left: 32px;
  min-width: 320px;
  max-width: 400px;
}
.attachment-sidebar {
  width: 220px;
  background: #e3e8f0;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-self: flex-start; /* Force sidebar to align left in flex row */
  flex: 0 0 220px; /* Prevent growing/shrinking */
  padding: 0;
  box-shadow: -2px 0 8px rgba(0,0,0,0.07);
  border-left: 1px solid #cfd8dc;
}
.attachment-sidebar-title {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 2rem 1rem 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid #cfd8dc;
  margin-bottom: 1rem;
}
.attachment-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem;
}
.attachment-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.attachment-filename {
  font-weight: 500;
  color: #1976d2;
  margin-bottom: 2px;
}
.attachment-date {
  font-size: 0.9rem;
  color: #666;
}
.no-attachments {
  color: #888;
  text-align: center;
  margin-top: 2rem;
}
.attachment-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.attachment-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}
.attachment-actions button:hover {
  background: #dbeafe;
}
.attachment-preview-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.attachment-preview-content {
  background: #fff;
  border-radius: 8px;
  max-width: 90vw;
  min-width: 320px;
  max-height: 90vh;
  box-shadow: 0 4px 32px #0002;
  padding: 1.5rem 2rem 2rem 2rem;
  position: relative;
}
.attachment-preview-header {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.attachment-preview-header button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: 1rem;
}
.login-overlay {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-box {
  background: #fff;
  border-radius: 10px;
  padding: 40px 48px;
  min-width: 360px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.login-box h2 {
  margin: 0 0 6px 0;
  font-size: 1.6rem;
  color: #1a243a;
}

.login-subtitle {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 24px 0;
}

.login-error {
  background: #fde8e8;
  border: 1px solid #e57373;
  border-radius: 6px;
  color: #b71c1c;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.login-field label {
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
  font-size: 0.95rem;
}

.login-field input {
  padding: 9px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 5px;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
  box-sizing: border-box;
}

.login-field input:focus {
  border-color: #1976d2;
}

.login-btn {
  width: 100%;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 11px 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.login-btn:hover:not(:disabled) {
  background: #125ea2;
}

.login-btn:disabled {
  opacity: 0.65;
  cursor: default;
}
/* SettingsDialog Overlay */
.settings-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.settings-dialog {
  background: #fff;
  border-radius: 8px;
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.settings-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.settings-dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
}

.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0 4px;
  line-height: 1;
}

.close-button:hover {
  color: #333;
}

/* Tabs */
.settings-tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  padding: 0 20px;
  gap: 4px;
}

.settings-tab {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #666;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.settings-tab:hover {
  color: #333;
}

.settings-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  font-weight: 500;
}

/* Content Area */
.settings-dialog-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* Sections: only the active one is displayed */
.settings-section {
  display: none;
}

.settings-section.active {
  display: block;
}

.settings-section h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #444;
  font-weight: 600;
}

/* Form Groups */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-group input:disabled,
.form-group textarea:disabled {
  background: #f5f5f5;
  color: #888;
}

/* Buttons */
.save-button,
.save-path-button,
.save-user-button,
.add-user-button {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

.save-button:hover,
.save-path-button:hover,
.save-user-button:hover,
.add-user-button:hover {
  background: #0056b3;
}

.save-button:disabled,
.save-path-button:disabled,
.save-user-button:disabled,
.add-user-button:disabled {
  background: #aaa;
  cursor: default;
}

.cancel-button {
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px 18px;
  font-size: 0.9rem;
  cursor: pointer;
}

.cancel-button:hover {
  background: #f0f0f0;
}

/* Footer */
.settings-dialog-footer {
  padding: 12px 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
}

/* Error / Success messages */
.error-message {
  background: #ffe0e0;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

.error-message button {
  background: none;
  border: none;
  cursor: pointer;
  color: #c0392b;
  font-size: 1rem;
}

.success-message {
  background: #d4edda;
  border: 1px solid #b8dac4;
  color: #155724;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
}

.success-message button {
  background: none;
  border: none;
  cursor: pointer;
  color: #155724;
  font-size: 1rem;
}

/* Avatar */
.avatar-section {
  margin-bottom: 20px;
}

.avatar-upload-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
}

.avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #007bff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.avatar-input {
  display: none;
}

.change-avatar-button {
  background: none;
  border: 1px solid #007bff;
  color: #007bff;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
}

.change-avatar-button:hover {
  background: #e8f0fe;
}

/* Company Logo / Header */
.logo-upload,
.header-upload {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo-preview,
.header-preview {
  max-height: 80px;
  max-width: 260px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.logo-placeholder,
.header-placeholder {
  color: #aaa;
  font-size: 0.85rem;
}

/* DB Path */
.db-path-container {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.db-path-container input {
  flex: 1;
}

.select-path-button {
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

.select-path-button:hover {
  background: #545b62;
}

.db-info {
  font-size: 0.82rem;
  color: #666;
  margin: 6px 0 0;
}

/* Users Table */
.user-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.add-user-form {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.users-table th,
.users-table td {
  padding: 8px 10px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.users-table th {
  background: #f5f5f5;
  font-weight: 600;
  color: #555;
}

.users-table tr:nth-child(even) {
  background: #fafafa;
}

.role-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
}

.role-badge.admin {
  background: #d4edda;
  color: #155724;
}

.role-badge.user {
  background: #e2e3e5;
  color: #383d41;
}

.delete-user-button {
  background: none;
  border: 1px solid #dc3545;
  color: #dc3545;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.82rem;
  cursor: pointer;
}

.delete-user-button:hover:not(:disabled) {
  background: #dc3545;
  color: #fff;
}

.delete-user-button:disabled {
  border-color: #ccc;
  color: #ccc;
  cursor: default;
}
/* CompanySelectView.css */
.company-select-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.company-select-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 2rem 2.25rem;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  color: #e2e8f0;
}

.company-select-header h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f1f5f9;
}

.company-select-subtitle {
  margin: 0 0 1.5rem 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

.company-select-subtitle strong {
  color: #7dd3fc;
}

.company-select-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: 6px;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.company-select-loading,
.company-select-empty {
  color: #94a3b8;
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem 0;
}

/* Company list */
.company-list {
  list-style: none;
  margin: 0 0 1.25rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.company-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  transition: border-color 0.15s;
}

.company-list-item:hover {
  border-color: #3b82f6;
}

.company-list-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.company-list-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #f1f5f9;
}

.company-list-id {
  font-size: 0.75rem;
  color: #64748b;
  font-family: monospace;
}

.company-enter-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.company-enter-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.company-enter-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Create toggle */
.company-create-toggle-btn {
  width: 100%;
  background: transparent;
  border: 1px dashed #475569;
  color: #94a3b8;
  border-radius: 8px;
  padding: 0.7rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.company-create-toggle-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #7dd3fc;
}

.company-create-toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Create form */
.company-create-form h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.company-create-section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin: 1rem 0 0.5rem 0;
  font-weight: 600;
}

.company-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

.company-field label {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.company-field-hint {
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

.company-field input {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #e2e8f0;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.company-field input:focus {
  border-color: #3b82f6;
}

.company-field input:disabled {
  opacity: 0.5;
}

/* Actions */
.company-create-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.company-create-btn {
  flex: 1;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.company-create-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.company-create-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.company-cancel-btn {
  flex: 1;
  background: transparent;
  border: 1px solid #475569;
  color: #94a3b8;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.company-cancel-btn:hover:not(:disabled) {
  border-color: #64748b;
  color: #e2e8f0;
}
.changelog-view {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f7faff;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: auto;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.fullscreen-changelog.changelog-view {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  padding: 24px;
  margin: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}

.changelog-header h2 {
  margin: 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.changelog-info {
  font-size: 14px;
  color: #666;
  display: flex;
  gap: 12px;
  align-items: center;
}

.changelog-empty {
  text-align: center;
  padding: 48px 24px;
  color: #999;
  font-size: 16px;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.changelog-entry {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.changelog-content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.changelog-entry-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 120px;
  flex-shrink: 0;
}

.changelog-action {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.changelog-date {
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

.changelog-time {
  font-size: 11px;
  color: #888;
}

.changelog-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  flex-shrink: 0;
}

.changelog-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.changelog-username {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.changelog-changes {
  flex: 1;
  min-width: 0;
  padding-left: 8px;
  border-left: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.changelog-field-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  flex-wrap: wrap;
}

.changelog-change-text {
  color: #666;
  font-size: 12px;
  font-style: italic;
  margin: 0 4px;
}

.changelog-changes-value {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-changes-value.removed {
  color: #dc2626;
  background: #fff5f5;
  border: 1px solid #fecaca;
}

.changelog-changes-value.added {
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.changelog-field-name {
  font-size: 11px;
  font-weight: 600;
  color: #667eea;
  text-transform: capitalize;
}

.changelog-diff-arrow {
  font-size: 14px;
  color: #999;
  margin: 0 6px;
  font-weight: 300;
}

.changelog-description {
  min-width: 180px;
  max-width: 280px;
  flex-shrink: 0;
  padding: 8px 12px;
  background: #f7f7f7;
  border-radius: 6px;
  font-size: 13px;
  color: #444;
  align-self: flex-start;
}

.changelog-separator {
  height: 1px;
  background: #e0e0e0;
  margin-top: 8px;
}

.load-more-button {
  display: block;
  width: 100%;
  padding: 12px 24px;
  margin-top: 24px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.load-more-button:hover {
  background: #5a67d8;
}

.fullscreen-changelog .load-more-button {
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .changelog-content {
    flex-direction: column;
  }

  .changelog-entry-header {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    align-items: center;
    min-width: unset;
  }

  .changelog-user-info {
    flex-direction: row;
    min-width: unset;
  }

  .changelog-changes {
    border-left: none;
    border-top: 1px solid #f0f0f0;
    padding-left: 0;
    padding-top: 8px;
  }

  .changelog-description {
    max-width: unset;
    min-width: unset;
  }
}
