@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');
@import url('modal.css');

:root {
  --bg-start: #0b4c92;
  --bg-end: #0a91b1;
  --panel: #ffffff;
  --accent: #0b4c92;
  --accent-strong: #0a3d78;
  --text: #0f1b2e;
  --muted: #5f738c;
  --border: #d8e3ef;
  --shadow: 0 20px 80px rgba(5, 40, 75, 0.15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', Tahoma, sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  min-height: 100vh;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  background: rgba(255,255,255,0.96);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 25px 70px rgba(5, 40, 75, 0.18);
  border: 1px solid rgba(11, 140, 160, 0.18);
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.auth-header {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.auth-header img {
  height: 60px;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.auth-header .title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.auth-header .title h2 { margin: 0; font-size: 22px; letter-spacing: -0.3px; }
.auth-header .title p { margin: 0; color: #5f738c; font-size: 14px; }

.auth-card form .field label { font-weight: 700; }

.auth-extra {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main {
  flex: 1 0 auto;
}

.app-footer {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(11,76,146,0.1), rgba(10,145,177,0.08));
  border-top: 1px solid rgba(13,178,201,0.25);
  color: #eef4f8;
  font-size: 14px;
  padding: 18px 12px;
  text-align: center;
  box-shadow: 0 -6px 20px rgba(5,40,75,0.12);
}
.app-footer a {
  color: #dff3ff;
  text-decoration: none;
  font-weight: 700;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.hero {
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  background: linear-gradient(120deg, rgba(13,178,201,0.18), rgba(10,145,177,0.1));
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
}
.hero h1 { margin: 0; font-size: 28px; letter-spacing: -0.5px; }
.hero p { margin: 6px 0 0; color: rgba(255, 255, 255, 0.85); }
.logo-pill { background: rgba(255,255,255,0.14); padding: 10px 16px; border-radius: 40px; font-weight: 700; letter-spacing: 0.4px; }
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand img {
  height: 64px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  background: #fff;
  padding: 6px;
}
.brand .text-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card {
  background: var(--panel);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(5,40,75,0.12);
  border: 1px solid rgba(11, 140, 160, 0.12);
  margin-bottom: 14px;
}

.section-title { margin: 0 0 16px; font-size: 20px; color: var(--text); }

.uploader-card { text-align: center; }
.drop-wrapper { display: flex; justify-content: center; }
.drop-zone {
  border: 2px dashed rgba(11, 140, 160, 0.35);
  background: linear-gradient(180deg, rgba(13, 178, 201, 0.08), rgba(10, 145, 177, 0.04));
  padding: 42px 24px;
  border-radius: 22px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  max-width: 640px;
  width: 100%;
}
.drop-zone.dragover {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(13, 178, 201, 0.18), rgba(10, 145, 177, 0.12));
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(13, 178, 201, 0.25);
}
.drop-zone .icon {
  width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px;
  background: rgba(13, 178, 201, 0.18); display: grid; place-items: center;
  color: var(--accent-strong); font-weight: 700; font-size: 20px;
}
.drop-zone p { margin: 6px 0; color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }

.info {
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  background: #f2f8fb;
  border: 1px solid #d9eef4;
  color: #0b556c;
}

.field { margin: 12px 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--border); font-size: 15px; transition: border-color 0.2s ease;
}
.field input[type="text"]:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 178, 201, 0.2);
}

.actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.actions.center { justify-content: center; }

.btn {
  border: none; border-radius: 12px; padding: 12px 16px;
  font-weight: 700; cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: #fff; box-shadow: 0 10px 30px rgba(13, 178, 201, 0.35); }
.btn.secondary { background: #eef4f7; color: var(--text); }
.btn.danger { background: #ffecef; color: #b7223c; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:not(:disabled):active { transform: translateY(1px); }

.status { margin-top: 12px; font-weight: 600; color: #0b556c; }

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.filters label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.filters select, .filters input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); font-size: 15px;
}
.filters .full { grid-column: 1 / -1; }

.files-card .accordion {
  width: 100%; text-align: left; padding: 12px 14px;
  background: #f2f7fa; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; font-weight: 700; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.accordion .count-badge {
  background: rgba(13,178,201,0.2);
  color: var(--accent-strong);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.accordion-content { display: none; padding: 10px 2px 2px; }
.accordion-content.active, .accordion.active + .accordion-content { display: block; }

.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fdfefe;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.file-main { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.file-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.file-name { font-weight: 700; font-size: 16px; color: var(--text); }
.file-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.modal {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  width: min(420px, 92vw);
  box-shadow: 0 20px 80px rgba(5, 40, 75, 0.25);
}
.modal h3 { margin: 0 0 12px; }

.badge {
  background: rgba(13, 178, 201, 0.12);
  color: var(--accent-strong);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.small { font-size: 13px; color: var(--muted); }
.tag {
  display: inline-block; padding: 4px 8px;
  background: #f2f7fa; border-radius: 8px; color: var(--muted);
  font-size: 12px; margin-right: 6px;
}

@media (max-width: 960px) {
  .actions { flex-wrap: wrap; justify-content: center; }
  .file-main { flex-direction: column; }
}

@media (max-width: 600px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .brand img { height: 50px; }
  .brand .text-block h1 { font-size: 22px; }
  .drop-zone { padding: 26px 16px; }
  .card { padding: 14px; }
  .filters { grid-template-columns: 1fr; }
  .auth-card { padding: 22px; }
  .auth-header img { height: 52px; }
}
