/* Landing Page Widget Styles */
.widget {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  width: 100%;
  max-width: 1000px;
  border: 2px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 2rem;
  background: var(--pico-background-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);

}
.examples {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

}
.examples h3 {
  margin-bottom: 1rem;

}
.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;

}
.upload {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 2rem;
  text-align: center;
  transition: background 0.3s ease;

}
.upload.dragover {
  background: var(--pico-muted-color);

}
@media (max-width: 800px) {
  .widget {
    flex-direction: column;

  }

}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: none;
  background: var(--pico-background-color);

}

body main {
    flex: 1;
    display: flex;
    width: 100%;
    padding-block: 0px;
    min-height: 100vh;

}


.widget {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  width: 100%;
  max-width: 1000px;
  border: 2px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 2rem;
  background: var(--pico-background-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);

}
@media (max-width: 800px) {
  .widget {
    flex-direction: column;

  }

}
.message-success {
  padding: 1rem;
  margin: 1rem 0;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  text-align: center;
  animation: fadeOut 5s ease-in-out forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  80% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-20px);
    height: 0;
    padding: 0;
    margin: 0;
    border-width: 0;
    overflow: hidden;
  }
}
.inline-form {
  display: inline !important;

}
.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;

}
.close-button {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: black;

}
.user-menu {
  position: relative;
  display: inline-block;

}
.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  min-width: 200px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;

}
.user-dropdown.show {
  display: block;

}

aside {
  width: 240px;
  border-right: none;
  padding: 1.5rem;
  background: var(--pico-background-color);
  /* fixiert links, unabhängig vom Content */
  flex-shrink: 0;
  /* Verhindert, dass die Sidebar kleiner wird */
}
aside nav a {
  display: block;               /* → volle Breite */
  margin: 0.4rem 0;
  padding: 0.6rem 0.8rem;       /* → schöner Klickbereich */
  border-radius: 0.4rem;
  text-decoration: none;

  background: var(--pico-muted-background-color);
  color: var(--pico-color);
}

aside nav a:hover {
  background: var(--pico-muted-border-color);
}
article {
  flex: 1;
  /* Nimmt den restlichen Platz ein */
  padding: 2rem;

}

.group-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-groups-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.edit-group-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}

.group-members {
    margin-top: 20px;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.members-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.members-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.members-table tr:last-child td {
    border-bottom: none;
}

.members-table tr:hover {
    background: #f8f9fa;
}

/* Role Badges */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.role-owner {
    background: #fff3cd;
    color: #856404;
}

.role-admin {
    background: #d1ecf1;
    color: #0c5460;
}

.role-member {
    background: #d4edda;
    color: #155724;
}

/* Action Buttons */
.actions {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-remove {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-remove {
    background: #dc3545;
    color: white;
}

.btn-remove:hover {
    background: #c82333;
}


.user-info {
    background: #e7f3ff;
    border: 1px solid #b6d7ff;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 0.95em;
    color: #2c5282;
}

.user-info p {
    margin: 0;
    line-height: 1.5;
}

/* Mit Icon */
.user-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

@media (max-width: 800px) {
  main {
    flex-direction: column;

  }
  aside {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--pico-muted-border-color);

  }
}

@media (min-width: 1200px) {
    #menu-container {
        width: 320px;
    }
}


/*logo stuff*/

.logo {
  position: relative;
  display: inline-block;
}

#open-tasks {
    position: fixed;       /* Immer sichtbar */
    bottom: 1rem;          /* Abstand vom unteren Bildschirmrand */
    right: 1rem;           /* Abstand vom rechten Bildschirmrand */
    width: 20rem;           /* ca. 320px */
    max-height: 25rem;     /* Maximalhöhe */
    overflow-y: auto;      /* Scrollbar, wenn Inhalt zu groß */
    
    background-color: white; 
    color: var(--text);                /* PicoCSS-Textfarbe */
    border-radius: var(--pico-border-radius);     /* PicoCSS-Radius */
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1); /* dezenter Schatten */
    
    padding: 1rem;          /* Innenabstand */
    font-size: 0.875rem;    /* kleine Schrift */
    z-index: 9999;          /* über anderen Elementen */
    
    display: flex;
    flex-direction: column;
    gap: 0.5rem;            /* Abstand zwischen Tasks */
    z-index: 9999;
}


/* Optional: kleine Anpassung für die Listenelemente */
#open-tasks ul.list {
    margin: 0;
    padding: 0;
    list-style: none; /* PicoCSS List wird automatisch gestylt */
}

#open-tasks li.card {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background-color: var(--neutral-100); /* leicht abgesetzt vom Hintergrund */
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}


dialog {
    z-index: 10001;
}

.assemblies {
    padding: 20px;
}

.user-groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
}

.user-groups-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.btn-create {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-create:hover {
    background: #0056b3;
}

/* Table styles matching user groups */
.members-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.members-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.members-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.members-table td {
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
}

.members-table tbody tr {
    transition: background 0.2s ease;
}

.members-table tbody tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

.assembly-row:hover {
    background: #f0f7ff !important;
}

.assembly-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.assembly-name i {
    color: #007bff;
}

.owner-badge {
    color: #ffc107;
    font-size: 14px;
}

/* Reuse role-badge styles */
.role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.permission-admin {
    background: #dc3545;
    color: white;
}

.permission-view {
    background: #ffc107;
    color: #333;
}

.permission-public {
    background: #28a745;
    color: white;
}

.stat-number {
    text-align: center;
    font-weight: 600;
    color: #007bff;
}

/* Actions matching user groups */
.actions {
    display: flex;
    gap: 8px;
}

.btn-view, .btn-edit, .btn-remove {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-view {
    background: #007bff;
    color: white;
}

.btn-view:hover {
    background: #0056b3;
}

.btn-edit {
    background: #6c757d;
    color: white;
}

.btn-edit:hover {
    background: #545b62;
}

.btn-remove {
    background: #dc3545;
    color: white;
}

.btn-remove:hover {
    background: #bd2130;
}

/* Table footer matching user groups style */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

.table-summary {
    color: #6c757d;
    font-size: 14px;
}

.table-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-label {
    color: #6c757d;
    font-size: 14px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.filter-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Empty state matching user groups style */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 30px;
}

.empty-icon {
    margin-bottom: 20px;
    color: #adb5bd;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

/* User info boxes matching existing style */
.user-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.info-icon {
    font-size: 24px;
}

.user-info p {
    margin: 0;
    color: #856404;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .members-table {
        display: block;
        overflow-x: auto;
    }
    
    .user-groups-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .table-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .table-filters {
        flex-wrap: wrap;
    }
    
    .actions {
        flex-wrap: wrap;
    }
}

.workbenches {
    padding: 20px;
}

.user-groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
}

.user-groups-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
}

.btn-create {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-create:hover {
    background: #0056b3;
}

/* Reuse table styles */
.members-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.members-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.members-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.members-table td {
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
}

.members-table tbody tr {
    transition: background 0.2s ease;
}

.members-table tbody tr:hover {
    background: #f8f9fa;
    cursor: pointer;
}

.workbench-row:hover {
    background: #f0f7ff !important;
}

.workbench-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.workbench-name i {
    color: #17a2b8; /* Different color for workbenches */
}

.workbench-description {
    color: #666;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.owner-badge {
    color: #ffc107;
    font-size: 14px;
}

/* Reuse role-badge styles */
.role-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.permission-admin {
    background: #dc3545;
    color: white;
}

.permission-view {
    background: #ffc107;
    color: #333;
}

.permission-public {
    background: #28a745;
    color: white;
}

.stat-number {
    text-align: center;
    font-weight: 600;
    color: #007bff;
}

/* Reuse actions styles */
.actions {
    display: flex;
    gap: 8px;
}

.btn-view, .btn-edit, .btn-remove {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-view {
    background: #007bff;
    color: white;
}

.btn-view:hover {
    background: #0056b3;
}

.btn-edit {
    background: #6c757d;
    color: white;
}

.btn-edit:hover {
    background: #545b62;
}

/* Reuse table footer styles */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

.table-summary {
    color: #6c757d;
    font-size: 14px;
}

.table-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-label {
    color: #6c757d;
    font-size: 14px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.filter-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Reuse empty state styles */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 30px;
}

.empty-icon {
    margin-bottom: 20px;
    color: #adb5bd;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

/* Reuse user info styles */
.user-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.info-icon {
    font-size: 24px;
    color: #17a2b8;
}

.user-info p {
    margin: 0;
    color: #004085;
    line-height: 1.5;
}

/* Responsive - same as assemblies */
@media (max-width: 768px) {
    .members-table {
        display: block;
        overflow-x: auto;
    }

    .user-groups-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .table-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .table-filters {
        flex-wrap: wrap;
    }

    .actions {
        flex-wrap: wrap;
    }

    .workbench-description {
        max-width: 150px;
    }
}