:root {
  --cc-bg: #070b13;
  --cc-card: rgba(18, 24, 38, 0.88);
  --cc-border: rgba(148, 163, 184, 0.18);
  --cc-glow: rgba(37, 99, 235, 0.25);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.22), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(124, 58, 237, 0.16), transparent 26rem),
    var(--cc-bg);
}

.glass-nav {
  background: rgba(7, 11, 19, 0.78);
  backdrop-filter: blur(14px);
}

.brand-mark,
.round-icon,
.login-icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 0 2rem var(--cc-glow);
}

.login-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.4rem;
  font-size: 1.65rem;
}

.login-shell {
  min-height: calc(100vh - 7rem);
}

.login-card {
  width: min(100%, 440px);
}

.cloud-card {
  background: var(--cc-card);
  border: 1px solid var(--cc-border);
  border-radius: 1.35rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.32);
}


.upload-done-alert {
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.24), rgba(15, 23, 42, 0.72));
  color: #dcfce7;
}

.upload-done-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.85rem;
  background: rgba(22, 163, 74, 0.22);
  color: #86efac;
  font-size: 1.25rem;
}


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

.upload-action {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 6.25rem;
  padding: 1rem;
  overflow: hidden;
  color: #e5e7eb;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(124, 58, 237, 0.08)),
    rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1.15rem;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.upload-action:hover,
.upload-action:focus-within {
  transform: translateY(-1px);
  border-color: rgba(96, 165, 250, 0.95);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(124, 58, 237, 0.14)),
    rgba(30, 41, 59, 0.95);
  box-shadow: 0 0.9rem 2.4rem rgba(37, 99, 235, 0.12);
}

.upload-action-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #93c5fd;
  font-size: 1.45rem;
  pointer-events: none;
}

.upload-action-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

.upload-action-title {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.upload-action-subtitle {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.2;
}

.native-picker-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-note,
.selected-file {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0.95rem;
  background: rgba(7, 11, 19, 0.4);
  padding: 0.75rem 0.85rem;
}

.cloud-table {
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(148, 163, 184, 0.12);
}

.file-name {
  max-width: 24rem;
}

.btn-danger-subtle {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.3);
}

@media (max-width: 768px) {
  .navbar .container {
    gap: 0.75rem;
  }
  .navbar-brand span:last-child {
    display: none;
  }
  .file-name {
    max-width: 12rem;
  }

  .upload-button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .upload-action {
    min-height: 6.25rem;
    padding: 1rem;
    border-radius: 1.15rem;
  }

  .upload-action-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    font-size: 1.45rem;
  }

  .upload-action-title {
    font-size: 1rem;
  }

  .upload-action-subtitle {
    font-size: 0.82rem;
  }
}

@media (max-width: 420px) {
  .upload-button-grid {
    gap: 0.65rem;
  }

  .upload-action {
    align-items: flex-start;
    flex-direction: column;
    min-height: 8.4rem;
    padding: 0.9rem;
  }

  .upload-action-icon {
    width: 2.9rem;
    height: 2.9rem;
  }

  .upload-action-subtitle {
    font-size: 0.76rem;
  }
}


.update-message {
  max-width: 22rem;
  white-space: normal;
}



.file-entry-list {
  display: grid;
  gap: 0.85rem;
}

.file-entry {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 1rem;
  background: rgba(7, 11, 19, 0.34);
  overflow: hidden;
}

.single-file-entry,
.folder-entry-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 4.3rem;
  padding: 0.85rem 1rem;
}

.folder-entry-main {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(124, 58, 237, 0.08)),
    rgba(15, 23, 42, 0.52);
}

.folder-entry-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  color: inherit;
  text-align: left;
  border: 0;
  background: transparent;
}

.folder-entry-main:hover,
.folder-entry-main:focus-within {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(124, 58, 237, 0.12)),
    rgba(30, 41, 59, 0.72);
}

.folder-action-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
}

.folder-action-group form {
  margin: 0;
}

.folder-download-btn,
.folder-delete-btn {
  border-radius: 0.8rem;
  white-space: nowrap;
}

.file-entry-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.9rem;
  color: #93c5fd;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 1.25rem;
}

.folder-icon {
  color: #facc15;
}

.file-entry-content,
.folder-file-info {
  min-width: 0;
  flex: 1 1 auto;
}

.file-entry-title {
  display: block;
  min-width: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.file-entry-meta {
  display: block;
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.25;
}

.folder-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  color: #94a3b8;
  transition: transform 0.16s ease;
}

.folder-entry-toggle-btn[aria-expanded="true"] .folder-toggle {
  transform: rotate(180deg);
}

.folder-files {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.24);
}

.folder-file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.42);
}

@media (max-width: 768px) {
  .single-file-entry,
  .folder-entry-main {
    align-items: flex-start;
    padding: 0.85rem;
  }

  .folder-entry-main {
    flex-wrap: wrap;
  }

  .single-file-entry {
    flex-wrap: wrap;
  }

  .folder-entry-toggle-btn {
    align-items: flex-start;
    flex-basis: 100%;
  }

  .folder-action-group {
    width: calc(100% - 3.55rem);
    margin-left: 3.55rem;
  }

  .folder-action-group .btn,
  .folder-action-group form {
    flex: 1 1 auto;
  }

  .folder-action-group button {
    width: 100%;
  }

  .file-entry-content {
    flex-basis: calc(100% - 3.7rem);
  }

  .single-file-entry > .btn-group {
    width: 100%;
    margin-left: 3.55rem;
  }

  .single-file-entry > .btn-group .btn,
  .single-file-entry > .btn-group form,
  .single-file-entry > .btn-group button {
    flex: 1 1 auto;
  }

  .folder-file-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .folder-file-row .btn-group {
    width: 100%;
  }

  .folder-file-row .btn-group .btn,
  .folder-file-row .btn-group form,
  .folder-file-row .btn-group button {
    flex: 1 1 auto;
  }

  .file-entry-meta {
    font-size: 0.78rem;
  }
}
