@font-face {
  font-family: 'Shabnam';
  src: url('/assets/Shabnam.woff') format('woff'),
       url('/assets/Shabnam.ttf') format('truetype');
}

:root {
  --blue: #004c8c;
  --cyan: #008dd2;
  --green: #00c2a8;
  --bg: #f4f8fb;
  --surface: #ffffff;
  --surface-2: #f8fbfd;
  --text: #102033;
  --muted: #6b7c8f;
  --border: #dbe6ef;
  --shadow: 0 22px 55px rgba(0, 76, 140, .10);
  --shadow-soft: 0 10px 26px rgba(0, 76, 140, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Shabnam, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 10%, rgba(0, 141, 210, .10), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(0, 194, 168, .10), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

button, input, textarea { font-family: inherit; }

.zw-auth-body,
.zw-view-body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.zw-auth-shell,
.zw-view-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.zw-auth-card,
.zw-upload-card,
.zw-view-card,
.zw-modal-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  border-radius: 26px;
}

.zw-auth-card {
  width: min(430px, 100%);
  padding: 36px;
}

.zw-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.zw-brand-logo {
  max-width: 190px;
  max-height: 56px;
  object-fit: contain;
}

h1, h2, p { margin-top: 0; }

h1 {
  font-size: 26px;
  margin-bottom: 10px;
  letter-spacing: -.4px;
  color: var(--text);
}

h2 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--text);
}

p {
  color: var(--muted);
  line-height: 1.9;
  font-size: 14px;
}

.zw-kicker {
  display: inline-flex;
  color: var(--cyan);
  font-size: 12px;
  margin-bottom: 12px;
  font-weight: 900;
}

.zw-form,
.zw-upload-form {
  display: grid;
  gap: 13px;
  margin-top: 24px;
}

label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  border-radius: 15px;
  padding: 14px 16px;
  transition: .18s ease;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.9;
}

input:focus,
textarea:focus {
  border-color: rgba(0, 141, 210, .72);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 141, 210, .10);
}

.zw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  border-radius: 15px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0, 76, 140, .18);
  transition: .18s ease;
}

.zw-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 76, 140, .22);
}

.zw-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.zw-error {
  color: #d93025;
  min-height: 22px;
  margin-top: 16px;
  font-size: 13px;
}

.zw-topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.zw-topbar-brand,
.zw-view-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 900;
  color: var(--text);
}

.zw-topbar-brand img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.zw-view-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.zw-ghost-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 10px 17px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.zw-panel {
  width: min(940px, calc(100% - 32px));
  margin: 36px auto;
}

.zw-upload-card {
  padding: 36px;
}

.zw-section-head {
  margin-bottom: 4px;
}

.zw-file-box {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 116px;
  padding: 22px;
  border: 1px dashed rgba(0, 141, 210, .45);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(0, 141, 210, .06), rgba(0, 194, 168, .06));
  cursor: pointer;
  transition: .18s ease;
}

.zw-file-box:hover {
  border-color: rgba(0, 141, 210, .75);
  background:
    linear-gradient(135deg, rgba(0, 141, 210, .09), rgba(0, 194, 168, .09));
}

.zw-file-box input { display: none; }

.zw-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--cyan);
  font-size: 26px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.zw-file-box strong {
  display: block;
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text);
}

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

.zw-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.zw-options label { cursor: pointer; }

.zw-options input { display: none; }

.zw-options span {
  display: grid;
  place-items: center;
  min-height: 48px;
  border-radius: 15px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  transition: .18s ease;
}

.zw-options input:checked + span {
  border-color: rgba(0, 141, 210, .75);
  background: rgba(0, 141, 210, .09);
  color: var(--blue);
}

.zw-progress-wrap {
  display: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6eef5;
}

.zw-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.zw-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 13px;
}

.zw-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(16, 32, 51, .34);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.zw-modal.active { display: grid; }

.zw-modal-card {
  width: min(520px, 100%);
  padding: 30px;
  position: relative;
}

.zw-modal-close {
  position: absolute;
  left: 18px;
  top: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

.zw-url-input {
  direction: ltr;
  text-align: left;
  margin: 14px 0;
  background: #fff;
}

.zw-view-card {
  width: min(1080px, 100%);
  min-height: 70vh;
  padding: 28px;
}

.zw-view-brand {
  margin-bottom: 22px;
  color: var(--muted);
  justify-content: space-between;
}

.zw-file-view {
  min-height: 520px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.zw-file-view iframe,
.zw-file-view video,
.zw-file-view img {
  width: 100%;
  max-height: 72vh;
  border: 0;
  display: block;
}

.zw-file-view iframe { min-height: 72vh; }
.zw-file-view video { background: #000; }
.zw-file-view img { object-fit: contain; }

.zw-download-card {
  text-align: center;
  padding: 34px;
}

.zw-expiry-box {
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 14px;
  border-radius: 16px;
  margin: 14px 0 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.zw-loader {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #dce8f0;
  border-top-color: var(--cyan);
  animation: zwSpin 1s linear infinite;
}

@keyframes zwSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .zw-auth-card,
  .zw-upload-card,
  .zw-view-card,
  .zw-modal-card {
    border-radius: 22px;
    padding: 22px;
  }

  .zw-topbar {
    height: auto;
    min-height: 66px;
    padding: 12px 16px;
  }

  .zw-topbar-brand span {
    display: none;
  }

  .zw-topbar-brand img {
    height: 36px;
  }

  .zw-options {
    grid-template-columns: 1fr 1fr;
  }

  h1 { font-size: 22px; }

  .zw-file-box {
    min-height: 100px;
    padding: 18px;
  }

  .zw-panel {
    margin: 20px auto;
  }
}
