/* =================== Root & Theme =================== */
:root {
  --bg: #0f1115;
  --bg-soft: #161a22;
  --text: #e6e6e6;
  --text-soft: #a0a0a0;
  --accent: #4f8cff;

  --sidebar-width: 220px;
  --sidebar-collapsed-width: 60px;
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-soft: #ffffff;
  --text: #1a1a1a;
  --text-soft: #555;
  --accent: #3b6cff;
  --sidebar-width: 220px;
  --sidebar-collapsed-width: 60px;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
a:hover {
    color: var(--accent);
    text-decoration: none; 
}

/* =================== Body & Layout =================== */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

/* ===== Topbar ===== */
.topbar {
  height: 56px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar .right {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 14px;
  color: var(--text-soft);
}

.toggle {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
}

/* ===== Layout Container ===== */
.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* =================== Sidebar =================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-soft);
  padding-top: 60px; /* Platz für Toggle Button */
  transition: width 0.3s ease;
  overflow: hidden;
  position: relative;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 18px;
  font-weight: bold;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Sidebar Links */
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 6px;
  text-decoration: none;
  color: var(--text-soft);
  border-radius: 8px;
  cursor: pointer;
  height: 35px;
  box-sizing: border-box;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.sidebar a i {
  font-size: 20px;
  min-width: 24px;
  text-align: center;
}

.sidebar a:hover,
.sidebar a.active {
  background: rgba(79,140,255,0.15);
  color: var(--accent);
}

.sidebar.collapsed a span {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
  width: var(--sidebar-collapsed-width);
}

#logo {
  width: 200px;
  height: 200px;
  margin: -40px auto;
  background: url('../assets/Images/logo.png') no-repeat center center;
  background-size: contain;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.sidebar.collapsed #logo {
  width: 0;
  height: 0;
  margin: 0;
  opacity: 0;
}

/* =================== Content =================== */
.content {
  flex: 1;
  transition: margin-left 0.3s ease;
  min-height: calc(100vh - 56px);
  padding: 15px 0px;
}

.sidebar.collapsed ~ .content {
  margin-left: var(--sidebar-collapsed-width);
}

/* =================== Cards =================== */
.card {
  width: 100%;
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 20px;
}

/* =================== Dashboard Grid =================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.map-box {
  background: var(--bg);
  border-radius: 10px;
  min-height: 280px;
  padding: 10px;
}

.table-box {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 8px 10px;
}

.table thead {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.table tbody tr:hover {
  background: rgba(255,255,255,0.04);
}

.text-end {
  text-align: right;
}

/* =================== Profile Cards =================== */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.profile-item {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--text);
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.profile-item:hover {
  background: rgba(79, 140, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.profile-item i {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.9;
}

.profile-item span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.profile-item small {
  color: var(--text-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    padding: 8px 18px !important;
    border: none !important;
    border-radius: 8px !important;
    background-color: var(--bg-soft, #e0e0e0) !important;
    color: var(--text, #4e4e4e) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.tab-btn:hover {
    background-color: var(--accent-color, #348AD4);
    color:  var(--bg-soft);
}

.tab-btn.active {
    background-color: var(--accent-color, #348AD4);
    color:  var(--bg-soft);
    box-shadow: 0 4px 12px rgba(52,138,212,0.3);
}

.friend-card:hover {
    transform: translateY(-3px);
    transition: transform 0.2s;
    cursor: pointer;
}

#friends-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.friend-card img {
    border: 2px solid rgba(255,255,255,0.1);
}

/* =================== Time Widget =================== */
#time {
  font-size: 10px;
  position: relative;
  padding: 20px;
  color: #a0a0a0;
  font-weight: bold;
  background: url('../assets/Images/clock.png') no-repeat center center;
  background-size: 50px 50px;
  border-radius: 4px;
  overflow: visible;
}

/* =================== jVectorMap Buttons =================== */
.jvectormap-zoomin, .jvectormap-zoomout {
  background: var(--bg-soft) !important;
  color: var(--text-soft) !important;
  border-radius: 3px !important;
  width: 25px !important;
  height: 25px !important;
  line-height: 22px !important;
  text-align: center !important;
  cursor: pointer !important;
  position: absolute !important;
  left: 10px !important;
}

.jvectormap-zoomin { top: 10px !important; }
.jvectormap-zoomout { top: 50px !important; }

.jvectormap-zoomin:hover, .jvectormap-zoomout:hover {
  background: var(--bg-alt) !important;
  color: var(--text-soft) !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

.jvectormap-tip {
  background: var(--bg-soft) !important;
  color: var(--bg-alt)!important;
  border: 1px solid #444 !important;
  border-radius: 5px !important;
  padding: 8px 12px !important;
  font-family: 'Segoe UI', sans-serif !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

/* =================== Footer =================== */
.footer {
  height: 50px;
  background: var(--bg-soft);
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 12px;
  color: var(--text-soft);
}

