/* ============================================================
   Cloud-USB-Stick - Stylesheet
   Großzügige Klickflächen, klares Layout, responsive für
   Tablet/Smartboard-Bedienung.
   ============================================================ */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-danger: #dc2626;
  --color-danger-dark: #b91c1c;
  --color-bg: #f4f6f9;
  --color-text: #1f2937;
  --color-border: #d7dce3;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: background-color .15s ease, transform .05s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-secondary { background: #e5e9f0; color: var(--color-text); }
.btn-secondary:hover { background: #d7dce3; }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: var(--color-danger-dark); }

.btn-logout { background: rgba(255,255,255,0.15); color: #fff; }
.btn-logout:hover { background: rgba(255,255,255,0.3); }

.btn-block { width: 100%; justify-content: center; }

.btn-icon {
  padding: 10px 14px;
  min-height: 44px;
  font-size: 1.1rem;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-primary);
  color: #fff;
  padding: 16px 24px;
}
.topbar h1 { margin: 0; font-size: 1.3rem; }

/* ---------- Layout ---------- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 1.05rem;
}
.breadcrumbs a, .breadcrumbs .crumb-current {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-primary);
  cursor: pointer;
}
.breadcrumbs a:hover { background: #e5e9f0; }
.breadcrumbs .crumb-current { color: var(--color-text); font-weight: 600; }
.breadcrumbs .crumb-sep { color: #9aa3b2; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

/* ---------- Drag & Drop ---------- */

.dropzone {
  border: 3px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 1.05rem;
  background: #fff;
  margin-bottom: 16px;
  transition: background-color .15s ease, border-color .15s ease;
}
.dropzone.dragover {
  background: #eaf1ff;
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}
.dropzone p { margin: 0; }

.upload-progress {
  background: #fff;
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--color-border);
}
.upload-progress-bar {
  height: 14px;
  background: var(--color-primary);
  border-radius: 7px;
  width: 0%;
  transition: width .2s ease;
  flex: 1;
}
.upload-progress-text { font-weight: 600; min-width: 48px; text-align: right; }

/* ---------- Meldungen ---------- */

.message {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-weight: 500;
}
.message-error { background: #fee2e2; color: #991b1b; }
.message-success { background: #dcfce7; color: #166534; }

/* ---------- Dateitabelle ---------- */

.file-table-wrap {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.file-table {
  width: 100%;
  border-collapse: collapse;
}
.file-table th, .file-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.file-table th {
  background: #f0f2f6;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #6b7280;
}
.file-table tr:last-child td { border-bottom: none; }
.file-table tr:hover { background: #f8fafc; }

.col-icon { width: 44px; }
.col-size { width: 100px; }
.col-date { width: 160px; }
.col-actions { width: 220px; }

.file-icon { font-size: 1.4rem; }

.item-name {
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
}
.item-name.folder-name { color: var(--color-primary); font-weight: 600; }
.item-name:hover { text-decoration: underline; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.loading, .empty {
  text-align: center;
  color: #6b7280;
  padding: 30px;
}

/* ---------- Modals ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal[hidden] { display: none; }

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 420px;
}
.modal-box h2 { margin-top: 0; }
.modal-box input[type=text] {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-top: 8px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- Login-Seite ---------- */

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.login-box {
  background: #fff;
  padding: 40px 32px;
  border-radius: 14px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.login-box h1 { margin-top: 0; font-size: 1.6rem; }
.login-subtitle { color: #6b7280; margin-bottom: 20px; }
.login-input {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 16px;
  text-align: center;
}

/* ---------- Responsive (Tablet / Smartboard) ---------- */

@media (max-width: 720px) {
  .topbar { padding: 14px 16px; }
  .topbar h1 { font-size: 1.1rem; }
  .container { padding: 14px; }

  .col-date { display: none; }

  .file-table th, .file-table td { padding: 10px 8px; font-size: 0.92rem; }
  .row-actions { flex-direction: column; }
  .row-actions .btn { width: 100%; justify-content: center; }

  .toolbar .btn { flex: 1; justify-content: center; }
}
