* {
  box-sizing: border-box;
}

:root {
  --navy: #10233f;
  --blue: #2867d8;
  --blue-light: #eef5ff;
  --bg: #f5f7fb;
  --border: #e4e9f1;
  --text: #172033;
  --muted: #738096;
  --white: #ffffff;
  --danger: #c43d4b;
}

body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

.hidden {
  display: none !important;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

/* LOGIN */

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, #dbeaff, transparent 35%),
    linear-gradient(135deg, #f8fbff, #eef3fa);
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: white;
  padding: 38px;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(24, 45, 80, .12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  font-size: 23px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 23px;
}

.brand span {
  font-size: 12px;
  color: var(--muted);
}

.login-card h2 {
  margin-top: 40px;
  margin-bottom: 6px;
}

.muted {
  color: var(--muted);
}

label {
  display: block;
  margin: 20px 0 7px;
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}

input:focus {
  border-color: var(--blue);
}

.primary {
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  font-weight: 600;
  padding: 13px 18px;
}

.login-card .primary {
  width: 100%;
  margin-top: 24px;
}

.error {
  color: var(--danger);
  margin-top: 15px;
  font-size: 14px;
}

/* DASHBOARD */

.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  width: 245px;
  height: 100vh;
  background: var(--navy);
  color: white;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand .logo {
  background: white;
  color: var(--blue);
}

.sidebar-brand span {
  color: #9fb0c7;
}

nav {
  margin-top: 45px;
}

.nav-item {
  width: 100%;
  text-align: left;
  padding: 13px;
  border: 0;
  border-radius: 9px;
  color: #cbd7e7;
  background: transparent;
}

.nav-item.active {
  color: white;
  background: rgba(255,255,255,.10);
}

.sidebar-bottom {
  margin-top: auto;
}

.user-email {
  font-size: 12px;
  color: #aebed2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
}

.main {
  margin-left: 245px;
  width: calc(100% - 245px);
  padding: 38px 45px;
  max-width: 1500px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar h2 {
  margin: 0;
}

.topbar p {
  color: var(--muted);
  margin: 5px 0 0;
}

.storage-card {
  margin-top: 35px;
  padding: 25px;
  background: white;
  border-radius: 15px;
  border: 1px solid var(--border);
}

.storage-header {
  display: flex;
  justify-content: space-between;
}

.storage-title {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.storage-percent {
  color: var(--blue);
  font-weight: 700;
}

.progress {
  height: 8px;
  margin-top: 18px;
  background: #edf1f7;
  border-radius: 20px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--blue);
  transition: width .3s;
}

.drop-zone {
  margin-top: 25px;
  padding: 40px;
  border: 2px dashed #ccd6e4;
  border-radius: 15px;
  text-align: center;
  background: rgba(255,255,255,.55);
  transition: .2s;
  cursor: pointer;
}

.drop-zone.drag {
  border-color: var(--blue);
  background: var(--blue-light);
}

.cloud-icon {
  font-size: 38px;
}

.drop-zone h3 {
  margin-bottom: 4px;
}

.drop-zone p {
  color: var(--muted);
  margin-top: 0;
}

.files-section {
  margin-top: 35px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header span {
  color: var(--muted);
  font-size: 13px;
}

.files-list {
  margin-top: 15px;
}

.file-row {
  display: grid;
  grid-template-columns: 1fr 130px 160px;
  gap: 15px;
  align-items: center;
  padding: 17px 20px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.file-row:first-child {
  border-radius: 12px 12px 0 0;
}

.file-row:last-child {
  border-radius: 0 0 12px 12px;
  border-bottom: 0;
}

.file-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: var(--muted);
  font-size: 13px;
}

.file-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.action {
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  padding: 7px 10px;
}

.delete {
  color: var(--danger);
}

.empty-state {
  margin-top: 15px;
  padding: 60px 20px;
  background: white;
  border-radius: 15px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  font-size: 42px;
}

.empty-state h3 {
  color: var(--text);
}

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  padding: 14px 18px;
  background: var(--navy);
  color: white;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 800px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    width: 100%;
    padding: 24px 18px;
  }

  .topbar {
    align-items: flex-start;
    gap: 15px;
  }

  .upload-button {
    white-space: nowrap;
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .file-actions {
    justify-content: flex-start;
  }
}
