[hidden] { display: none !important; }

:root {
  --card: rgba(255, 255, 255, 0.92);
  --line: #c8d3ea;
  --text: #11213a;
  --muted: #4d5f82;
  --accent: #0a6b77;
  --accent-strong: #0e4f8f;
  --accent-soft: rgba(11, 109, 120, 0.14);
  --shadow: 0 18px 45px rgba(16, 36, 70, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(circle at 10% 15%, rgba(106, 181, 195, 0.4), transparent 30%),
    radial-gradient(circle at 90% 8%, rgba(157, 193, 241, 0.6), transparent 34%),
    radial-gradient(circle at 74% 80%, rgba(250, 208, 168, 0.5), transparent 32%),
    linear-gradient(125deg, #eef4ff 0%, #f8fbff 42%, #fbf5eb 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(transparent 96%, rgba(27, 56, 100, 0.08) 96%);
  background-size: 100% 24px;
  opacity: 0.25;
}

.hero {
  padding: 24px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.hero-3col {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.hero-3col .hero-copy {
  justify-self: center;
  text-align: center;
}
.hero-3col .hero-actions {
  justify-self: end;
}

.hero-copy {
  max-width: 860px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-logo {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.current-user {
  color: #234164;
  font-weight: 600;
}

.version-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.version-title {
  font-size: 0.8rem;
  color: #8aa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.version-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: #234164;
}

.container {
  width: min(1600px, 96%);
  margin: 20px auto 40px;
  display: grid;
  gap: 18px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 18px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 1.22rem;
}

.panel-text {
  margin: 0 0 12px;
  color: var(--muted);
}

.panel form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.panel input {
  flex: 1;
  min-width: 280px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.panel button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  text-align: center;
}

.panel button:hover {
  background: #085b65;
}

.action-link {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  text-decoration: none;
  text-align: center;
}

button.action-link {
  cursor: pointer;
  font: inherit;
  text-align: center;
}

.action-link:hover {
  background: #085b65;
}

.action-link.secondary {
  background: #d5e0f4;
  color: #1c3052;
}

.action-link.secondary:hover {
  background: #c2d2ef;
}

.action-link.danger {
  background: #b83333;
  color: #fff;
}

.action-link.danger:hover {
  background: #972727;
}

.action-link.success {
  background: #1e7e34;
  color: #fff;
}

.action-link.success:hover {
  background: #155a25;
}

.action-link.log {
  background: #ffe066;
  color: #3d2e00;
}

.action-link.log:hover {
  background: #f5d200;
}

.action-link.brown {
  background: #7a4e2d;
  color: #fff;
}

.action-link.brown:hover {
  background: #5e3a1f;
}

.action-link.note {
  background: #1e90ff;
  color: #fff;
}

.action-link.note:hover {
  background: #1270cc;
}

.open-projects-panel {
  grid-column: 1 / -1;
}

.open-projects-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
  align-items: start;
}

.open-projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.open-project-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.open-project-button {
  width: 100%;
  border: 1px solid #bbcae4;
  background: #f4f8ff;
  color: #1c3052;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.97rem;
}

.open-project-button:hover {
  border-color: #8ca9d4;
  background: #eaf2ff;
}

.open-project-meta {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0 4px;
}

.open-project-more-btn {
  width: 100%;
  border: 1px dashed #bbcae4;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 6px 10px;
  text-align: center;
  cursor: pointer;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.open-project-more-btn:hover {
  border-color: #8ca9d4;
  background: #f4f8ff;
  color: #1c3052;
}

.directory-note {
  margin: 0 0 8px;
  color: var(--muted);
}

.directory-note span {
  font-family: Consolas, "Courier New", monospace;
  color: #1e3c66;
}

.search-status {
  margin: 12px 0 0;
  min-height: 1.3rem;
  color: var(--muted);
}

.search-status.error {
  color: #a22525;
}

.search-status.success {
  color: #167448;
}

.search-results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-result-button {
  flex: 1;
  border: 1px solid #bbcae4;
  background: #f4f8ff;
  color: #1c3052;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.search-result-closed-meta {
  font-size: 0.78rem;
  color: #7a6000;
  white-space: nowrap;
  background: #fffbea;
  border: 1px solid #e0c840;
  border-radius: 6px;
  padding: 3px 8px;
}

.search-result-button:hover {
  border-color: #8ca9d4;
  background: #eaf2ff;
}

.search-result-button.active {
  border-color: var(--accent-strong);
  background: #dcecff;
}

.customer-card {
  background: #fdfefe;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.customer-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.customer-title {
  margin: 0;
}

.customer-date {
  margin: 0;
  color: var(--muted);
}

.customer-directory {
  margin: 0 0 10px;
  color: #35547f;
  font-size: 0.92rem;
}

.customer-meta-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  color: #2d456c;
  font-size: 0.92rem;
}

.meta-separator {
  border: none;
  border-top: 1px solid var(--line);
  margin: 4px 0;
}

.meta-notes-label {
  margin-block-start: 6px;
}

.meta-notes-frame {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  min-block-size: calc(10lh + 16px);
  white-space: pre-wrap;
  background: #f8fafc;
  font-size: 0.92rem;
  color: #2d456c;
  word-break: break-word;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.category-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: #fbfcff;
}

.category-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.dropzone {
  border: 2px dashed #97a9cb;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  color: #30425f;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.uploading {
  opacity: 0.75;
  pointer-events: none;
}

.dropzone-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.dropzone-row .dropzone {
  flex: 1;
  margin-bottom: 0;
}

.scan-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 0.95rem;
  white-space: nowrap;
}

.scan-btn:hover {
  background: #085b65;
}

.scan-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.scan-modal {
  width: min(440px, 95vw);
}

.scan-preview-modal {
  width: min(700px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.scan-preview-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.scan-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scan-preview-area {
  width: 100%;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scan-preview-img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.scan-preview-pdf {
  width: 100%;
  height: 500px;
  border: none;
}

.scan-status-text {
  color: #555;
  font-size: 0.9em;
  margin-top: 8px;
}

.snip-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-start: 8px;
  padding: 10px 14px;
  background: #fff8e1;
  border: 1px solid #f0c040;
  border-radius: 8px;
  font-size: 0.92em;
  color: #5a4200;
}

.snip-cancel-btn {
  margin-inline-start: auto;
  padding: 4px 12px;
  font-size: 0.88em;
}

.hidden-input {
  display: none;
}

.file-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: auto;
}

.file-list li + li {
  margin-top: 4px;
}

.file-list-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.file-date {
  flex-shrink: 0;
  font-size: 0.75em;
  color: #fff;
  background: #555;
  line-height: 1.2;
  padding: 10px;
  border-radius: 3px;
}

.file-list a,
.file-list span:not(.file-date) {
  white-space: nowrap;
  flex: 1;
}

.file-list a {
  color: #1447a6;
  text-decoration: none;
}

.file-list a:hover {
  text-decoration: underline;
}

.file-list span:not(.file-date) {
  color: inherit;
}

.panel .file-delete-btn {
  flex-shrink: 0;
  border: 1px solid #b00;
  background: #cc2222;
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  line-height: 1.4;
}

.panel .file-delete-btn:hover {
  background: #a00;
  border-color: #800;
  color: #fff;
}

.panel .file-delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.empty-state {
  color: var(--muted);
}

.file-edit-btn {
  flex-shrink: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  color: #1a56a0;
  font-size: 0.8rem;
}

.file-edit-btn:hover {
  background: #e8f0fb;
  border-color: #a0bce0;
}

.file-rename-btn {
  flex-shrink: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  padding: 2px 6px;
  color: #1a56a0;
  font-size: 1rem;
}

.file-rename-btn:hover {
  background: #e8f0fb;
  border-color: #a0bce0;
  border-radius: 5px;
}

.file-email-btn {
  flex-shrink: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  padding: 2px 6px;
  color: #1a7a3a;
  font-size: 1rem;
}

.file-email-btn:hover {
  background: #e6f4ec;
  border-color: #8ec8a0;
  border-radius: 5px;
}

.txt-editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.txt-editor-overlay[hidden] {
  display: none;
}

.txt-editor-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  width: min(720px, 94vw);
  max-height: 80vh;
  overflow: hidden;
}

.txt-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  gap: 8px;
}

.txt-editor-title {
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txt-editor-close {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  color: #666;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.txt-editor-close:hover {
  background: #f0f0f0;
}

.txt-editor-textarea {
  flex: 1;
  resize: none;
  border: none;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  outline: none;
  overflow-y: auto;
  min-height: 300px;
}

.txt-editor-actions {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #e0e0e0;
  justify-content: flex-end;
}

.projekt-verlauf-modal {
  width: min(780px, 94vw);
}

.projekt-verlauf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  max-height: calc(80vh - 54px);
}

.verlauf-entry {
  display: grid;
  grid-template-columns: 180px 130px 1fr;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid #f0f0f0;
  align-items: start;
  font-size: 0.875rem;
}

.verlauf-entry:last-child {
  border-bottom: none;
}

.verlauf-time {
  color: #888;
  white-space: nowrap;
}

.verlauf-user {
  font-weight: 600;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verlauf-action {
  color: #222;
  word-break: break-word;
}

.add-note-modal {
  width: min(440px, 94vw);
}

.add-note-body {
  padding: 20px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}

.add-note-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.add-note-input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
}

.add-note-input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.add-note-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin: 0;
}

.form-container {
  width: min(660px, 96%);
}

.user-admin-container {
  width: min(1240px, 96%);
}

.danger-zone-panel {
  border-color: #e0a0a0;
  background: #fff8f8;
  margin-top: 4px;
}

.user-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 900;
  overflow-y: auto;
  padding: 32px 16px;
}

.user-modal-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 1100px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.user-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--line);
}

.user-modal-header h2 {
  margin: 0;
}

.user-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.user-modal-close:hover {
  background: #f0f0f0;
  color: var(--text);
}

.user-modal-body {
  padding: 24px 28px 28px;
}

.password-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.password-gate-box {
  background: #fff;
  border-radius: 8px;
  padding: 32px 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.password-gate-box h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.password-gate-box p {
  margin-top: 0;
  margin-bottom: 20px;
  color: #555;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 16px;
  align-items: start;
}

.auth-container {
  width: min(520px, 96%);
  margin-top: 34px;
}

.auth-panel {
  padding: 22px;
  border-radius: 16px;
}

.form-panel {
  padding: 18px;
}

.customer-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.customer-form label {
  font-weight: 600;
  color: #1f385e;
}

.customer-grid {
  display: grid;
  gap: 10px;
}

.customer-grid.two-cols {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.field-group {
  display: grid;
  gap: 6px;
}

.field-label {
  font-weight: 600;
  color: #1f385e;
}

.field-spacer {
  visibility: hidden;
}

.address-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin: 2px 0;
}

.address-block legend {
  padding: 0 6px;
  font-weight: 600;
  color: #1f385e;
}

.address-grid {
  margin-top: 4px;
}

.customer-form input,
.customer-form select,
.customer-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
}

.customer-form textarea {
  resize: vertical;
}

.notes-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-section .address-block {
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
}

.notes-field {
  display: block;
  width: 100%;
}

.notes-field textarea {
  width: 100%;
  box-sizing: border-box;
  display: block;
}

.form-actions {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.form-actions.stacked {
  flex-direction: column;
  align-items: stretch;
}

.form-actions.stacked button,
.form-actions.stacked .action-link {
  width: 100%;
  text-align: center;
}

.form-actions button[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}

button.action-link[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}

.form-status {
  margin: 10px 0 0;
  min-height: 1.25rem;
  color: var(--muted);
}

.form-status.error {
  color: #a22525;
}

.form-status.success {
  color: #167448;
}

.edit-container {
  width: min(1300px, 96%);
}

.stammdaten-container {
  width: min(910px, 96%);
}

.stammdaten-container .edit-form-card > .customer-grid,
.stammdaten-container .edit-form-card > .field-group {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 560px;
}

.type-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #1f385e;
  padding: 6px 0;
}

.type-radio-label input[type="radio"] {
  margin: 0;
}

.customer-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px 24px;
  align-items: start;
  margin-top: 12px;
}

.customer-info-section {
  min-width: 0;
}

.info-section-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.customer-actions-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faff;
}

.edit-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(250px, 340px) 1fr;
  align-items: stretch;
}

.edit-forms {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.edit-form-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfcff;
}

.edit-form-card h3 {
  margin: 0 0 10px;
  width: 100%;
}

.submenu-title {
  margin: 0 0 10px;
}

.submenu-list {
  display: grid;
  gap: 8px;
}

.submenu-list button,
.submenu-list a {
  text-align: left;
}

.submenu-button {
  border: 1px solid #bbcae4;
  background: #f4f8ff;
  color: #1c3052;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.submenu-button:hover {
  border-color: #8ca9d4;
  background: #eaf2ff;
}

.submenu-button.has-files {
  border-color: #a88000;
  background: #ffe066;
  color: #3d2e00;
}

.submenu-button.has-files:hover {
  background: #ffd633;
}

.submenu-button.active {
  border-color: #b85c00;
  background: #ff8c00;
  color: #fff;
}

.submenu-button.active:hover {
  background: #e07a00;
}

.submenu-button.drag-copy-over {
  border-color: #1a7cdb;
  background: #cce4ff;
  outline: 2px solid #1a7cdb;
}

.file-list-item.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.submenu-content {
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.submenu-content h3 {
  margin-top: 0;
}

.submenu-content .file-list {
  flex: 1;
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfcff;
  display: grid;
  gap: 10px;
}

.user-row-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.user-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.user-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  gap: 10px;
}

@media (max-width: 700px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .panel input {
    min-width: 100%;
  }

  .search-form button {
    width: 100%;
  }

  .customer-grid.two-cols {
    grid-template-columns: 1fr;
  }

  .field-spacer {
    display: none;
  }
}

@media (max-width: 980px) {
  .edit-layout {
    grid-template-columns: 1fr;
  }

.admin-layout {
    grid-template-columns: 1fr;
  }

  .user-row-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Gesperrt-Banner ───────────────────────────────────────────── */
.locked-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: #7a5700;
  font-weight: 600;
}

/* ── Export-Baum ───────────────────────────────────────────────── */
.export-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}

.export-tree {
  max-height: 55vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--bg, #f8f8f8);
}

.export-year {
  margin-bottom: 12px;
}

.export-year-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 4px 0;
}

.export-letters {
  padding-left: 20px;
  margin-top: 4px;
}

.export-letter {
  margin-bottom: 6px;
}

.export-letter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
}

.export-customers {
  padding-left: 20px;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.export-customer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.93rem;
  padding: 2px 0;
}

.export-customer-label:hover,
.export-letter-label:hover,
.export-year-label:hover {
  color: var(--accent, #0a7a87);
}

.storage-paths-info {
  white-space: pre-line;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.88rem;
  color: #444;
  margin-bottom: 12px;
}

.path-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.path-input-row input {
  flex: 1;
}

.dir-browser-box {
  max-width: 560px;
  width: 100%;
}

.dir-browser-path {
  font-size: 0.85rem;
  font-family: monospace;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 6px 10px;
  margin-bottom: 8px;
  word-break: break-all;
  color: #333;
}

.dir-browser-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.dir-browser-item {
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 0.93rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dir-browser-item:last-child {
  border-bottom: none;
}

.dir-browser-item:hover {
  background: #eaf6f7;
  color: var(--accent, #0a7a87);
}

.dir-browser-item::before {
  content: "📁";
  font-size: 0.9em;
}

.dir-browser-up::before {
  content: "⬆";
  font-size: 0.9em;
}

.dir-browser-empty {
  font-size: 0.88rem;
  color: #888;
  padding: 10px 0;
  text-align: center;
}

.dir-browser-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ── Kundentypauswahl (Privatperson / Firma) ── */
.customer-type-selector {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 10px 12px;
  background: #f4f8fa;
  border: 1px solid #d0e4ec;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
}

.customer-type-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.97rem;
  flex: 0 0 auto;
}

.customer-type-option input[type="radio"] {
  flex: none;
  width: 18px;
  min-width: 18px;
  height: 18px;
  accent-color: var(--accent, #0a7a87);
  cursor: pointer;
}

.firma-fields {
  margin-bottom: 4px;
}


.duplicate-hint {
  margin-top: 6px;
  padding: 8px 10px;
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: 6px;
  font-size: 0.85rem;
}
.duplicate-hint .hint-title {
  font-weight: 600;
  color: #b45309;
  margin-bottom: 6px;
}
.duplicate-hint ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.duplicate-hint ul li button {
  background: none;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  color: #0a7a87;
  font-size: 0.85rem;
  text-align: left;
  text-decoration: underline;
}
.duplicate-hint ul li button:hover {
  color: #065f68;
}
.duplicate-hint ul li.legacy-item button {
  color: #92400e;
}

/* ── Adress-Autocomplete Dropdown ──────────────────────────────── */
.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin: 2px 0 0;
  padding: 4px 0;
  list-style: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.address-suggestions li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: .93em;
}
.address-suggestions li:hover {
  background: #f0f6ff;
}

/* ── Zoom-Selektor ───────────────────────────────────────────── */
.zoom-select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}
.zoom-select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ── Tablet-Modus ────────────────────────────────────────────── */
.tablet-mode .action-link,
.tablet-mode button,
.tablet-mode input,
.tablet-mode select:not(.zoom-select) {
  min-height: 44px;
  font-size: 1rem;
}
.tablet-mode .panel {
  padding: 24px 20px;
}
