/* WILON Dashboard Core CSS - 2026 Edition */

:root[data-theme="dark"] {
    --bg: #000000;
    --panel: #141414;
    --border: #333333;
    --text: #ffffff;
    --text-dim: #888888;
    --muted: #888888;
    --accent: #2d7d46;
    --nav-bg: #0a0a0a;
}

:root[data-theme="light"] {
    --bg: #f2f2f2;
    --panel: #ffffff;
    --border: #cccccc;
    --text: #000000;
    --text-dim: #666666;
    --muted: #666666;
    --accent: #2d7d46;
    --nav-bg: #e5e5e5;
}

:root {
    --accent-green: #2d7d46;
    --accent-blue: #0078d7;
    --accent-red: #e81123;
    --accent-yellow: #ffcc00; /* New Development Accent */
    --transition-speed: 0.2s;
}

/* Global Reset */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    border-radius: 0 !important; /* Strict Metro Look */
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
    padding-bottom: 50px;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navbar */
.site-header {
    height: 50px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: sticky; 
    top: 0; 
    z-index: 100;
}

.logo { font-weight: 300; letter-spacing: 1px; color: var(--text); }
.logo span { color: var(--accent-green); font-weight: bold; }

.header-right { display: flex; align-items: center; gap: 20px; }

.system-time {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.win-btn-sm {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 12px;
    font-size: 0.7rem;
    cursor: pointer;
    text-transform: uppercase;
}

.win-btn-sm:hover { 
    background: var(--text); 
    color: var(--bg); 
}

.progress-bar {
    height: 10px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
    min-width: 100px;
}

.progress-bar .fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    min-width: 0;
    transition: width 0.6s ease;
}

/* Layout Container */
.main-content { 
    padding: 40px 10%; 
    max-width: 1400px; 
    margin: 0 auto; 
}

.dash-section { margin-bottom: 50px; }

.win-label { 
    font-weight: 200; 
    font-size: 1.8rem; 
    margin-bottom: 25px; 
    border-left: 4px solid var(--accent-green); 
    padding-left: 15px;
    text-transform: uppercase;
}

/* Grid & Tiles */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 15px; 
}

.tile-link { 
    text-decoration: none; 
    color: inherit; 
    display: block;
}

.tile {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 25px;
    transition: var(--transition-speed);
    height: 100%;
    position: relative;
}

.tile:hover { 
    transform: translateY(-4px); 
    border-color: var(--text-dim);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.tile-icon { font-size: 2rem; display: block; margin-bottom: 15px; }

/* Visual Accents (Top Bars) */
.green-accent  { border-top: 4px solid var(--accent-green); }
.blue-accent   { border-top: 4px solid var(--accent-blue); }
.red-border    { border-top: 4px solid var(--accent-red); }
.yellow-accent { border-top: 4px solid var(--accent-yellow); }

/* Stats & Progress */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 15px; 
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 20px;
}

.stat-title { 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    color: var(--text-dim); 
    display: block; 
    margin-bottom: 10px;
}

.stat-bar { 
    height: 6px; 
    background: var(--border); 
    width: 100%; 
    margin-top: 10px;
}

.stat-bar .fill { 
    height: 100%; 
    background: var(--accent-green); 
    transition: width 0.5s ease-in-out;
}

/* Server Monitor Extras */
.tile-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.status-dot { 
    width: 8px; 
    height: 8px; 
    display: inline-block; 
    margin-right: 10px; 
}

.online { 
    background: #00ff00; 
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); 
}

.offline { 
    background: #ff0000; 
    opacity: 0.5;
}

.server-info {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 10px;
}

/* Footer / Taskbar */
.site-footer {
    position: fixed; 
    bottom: 0; 
    width: 100%; 
    height: 35px;
    background: var(--nav-bg); 
    border-top: 1px solid var(--border);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 20px; 
    font-size: 0.7rem; 
    color: var(--text-dim);
    z-index: 100;
}

#global-status { color: var(--accent-green); }

/* Status color helpers */
.status-erledigt { color: var(--accent); }
.status-offen { color: var(--accent-blue); }
.status-nicht-angf { color: var(--accent-red); }

/* Project area */
.project-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1200px;
  margin: 0 auto;
}

.group-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.group-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.group-progress {
  flex: 1;
  min-width: 160px;
  margin-left: auto;
}

.progress-bar {
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.6s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.project-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.project-card a {
  color: inherit;
}

.project-name {
  font-weight: 700;
}

.project-status {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.project-progress {
  margin-top: 10px;
}

.tooltip {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translate(-50%, 12px);
  display: none;
  min-width: 180px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  white-space: normal;
  z-index: 5;
}

.project-card:hover .tooltip {
  display: block;
}
