/* Siemens Theme – optimiert für Wartbarkeit, Konsistenz und Responsivität */

/* Farbvariablen */
:root {
	--bg-dark: #1f1f1f;
	--bg-panel: #2a2a2a;
	--bg-group: #2c2c2c;
	--bg-accent: #009999;
	--bg-hover: #00cccc;
	--bg-highlight: #3a3a3a;
	--text-light: #f0f0f0;
	--text-accent: #00cccc;
	--text-muted: #666666;
	--border-light: #666;
}

/* Grundlayout */
body {
	font-family: Arial, sans-serif;
	background-color: var(--bg-dark);
	color: var(--text-light);
	margin: 40px;
}

/* Layoutstruktur */
.main-layout {
	display: flex;
	gap: 40px;
	margin-top: 30px;
}

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 30px;
	flex: 0 0 260px;
	border: 1px solid var(--bg-hover);
	border-radius: 8px;
	padding: 20px;
	background-color: var(--bg-panel);
}

.button-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px;
	border-radius: 6px;
	background-color: var(--bg-group);
	border: 1px solid var(--bg-accent);
}

.button-group h4 {
	margin-bottom: 10px;
	border-bottom: 1px solid var(--bg-hover);
	padding-bottom: 5px;
	color: var(--text-accent);
}

.content-area {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Filterleiste */
#filter-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.filter-controls {
	display: flex;
	align-items: center;
	gap: 10px;
}

#vmTable_filter label {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Tabellen */
table.dataTable tbody tr:nth-child(even) {
	background-color: var(--bg-panel);
}

table.dataTable tbody tr:nth-child(odd) {
	background-color: #333;
}

table.dataTable thead {
	background-color: var(--bg-accent);
	color: #fff;
}

/* Urlaubskalender: kompakte Tagesspalten */
#calendar-table th:not(:first-child),
#calendar-table td:not(:first-child) {
	width: 18px;
	min-width: 18px;
	max-width: 18px;
	text-align: center;
	padding: 4px;
}

/* Urlaubskalender: Namensspalte */
#calendar-table th:first-child,
#calendar-table td:first-child {
	width: 200px;
	max-width: 200px;
	word-break: break-word;
}

/* Urlaubskalender: horizontale Trennlinien */
#calendar-table tbody tr {
	border-bottom: 1px solid var(--border-light);
}

#calendar-table {
	border-collapse: collapse;
}

/* Urlaubskalender: Statusfarben */
td.beantragt {
	background-color: #665c00;
	color: #fff;
}

td.genehmigt {
	background-color: #006633;
	color: #fff;
}

td.abgelehnt {
	background-color: #660000;
	color: #fff;
}

/* Einheitliche UI-Elemente */
.ui-control,
select,
input[type="text"],
input[type="password"],
input[type="search"],
button:not(.nav-arrow) {
	background-color: var(--bg-accent);
	color: #fff;
	border: none;
	padding: 5px;
	height: 32px;
	min-width: 210px;
	border-radius: 4px;
	font-size: 14px;
	font-family: Arial, sans-serif;
}


/* Kompakte Dropdowns für Kalendernavigation */
select#month,
select#year {
  width: auto;
  min-width: 120px;
  max-width: 160px;
  padding: 4px 8px;
  font-size: 0.95em;
}

button:hover,
.ui-control:hover {
	background-color: var(--bg-hover);
}

/* Checkboxen */
td input[type="checkbox"] {
	accent-color: var(--bg-accent);
	width: 18px;
	height: 18px;
	cursor: pointer;
	border: 2px solid var(--bg-hover);
	border-radius: 4px;
	background-color: var(--bg-dark);
	display: block;
	margin: auto;
}

/* Statusanzeige */
.status-on {
	color: #33cccc;
	font-weight: bold;
}

.status-off {
	color: var(--text-muted);
	font-weight: bold;
}

/* Tabellenbreiten für VM Control */
th.name-col, td.name-col {
	width: 200px;
	max-width: 200px;
	word-break: break-word;
}

th.folder-col, td.folder-col {
	width: 140px;
}

th.status-col, td.status-col {
	width: 140px;
	text-align: center;
}

th.snapshot-col, td.snapshot-col {
	width: 180px;
}

th.action-col, td.action-col {
	width: 180px;
}

/* Ladeoverlay */
#loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.loading-box {
	text-align: center;
	color: #fff;
}

.loading-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #ccc;
	border-top: 4px solid var(--bg-hover);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 10px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.loading-text {
	font-size: 16px;
	font-weight: bold;
}

/* Kopfzeile */
.header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.header-title {
	font-size: 24px;
	font-weight: bold;
	margin: 0;
}

.header-link {
	text-decoration: none;
	color: var(--text-accent);
}

.style-switcher {
	display: flex;
	align-items: center;
	gap: 10px;
}

.style-label {
	font-size: 24px;
	font-weight: bold;
	color: inherit;
}

/* Toast */
.toast {
	position: fixed;
	top: 40%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: var(--bg-accent);
	color: white;
	padding: 12px 24px;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	display: none;
	z-index: 9999;
	font-weight: bold;
	text-align: center;
}

/* Fokus- und Auswahlzustände */
input[type="checkbox"]:checked {
	outline: 2px solid var(--bg-hover);
}

select:focus,
button:focus {
	outline: 2px solid var(--bg-hover);
}

/* Responsive Layout */
@media (max-width: 768px) {
	.main-layout {
		flex-direction: column;
	}
	.sidebar {
		flex: 1;
	}
	.content-area {
		width: 100%;
	}
}

/* Urlaubskalender: vertikale Zelltrennlinien */
#calendar-table td,
#calendar-table th {
	border-right: 1px solid var(--border-light);
}

/* Letzte Spalte ohne Linie */
#calendar-table td:last-child,
#calendar-table th:last-child {
	border-right: none;
}

/* Urlaubskalender: Wochenenden und Feiertage rot */
#calendar-table th.weekend,
#calendar-table th.feiertag,
#calendar-table td.weekend,
#calendar-table td.feiertag {
	color: #ff4444;
	background-color: #2a0000; /* dunkles Rot für dunkle Themes */
}

/* Optional für helle Themes */
body.light-theme #calendar-table th.weekend,
body.light-theme #calendar-table th.feiertag,
body.light-theme #calendar-table td.weekend,
body.light-theme #calendar-table td.feiertag {
	background-color: #ffe5e5;
	color: #cc0000;
}

/* Kompakte Navigation für Zeitraum */
.zeitraum-nav .nav-arrow {
  background-color: var(--bg-accent);
  color: #fff;
  border: none;
  padding: 4px 8px;
  height: 32px;
  width: 32px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
}

.zeitraum-nav .nav-arrow:hover {
  background-color: var(--bg-hover);
}

.zeitraum-nav .nav-button {
  background-color: var(--bg-accent);
  color: #fff;
  border: none;
  padding: 0 10px;
  height: 32px;
  line-height: 32px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.zeitraum-nav .nav-button:hover {
  background-color: var(--bg-hover);
}

.zeitraum-nav .nav-divider {
  width: 1px;
  height: 32px;
  background-color: var(--border-light);
  margin: 0 6px;
}

/* Urlaubskalender: aktive Nutzerzeile hervorheben */
#calendar-table tr.active-user-row td {
  background-color: var(--bg-highlight);
}

#calendar-table tr.active-user-row td:first-child {
  font-weight: bold;
  color: var(--text-accent);
}

/* Urlaubskalender: aktive Nutzerzelle hervorheben */
#calendar-table td.active-user-cell {
  background-color: var(--bg-highlight);
  font-weight: bold;
  color: var(--text-accent);
}

.context-menu {
  background-color: var(--bg-panel);
  border: 1px solid var(--bg-hover);
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.context-menu button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-light);
  padding: 6px 12px;
  text-align: left;
  cursor: pointer;
}

.context-menu button:hover {
  background-color: var(--bg-hover);
}
