/* E:\Perth RP III\DHS\devdocs\assets\css\style.css */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand Colors vom perth_mechaniker */
  --cyan: #00d2ff;
  --cyan2: #22d3ee;
  --cyan-a08: rgba(0, 210, 255, 0.08);
  --cyan-a12: rgba(0, 210, 255, 0.12);
  --cyan-a20: rgba(0, 210, 255, 0.20);
  --cyan-border: rgba(0, 210, 255, 0.22);

  --emerald: #10b981;
  --emerald-a10: rgba(16, 185, 129, 0.10);
  --emerald-a20: rgba(16, 185, 129, 0.20);
  --emerald-border: rgba(16, 185, 129, 0.22);

  --red: #f87171;
  --red-a20: rgba(239, 68, 68, 0.20);
  --amber: #fbbf24;
  --amber-a20: rgba(251, 191, 36, 0.20);

  /* Backgrounds */
  --bg-root: #04050f;
  --bg-panel: rgba(9, 11, 22, 0.92);
  --bg-surface: rgba(13, 16, 32, 0.85);

  /* Borders */
  --border-dim: rgba(255, 255, 255, 0.08);
  --border-base: rgba(255, 255, 255, 0.10);

  /* Text */
  --text-bright: #f1f5f9;
  --text-base: rgba(255, 255, 255, 0.80);
  --text-dim: rgba(255, 255, 255, 0.45);

  /* Radius & Shadows */
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 9px;
  --shadow-panel: 0 32px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255,255,255,0.03);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-root);
  color: var(--text-bright);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
  user-select: none; /* Verhindert das markieren von normalem Text */
}

/* Erlaubt das Markieren nur in Formularfeldern */
input, textarea {
  user-select: text;
}

/* Custom Highlight Farbe */
::selection {
  background: rgba(0, 210, 255, 0.3);
  color: #ffffff;
}

/* Ambient Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(0, 210, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.05) 0%, transparent 65%);
  top: -200px;
  right: -150px;
  pointer-events: none;
  z-index: -1;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: rgba(6, 7, 16, 0.8);
  border-right: 1px solid var(--border-base);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 2rem 0;
}

.brand {
  padding: 0 1.5rem 2rem 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
  letter-spacing: 1px;
}

.nav-item {
  padding: 1rem 1.5rem;
  color: var(--text-base);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--cyan-a08);
  color: var(--text-bright);
}

.nav-item.active {
  border-left-color: var(--cyan);
  background: var(--cyan-a12);
  color: var(--cyan);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 70px;
  background: rgba(7, 9, 20, 0.6);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  justify-content: space-between;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.content-area {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 210, 255, 0.2);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 210, 255, 0.4); }

/* Glass Panel */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
}
.glass-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  z-index: 1;
  pointer-events: none;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
}

.stat-title {
  font-size: 0.875rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
}

/* Buttons */
.btn {
  background: var(--cyan-a12);
  color: var(--cyan);
  border: 1px solid var(--cyan-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn:hover {
  background: var(--cyan-a20);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}
.btn-primary {
  background: var(--cyan);
  color: #000;
  border: none;
}
.btn-primary:hover {
  background: var(--cyan2);
}

/* Badge */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-done { background: var(--emerald-a20); color: var(--emerald); border: 1px solid var(--emerald-border); }
.badge-dev { background: var(--cyan-a20); color: var(--cyan); border: 1px solid var(--cyan-border); }
.badge-idea { background: var(--amber-a20); color: var(--amber); border: 1px solid var(--border-base); }

/* Table */
.custom-table {
  width: 100%;
  border-collapse: collapse;
}
.custom-table th {
  text-align: left;
  padding: 1rem;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--border-base);
}
.custom-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-base);
}
.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--border-base);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  width: 90%;
  max-width: 500px;
  transform: translateY(20px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.25rem;
  color: var(--cyan);
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--red);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-dim);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-bright);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan-border);
  box-shadow: 0 0 0 2px var(--cyan-a12);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

select.form-control optgroup, select.form-control option {
    background: #090b16;
    color: var(--text-bright);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Chrome Autofill Override for Dark Theme */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #090b16 inset !important;
    -webkit-text-fill-color: var(--text-bright) !important;
    transition: background-color 5000s ease-in-out 0s;
}
