/*
 * ==================================================================================
 * Copyright 2026 Rabe56 / Felix N. Alle Rechte vorbehalten.
 * Diese Software und die zugehörigen Dateien sind urheberrechtlich geschützt.
 * Die Vervielfältigung, Änderung oder Verbreitung ohne ausdrückliche
 * schriftliche Genehmigung des Urhebers ist untersagt.
 *
 * Erstellt: 04.2026
 * Autor: Rabe56 | rabe56.business@gmail.com
 * ==================================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 30%),
    radial-gradient(circle at 80% 30%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 35%),
    linear-gradient(135deg, var(--bg), color-mix(in srgb, var(--bg) 85%, #ffffff));
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

.bg-orb {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

.orb-a {
  top: -70px;
  right: 10%;
  background: var(--accent);
}

.orb-b {
  bottom: -80px;
  left: 12%;
  background: var(--primary);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  position: sticky;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.logo {
  height: 34px;
  width: auto;
  border-radius: 8px;
}

.menu {
  display: flex;
  gap: 12px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.profile-wrap {
  margin-left: auto;
  position: relative;
}

.profile-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  border-radius: 999px;
  padding: 6px 10px;
}

.profile-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 16%, transparent);
}

.profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 120px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: var(--surface);
}

.profile-wrap.open .profile-dropdown {
  display: block;
}

.profile-dropdown a {
  display: block;
  color: var(--text);
  padding: 6px 8px;
  border-radius: 8px;
}

.profile-dropdown a:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  text-decoration: none;
}

.container {
  max-width: min(1600px, 96vw);
  margin: 28px auto;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}

.card {
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  padding: 18px;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--text) 8%, transparent);
  animation: cardIn 0.35s ease-out;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-wrap {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
}

.auth-card {
  max-width: 450px;
  width: 100%;
}

.stack {
  display: grid;
  gap: 12px;
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.actions-col {
  display: grid;
  gap: 8px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.files-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pathline {
  margin-bottom: 12px;
  color: var(--muted);
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.color-item {
  display: grid;
  gap: 6px;
  align-content: start;
}

.color-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.color-inputs input[type="color"] {
  flex: 0 0 56px;
  width: 56px;
  height: 42px;
  padding: 2px;
}

.color-inputs input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.item-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  color: var(--text) !important;
  padding: 0;
}

.item-link:hover {
  text-decoration: underline;
  filter: none;
}

.item-icon-wrap {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex: 0 0 22px;
}

.item-icon-svg {
  width: 16px;
  height: 16px;
}

.item-icon-folder {
  color: #9a6a00;
  background: linear-gradient(180deg, #ffdd87, #f7b731);
}

.item-icon-file {
  color: #2f5fb8;
  background: linear-gradient(180deg, #bcd8ff, #84b4ff);
}

.item-icon-image {
  color: #0c6a6a;
  background: linear-gradient(180deg, #9ef7e5, #52d3bb);
}

.item-icon-pdf {
  color: #9f1822;
  background: linear-gradient(180deg, #ffc1c6, #ff8a95);
}

.item-icon-archive {
  color: #6b3f0c;
  background: linear-gradient(180deg, #ffd8a8, #f6b66b);
}

.item-icon-code {
  color: #26498b;
  background: linear-gradient(180deg, #c8d9ff, #8caeff);
}

.item-icon-audio {
  color: #5a2b9c;
  background: linear-gradient(180deg, #dcc4ff, #b68cff);
}

.item-icon-video {
  color: #0b5a2f;
  background: linear-gradient(180deg, #b8f5c4, #77d48f);
}

.item-icon-word {
  color: #163f88;
  background: linear-gradient(180deg, #c6dcff, #8eb5ff);
}

.item-icon-excel {
  color: #1f6d36;
  background: linear-gradient(180deg, #c8f3d6, #8bddab);
}

.item-icon-ppt {
  color: #8a3a06;
  background: linear-gradient(180deg, #ffd1b8, #ffa06a);
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
}

input,
select,
button,
a {
  font: inherit;
}

input,
select {
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 11px;
}

button {
  text-decoration: none;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

button {
  background: color-mix(in srgb, var(--primary) 82%, #ffffff);
  color: #fff;
}

button:hover {
  filter: brightness(0.95);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.menu a {
  color: var(--text);
  font-weight: 600;
  padding: 0;
}

.menu a:hover {
  filter: none;
}

.ghost {
  background: color-mix(in srgb, var(--surface) 80%, transparent) !important;
  color: var(--text) !important;
  border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
}

.danger {
  background: var(--danger) !important;
  color: #fff !important;
}

.btn-name {
  background: #3b82f6;
  color: #fff;
}

.btn-role {
  background: #8b5cf6;
  color: #fff;
}

.btn-password {
  background: #f59e0b;
  color: #fff;
}

.btn-block {
  background: #ef4444;
  color: #fff;
}

.btn-unblock {
  background: #10b981;
  color: #fff;
}

.alert {
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 500;
}

.alert-error {
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

.alert-ok {
  background: color-mix(in srgb, var(--success) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--success) 28%, transparent);
}

.hint {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  padding: 11px 8px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--text) 35%, transparent);
  z-index: 20;
}

.context-menu {
  position: fixed;
  display: none;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  border-radius: 10px;
  box-shadow: 0 18px 36px color-mix(in srgb, var(--text) 20%, transparent);
  padding: 6px;
  z-index: 30;
}

.context-menu.open {
  display: grid;
  gap: 4px;
}

.context-menu button {
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  text-align: left;
  padding: 8px 10px;
}

.context-menu button:hover {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  filter: none;
}

.context-menu .context-delete {
  color: var(--danger);
}

.modal.open {
  display: flex;
}

.modal-content {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 24px 50px color-mix(in srgb, var(--text) 20%, transparent);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dropzone {
  border: 2px dashed color-mix(in srgb, var(--text) 22%, transparent);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  display: grid;
  gap: 6px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}

.dropzone.dragover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, var(--surface));
}

@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .menu {
    position: static;
    transform: none;
    flex-wrap: wrap;
  }

  .profile-wrap {
    margin-left: 0;
  }

  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .files-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
