/*
 Theme Name: Tivoli Admin
 Theme URI: https://tivoli-admin.ch
 Author: Autohaus Tivoli
 Description: Internes Admin- und Buchhaltungstheme für Autohaus Tivoli GmbH.
 Version: 1.0
 License: GNU General Public License v2 or later
 License URI: https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: tivoli-admin
*/

:root {
  --bg-color: #0b0c10;
  --bg-elevated: #151720;
  --bg-elevated-soft: #1e2130;
  --border-color: #2b3040;
  --accent: #ff3b3f;
  --accent-soft: rgba(255,59,63,0.1);
  --accent-alt: #00c3ff;
  --text-main: #f5f5f5;
  --text-muted: #a9afc2;
  --text-soft: #7a8195;
  --sidebar-width: 250px;
  --radius-lg: 14px;
  --shadow-soft: 0 14px 40px rgba(0,0,0,0.4);
}

body.theme-light {
  --bg-color: #f4f5fb;
  --bg-elevated: #ffffff;
  --bg-elevated-soft: #f0f2ff;
  --border-color: #dde1f0;
  --accent: #e0373a;
  --accent-soft: rgba(224,55,58,0.08);
  --accent-alt: #0066ff;
  --text-main: #12141f;
  --text-muted: #555e7b;
  --text-soft: #7a8195;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #25293c 0, var(--bg-color) 55%);
  color: var(--text-main);
}

/* Layout */

.ta-shell {
  min-height: 100vh;
  display: flex;
  background: radial-gradient(circle at top, #262b40 0, var(--bg-color) 55%);
}

.ta-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #181a24 0, #090a10 100%);
  border-right: 1px solid var(--border-color);
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.ta-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 16px;
}

.ta-logo img {
  height: 46px;
  width: auto;
}

.ta-logo-text {
  display: flex;
  flex-direction: column;
}

.ta-logo-title {
  font-size: 19px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ta-logo-sub {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
  letter-spacing: 0.15em;
}

/* Sidebar Navigation */

.ta-nav {
  margin-top: 8px;
  flex: 1;
}

.ta-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ta-nav li {
  margin-bottom: 4px;
}

.ta-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.16s ease-out;
}

.ta-nav a:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.06);
}

.ta-nav a.ta-nav-active {
  background: var(--accent-soft);
  color: #ffffff;
  border-color: var(--accent);
}

.ta-nav a span.ta-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #f3f3f3;
}

/* Sidebar bottom */

.ta-sidebar-bottom {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ta-user-blip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.ta-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0, var(--accent-alt) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.4);
}

/* Theme toggle */

.ta-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  font-size: 11px;
  color: var(--text-soft);
}

.ta-theme-toggle span {
  padding: 3px 6px;
  border-radius: 999px;
}

.ta-theme-toggle span.ta-theme-active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Main */

.ta-main {
  flex: 1;
  padding: 18px 20px 32px;
}

.ta-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 14px;
}

.ta-topbar-title {
  font-size: 22px;
  margin: 0;
}

.ta-topbar-sub {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.ta-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ta-chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-soft);
}

/* Cards / Grids */

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

.ta-card {
  background: linear-gradient(145deg, var(--bg-elevated) 0, var(--bg-elevated-soft) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
  padding: 14px 15px 16px;
}

.ta-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.ta-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.ta-card-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons */

.ta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s ease-out;
  background: rgba(255,255,255,0.04);
  color: var(--text-main);
}

.ta-btn-primary {
  background: linear-gradient(135deg, var(--accent) 0, var(--accent-alt) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
}

.ta-btn-outline {
  border-color: var(--border-color);
  color: var(--text-muted);
}

.ta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.4);
}

/* Tables / forms */

.ta-table-wrapper {
  overflow-x: auto;
}

.ta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.ta-table th,
.ta-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}

.ta-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.ta-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.ta-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 12px 14px;
  margin-top: 8px;
}

.ta-field label {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-soft);
}

.ta-field input,
.ta-field select,
.ta-field textarea {
  width: 100%;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid var(--border-color);
  background: rgba(3,4,10,0.85);
  color: var(--text-main);
  font-size: 13px;
}

body.theme-light .ta-field input,
body.theme-light .ta-field select,
body.theme-light .ta-field textarea {
  background: #ffffff;
}

.ta-field textarea {
  min-height: 90px;
  resize: vertical;
}

/* Utility */

.ta-badge-soft {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #fff;
}

.ta-muted {
  color: var(--text-muted);
  font-size: 12px;
}

/* Responsive */

@media (max-width: 880px) {
  .ta-sidebar {
    display: none;
  }
  .ta-main {
    padding: 14px 14px 24px;
  }
  .ta-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
