/* Vera.OS – Complete CSS mit erweiterten Notiz-Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg1: #0f172a;
  --bg2: #1e293b;
  --fg: #f1f5f9;
  --muted: #94a3b8;
  --line: #475569;
  --acc: #22d3ee;
  --acc2: #ec4899;
  --glass: rgba(30, 41, 59, 0.6);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(to bottom right, var(--bg1), var(--bg2), var(--bg1));
  min-height: 100vh;
  color: var(--fg);
}

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

.mono {
  font-family: monospace;
  color: #64748b;
}

.hidden {
  display: none !important;
}

/* Login Screen */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.login-bg-effect {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 9999px;
  filter: blur(96px);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.login-bg-effect-1 {
  top: 25%;
  left: 25%;
  background: rgba(6, 182, 212, 0.1);
}

.login-bg-effect-2 {
  bottom: 25%;
  right: 25%;
  background: rgba(236, 72, 153, 0.1);
  animation-delay: 1s;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 28rem;
}

.logo-container {
  text-align: center;
  margin-bottom: 3rem;
}

.logo-box {
  display: inline-block;
  margin-bottom: 1.5rem;
  position: relative;
}

.logo-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(6, 182, 212, 0.3), rgba(236, 72, 153, 0.3));
  border-radius: 9999px;
  filter: blur(32px);
}

.logo-inner {
  position: relative;
  background: linear-gradient(to bottom right, #1e293b, #334155);
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 2px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.logo-circle {
  width: 6rem;
  height: 6rem;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, var(--acc), var(--acc2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-letter {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
}

/* Header Logo Styles */
.header-logo-section {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-logo-box {
  display: inline-block;
  position: relative;
}

.header-logo-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(6, 182, 212, 0.3), rgba(236, 72, 153, 0.3));
  border-radius: 9999px;
  filter: blur(48px);
}

.header-logo-inner {
  position: relative;
  background: linear-gradient(to bottom right, #1e293b, #334155);
  padding: 2.25rem;
  border-radius: 3rem;
  border: 2px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.25);
}

.header-logo-circle {
  width: 9rem;
  height: 9rem;
  border-radius: 2.25rem;
  background: linear-gradient(to bottom right, var(--acc), var(--acc2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo-letter {
  font-size: 4.5rem;
  font-weight: 700;
  color: #fff;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.main-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--acc), #a78bfa, var(--acc2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75rem;
}

.subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 500;
}

.login-form-card {
  background: var(--glass);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.lock-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: linear-gradient(to right, rgba(6, 182, 212, 0.2), rgba(236, 72, 153, 0.2));
  border-radius: 1rem;
  border: 1px solid rgba(6, 182, 212, 0.3);
  margin-bottom: 1rem;
}

.form-title {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--acc), #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.pin-dots-container {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.pin-dot {
  width: 3.5rem;
  height: 4rem;
  border-radius: 0.75rem;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  transition: 0.3s;
}

.pin-dot-empty {
  border-color: #475569;
  background: rgba(51, 65, 85, 0.3);
  color: #4b5563;
}

.pin-dot-filled {
  border-color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  color: var(--acc);
  box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.2);
}

.pin-dot-error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  animation: pulse 0.5s;
}

.pin-input {
  width: 100%;
  padding: 1rem 1.5rem;
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 0.75rem;
  color: var(--fg);
  text-align: center;
  font-size: 1.5rem;
  font-family: monospace;
  letter-spacing: 0.5em;
  transition: 0.3s;
}

.pin-input:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.error-message {
  color: #f87171;
  font-size: 0.9rem;
  text-align: center;
  margin-top: 0.75rem;
  animation: pulse 0.5s;
}

.divider {
  position: relative;
  margin: 2rem 0;
}

.divider-line {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.divider-line-inner {
  width: 100%;
  border-top: 1px solid rgba(71, 85, 105, 0.5);
}

.divider-text {
  position: relative;
  display: flex;
  justify-content: center;
  font-size: 0.9rem;
}

.divider-text span {
  padding: 0 1rem;
  background: var(--glass);
  color: var(--muted);
  font-weight: 600;
}

.discord-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(to right, #4f46e5, #7c3aed);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.2);
}

.discord-btn:hover {
  background: linear-gradient(to right, #4338ca, #6d28d9);
}

.footer-text {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

/* Main App */
.main-app {
  display: none;
}

.main-app.active {
  display: block;
}

.header {
  background: linear-gradient(to bottom right, var(--bg1), var(--bg2), var(--bg1));
  border-bottom: 2px solid rgba(6, 182, 212, 0.3);
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.header-content {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.header-title {
  font-size: 2.4rem;
  font-weight: 900;
  background: linear-gradient(to right, var(--acc), #60a5fa, var(--acc2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-subtitle {
  color: var(--muted);
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 500;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 0.75rem;
  padding: 0.5rem 1.25rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: #34d399;
  border-radius: 9999px;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem;
}

.search-bar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 48rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--acc);
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 0.75rem;
  color: var(--fg);
  transition: 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.add-btn,
.btn-primary,
.btn-small,
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(to right, #0891b2, #7c3aed);
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  font-weight: 800;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.3);
}

.add-btn:hover,
.btn-primary:hover,
.btn-small:hover,
.back-btn:hover {
  background: linear-gradient(to right, #06b6d4, #6d28d9);
}

.section-title {
  color: var(--acc);
  font-size: 1.3rem;
}

.mandant-detail-title {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(to right, var(--acc), #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.mandant-detail-header,
.fall-detail-card,
.settings-section {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(to right, var(--acc), #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.detail-section-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--acc);
  margin-bottom: 1rem;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kv {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  background: rgba(51, 65, 85, 0.3);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.kv .strong {
  color: #fff;
  font-weight: 800;
}

.scroll {
  max-height: 400px;
  overflow: auto;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Mandanten Foto in Detail-Ansicht - QUERFORMAT wie Ausweis */
.mandant-detail-foto {
  width: 560px;
  height: 280px;
  border-radius: 8px; /* Leicht abgerundete Ecken, nicht rund */
  object-fit: cover;
  border: 3px solid var(--acc);
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

/* Responsive: Auf kleinen Bildschirmen kleiner */
@media (max-width: 1200px) {
  .mandant-detail-foto {
    width: 400px;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .mandant-detail-foto {
    width: 100%;
    height: auto;
    max-width: 400px;
  }
}

/* Tags */
.tag {
  display: inline-block;
  background: linear-gradient(to right, rgba(6, 182, 212, 0.1), rgba(236, 72, 153, 0.1));
  color: var(--acc);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Buttons erweitert */
.btn-edit {
  background: linear-gradient(to right, #0891b2, #7c3aed);
}

.btn-edit:hover {
  background: linear-gradient(to right, #06b6d4, #6d28d9);
}

.btn-delete {
  background: #ef4444 !important;
}

.btn-delete:hover {
  background: #dc2626 !important;
}

.btn-open {
  background: linear-gradient(to right, #22d3ee, #ec4899);
}

.btn-open:hover {
  background: linear-gradient(to right, #06b6d4, #f472b6);
}

/* Filter Buttons */
.btn-small.active {
  background: linear-gradient(to right, #06b6d4, #ec4899);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

/* Textarea Styling */
textarea.search-input {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* Select Styling */
select.search-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2322d3ee' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

/* File Input Styling */
input[type="file"].search-input {
  padding: 0.75rem;
  cursor: pointer;
}

/* Checkbox Styling */
input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--acc);
  cursor: pointer;
}

/* Radio Button Styling */
input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--acc);
  cursor: pointer;
}

/* Gesperrte Mandanten */
.mandant-gesperrt {
  border: 2px solid #ef4444;
  background: rgba(239, 68, 68, 0.05);
  opacity: 0.8;
}

.mandant-gesperrt:hover {
  opacity: 1;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

/* Admin Tabs */
.admin-tab-btn {
  background: rgba(51, 65, 85, 0.5);
  transition: all 0.3s;
}

.admin-tab-btn.active {
  background: linear-gradient(to right, #06b6d4, #ec4899);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.admin-tab-btn:hover {
  background: rgba(71, 85, 105, 0.7);
}

/* Admin Sections */
.admin-section {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Disabled Button */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== NEUE NOTIZEN STYLES ===== */
.notiz-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.notiz-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

.notiz-highlight-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(236, 72, 153, 0.15));
  border: 2px solid var(--acc);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.2);
}

.notiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notiz-date {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
}

.notiz-badge {
  background: linear-gradient(to right, var(--acc), var(--acc2));
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notiz-badge-edit {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.notiz-content {
  color: var(--fg);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.notiz-highlight-card .notiz-content {
  font-size: 1.15rem;
  font-weight: 500;
}

.notiz-footer {
  color: #64748b;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.btn-edit-note {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* ===== DOKUMENT CARDS ===== */
.dokument-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.dokument-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-logo-section {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-logo-inner {
    padding: 1.5rem;
  }
  
  .header-logo-circle {
    width: 6rem;
    height: 6rem;
  }
  
  .header-logo-letter {
    font-size: 3rem;
  }
  
  .main-title {
    font-size: 2rem;
  }
  
  .mandant-detail-title {
    font-size: 1.5rem;
  }
  
  .search-bar-container {
    flex-direction: column;
  }
  
  .search-box {
    max-width: 100%;
  }
}

/* ===== VIEWER MODAL ===== */
.viewer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.viewer-modal-content {
  position: relative;
  width: 100%;
  max-width: 1400px;
  max-height: 95vh;
  background: linear-gradient(to bottom right, #1e293b, #0f172a);
  border: 2px solid rgba(6, 182, 212, 0.3);
  border-radius: 1.5rem;
  padding: 2rem;
  overflow: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.viewer-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid #ef4444;
  border-radius: 50%;
  color: #ef4444;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.viewer-close-btn:hover {
  background: #ef4444;
  color: #fff;
  transform: rotate(90deg) scale(1.1);
}

/* Viewer responsive */
@media (max-width: 768px) {
  .viewer-modal-content {
    padding: 1rem;
    max-height: 98vh;
  }
  
  .viewer-close-btn {
    top: 0.5rem;
    right: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
  }
}

/* Smooth Image Loading */
.viewer-modal img {
  opacity: 0;
  animation: imageLoad 0.5s ease forwards;
}

@keyframes imageLoad {
  to {
    opacity: 1;
  }
}

/* PDF Iframe Styling */
.viewer-modal iframe {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* PDF Iframe Styling */
.viewer-modal iframe {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ===== TODO CARDS ===== */
.todo-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(71, 85, 105, 0.5);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.todo-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

.todo-erledigt {
  opacity: 0.6;
  background: rgba(30, 41, 59, 0.3);
}

.todo-erledigt:hover {
  opacity: 0.8;
}