/* Moderní CSS pro administraci Loxone (2025) */
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --background: #f8fafc;
  --background-dark: #18181b;
  --surface: #fff;
  --surface-dark: #23232b;
  --text: #18181b;
  --text-dark: #f1f5f9;
  --accent: #10b981;
  --danger: #ef4444;
  --warning: #f59e42;
  --border: #e5e7eb;
  --border-dark: #2d2d36;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: var(--background-dark);
    --surface: var(--surface-dark);
    --text: var(--text-dark);
    --border: var(--border-dark);
  }
}

body {
  background: var(--background);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.admin-container {
  max-width: 1200px;
  margin: 40px auto;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 4px 32px rgba(30, 64, 175, 0.08);
  padding: 32px 24px;
}

h1, h2, h3, h4 {
  color: var(--primary);
  margin-bottom: 16px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label {
  font-weight: 500;
  margin-bottom: 4px;
}

input, select, textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  transition: border 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  outline: none;
}

button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover {
  background: var(--primary-dark);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  background: var(--surface);
}
.table th, .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table th {
  background: var(--background);
  font-weight: 600;
}
.table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 800px) {
  .admin-container {
    padding: 16px 4px;
  }
  .table th, .table td {
    padding: 8px 6px;
  }
}

/* Notifikace */
.notification {
  padding: 14px 20px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}
.notification.success {
  background: #d1fae5;
  color: #065f46;
}
.notification.error {
  background: #fee2e2;
  color: #991b1b;
}
.notification.warning {
  background: #fef3c7;
  color: #92400e;
}

/* Dashboard cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.dashboard-card {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.07);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dashboard-card h3 {
  margin: 0 0 8px 0;
  color: var(--primary);
}

/* Přepínač tmavého/světlého režimu */
.theme-toggle {
  position: absolute;
  top: 24px;
  right: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.theme-toggle:hover {
  background: var(--background);
}

/* Validace formulářů */
input:invalid, select:invalid, textarea:invalid {
  border-color: var(--danger);
}

/* Malé utility */
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.text-success { color: var(--accent); } 