/* ============================================================
   GLOBALS
============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #f0f0f0;
  color: #333;
  line-height: 1.5;
}

a {
  color: #0044cc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ============================================================
   HEADER & NAV
============================================================ */
.site-header {
  background: #0044cc;
  color: #fff;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  max-height: 2.5rem;
  width: auto;
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-header nav a {
  color: #fff;
}
.site-header nav a:hover {
  color: #e0e0e0;
}

/* --------------------------------------------------------- */
/* BURGER MENU (mobile)                                      */
/* --------------------------------------------------------- */

.burger {
  display: none;
  font-size: 28px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
}

@media (max-width: 800px) {

  .burger {
    display: block;
  }

  /* Navigation hidden by default */
  .site-header nav {
    display: none;
    flex-direction: column;
    background: #0044cc;
    width: 100%;
    padding: 0.5rem 1rem;
    gap: .7rem;
    animation: fadeIn .2s ease;
  }

  /* Shown via JS → nav.open */
  .site-header nav.open {
    display: flex;
  }

  .site-header nav a {
    padding: .4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MAIN CONTAINER
============================================================ */
main {
  background: #fff;
  padding: 1rem;
  margin: 1rem auto;
  width: auto;
  min-height: calc(100vh - 4rem);
}

/* ============================================================
   GENERIC CONTAINER (Material/HR Seiten)
============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ============================================================
   BUTTONS (Material Look)
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #dce3ea;
  background: #fff;
  color: #0d2a52;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover {
  background: #f2f6ff;
}

.btn.primary {
  background: #0055a5;
  border-color: #0055a5;
  color: #fff;
}

.btn.primary:hover {
  background: #003f7c;
}

.btn.secondary {
  background: #e8f0ff;
  border-color: #cfe0ff;
  color: #0d2a52;
}

.btn.warn {
  background: #fff2cc;
  border-color: #ffe08a;
  color: #4a3b00;
}

.btn.danger {
  background: #d40000;
  border-color: #d40000;
  color: #fff;
}

.btn.small {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 14px;
}

/* ============================================================
   ALERTS
============================================================ */
.alert {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #dce3ea;
  margin: 10px 0;
}

.alert-success {
  background: #e8f7ee;
  border-color: #b9e5c9;
  color: #126b2a;
}

.alert-danger {
  background: #ffecec;
  border-color: #ffb3b3;
  color: #8a0000;
}

.alert-info {
  background: #e8f0ff;
  border-color: #cfe0ff;
  color: #0d2a52;
}

/* ============================================================
   TABS (mobile friendly)
============================================================ */
.tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #dce3ea;
  background: #fff;
  color: #0d2a52;
  font-weight: 700;
  text-decoration: none;
  min-width: 44px;
}

.tab.active {
  background: #0055a5;
  border-color: #0055a5;
  color: #fff;
}

/* ============================================================
   TABLES
============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  display: block;
}

thead {
  background: #e0e0e0;
}

th,
td {
  padding: 0.75em;
  border: 1px solid #ccc;
  text-align: left;
  vertical-align: middle;
}

tbody tr:nth-child(odd) {
  background: #fafafa;
}

table.full-width {
  table-layout: fixed;
}
table.full-width th,
table.full-width td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   FILTER BUTTONS
============================================================ */
.filters {
  margin-bottom: 1rem;
}
.filters a {
  margin-right: .6rem;
  padding: .35rem .6rem;
  background: #eee;
  border-radius: 6px;
  color: #333;
}
.filters a.active {
  background: #0056b3;
  color: white;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .6rem;
}

.add-btn {
  background: #28a745;
  color: white;
  padding: .35rem .7rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.add-btn:hover {
  background: #1e7e34;
}

/* ============================================================
   TASK GRID (CARDS)
============================================================ */

.task-grid {
  display: grid;
  gap: 1.5rem;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
}


@media (max-width: 600px) {
  .task-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   TASK CARDS — MODERN & KOMPAKT
============================================================ */
.task-card {
  background: white;
  border-radius: 10px;
  border: 1px solid #dce3ea;
  padding: .7rem .9rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  min-height: 110px;
  transition: transform .15s ease, box-shadow .15s ease;
}

@media (hover:hover) {
  .task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  }
}

.task-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.task-card-link > .task-card {
  pointer-events: auto;
}

.task-left {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  max-width: 72%;
}

.task-id { font-size: .85rem; color: #444; }

.task-title {
  font-size: 1.05rem;
  font-weight: bold;
  line-height: 1.25em;
  max-height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-category,
.task-duedate {
  font-size: .85rem;
  color: #555;
}

.task-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: .2rem 0;
}

.task-right a {
  font-size: 1.35rem;
  text-decoration: none;
}

/* ============================================================
   FORMULAR GRID (Single & Series)
============================================================ */

form.task-form {
  max-width: 1400px;
  margin: 0 auto;

  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, 1fr);

  grid-template-areas:
    "title title title title"
    "category subcategory priority due"
    "assigned_users assigned_groups interval status"
    "description description drive drive"
    "submit submit submit submit";
}

/* GRID AREAS */
.task-form .title        { grid-area: title; }
.task-form .category     { grid-area: category; }
.task-form .subcategory  { grid-area: subcategory; }
.task-form .priority     { grid-area: priority; }
.task-form .due          { grid-area: due; }

.task-form .assigned-users   { grid-area: assigned_users; }
.task-form .assigned-groups  { grid-area: assigned_groups; }

.task-form .interval     { grid-area: interval; }
.task-form .status       { grid-area: status; }

.task-form .description  { grid-area: description; }
.task-form .drive-link   { grid-area: drive; }

.task-form .form-submit  { 
  grid-area: submit;
  text-align: center;
}

/* Field styling */
.task-form .form-group {
  display: flex;
  flex-direction: column;
}

/* Multi-select + textarea */
.task-form select[multiple],
.task-form textarea {
  height: 170px;
}

/* Responsive */
@media (max-width: 800px) {
  form.task-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "category"
      "subcategory"
      "priority"
      "due"
      "assigned_users"
      "assigned_groups"
      "interval"
      "status"
      "description"
      "drive"
      "submit";
  }

  .task-form select[multiple],
  .task-form textarea {
    height: auto;
    min-height: 100px;
  }

.task-card-wrapper {
    display: block;
}

.task-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.task-card-link:hover {
    text-decoration: none !important;
}



}
