@font-face {
  font-family: "IranYekan";
  src: url("/fonts/IRANYekanThin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IranYekan";
  src: url("/fonts/IRANYekanLight.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IranYekan";
  src: url("/fonts/IRANYekanRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IranYekan";
  src: url("/fonts/IRANYekanMedium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IranYekan";
  src: url("/fonts/IRANYekanBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IranYekan";
  src: url("/fonts/IRANYekanExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IranYekan";
  src: url("/fonts/IRANYekanBlack.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --shkian-dark-teal: #16697a;
  --shkian-cerulean: #6eb5cb;
  --shkian-light-blue: #82c0cc;
  --shkian-mint: #bddbd1;
  --shkian-off-white: #e8e9e4;
  --shkian-near-white: #fbfaf6;
  --shkian-pale-blue: #e8f0f3;
  --shkian-powder-blue: #c7e5ed;
  --gray-50: #f8fbfd;
  --gray-100: #eef4f7;
  --gray-200: #d7e4ea;
  --gray-400: #7a8fa0;
  --gray-600: #385466;
  --gray-800: #102a3a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body.app-body {
  font-family: "Vazirmatn", "IranYekan", "IRANSans", "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background: linear-gradient(135deg, #f8fbfd 0%, #edf4f7 55%, #e6f0f4 100%);
  color: var(--gray-800);
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-navbar {
  position: fixed;
  top: 12px;
  left: 20px;
  right: 20px;
  height: 56px;
  width: calc(100% - 40px);
  z-index: 1200;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(199, 229, 237, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 48px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.app-navbar > .container {
  height: 56px;
  min-height: 56px;
  padding-left: 16px;
  padding-right: 16px;
}

.app-topbar-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-navbar,
.app-navbar * {
  font-family: "IranYekan", "Vazirmatn", "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

.app-topbar-actions,
.app-topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.app-topbar-brand {
  color: #0f172a;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.app-topbar-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.app-topbar-btn {
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(22, 105, 122, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  transition: all 0.2s ease;
}

.app-topbar-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #000;
}

.app-topbar-btn.active {
  background: var(--shkian-powder-blue);
  border-color: rgba(22, 105, 122, 0.26);
  color: var(--shkian-dark-teal);
}

.app-topbar-nav {
  font-size: 0.82rem;
  font-weight: 600;
}

.app-topbar-user-name {
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-topbar-logout {
  color: #b42318;
}

.app-topbar-logout:hover {
  background: rgba(180, 35, 24, 0.08);
  color: #912018;
}

.app-main-content {
  padding-top: calc(56px + 24px) !important;
  flex: 1 0 auto;
  width: 100%;
  min-height: calc(100dvh - 56px - 24px);
}

.navbar-brand {
  color: var(--shkian-dark-teal);
}

.lang-switcher .btn.active {
  background: linear-gradient(135deg, var(--shkian-dark-teal), var(--shkian-cerulean));
  color: #fff;
  border-color: var(--shkian-dark-teal);
}

.card {
  border: 1px solid var(--shkian-pale-blue);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(16, 42, 58, 0.08);
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(16, 42, 58, 0.11);
  border-color: #d6e7ee;
}

.hub-hero {
  background: linear-gradient(120deg, #ffffff, #eff7f9 52%, #d7ecf2);
}

.submission-card {
  border: 1px solid var(--shkian-pale-blue);
  border-radius: 14px;
  background: #fff;
}

.empty-state {
  border: 1px dashed var(--shkian-light-blue);
  border-radius: 14px;
  background: #f4fafc;
  padding: 1rem 1.1rem;
}

.file-picker {
  border: 1px solid var(--shkian-pale-blue);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0.85rem;
  display: grid;
  gap: 0.7rem;
}

.file-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-dropzone {
  border: 1.5px dashed #b9d6e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fdff 0%, #f3f9fc 100%);
  padding: 1rem 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-picker-dropzone:hover {
  border-color: var(--shkian-cerulean);
  background: #eef8fb;
}

.file-picker.is-dragging .file-picker-dropzone {
  border-color: var(--shkian-dark-teal);
  background: #e8f4f8;
  box-shadow: 0 0 0 3px rgba(110, 181, 203, 0.2);
}

.file-picker-title {
  font-weight: 700;
  color: #163447;
  margin-bottom: 0.25rem;
}

.file-picker-subtitle {
  font-size: 0.84rem;
  color: #5f798c;
}

.file-picker-summary {
  font-size: 0.84rem;
  color: #355468;
}

.file-picker-list {
  display: grid;
  gap: 0.5rem;
}

.file-picker-empty {
  font-size: 0.85rem;
  color: #708a9d;
  background: #f6fbfd;
  border: 1px solid #e1eef3;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.file-picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid #deebf0;
  border-radius: 10px;
  background: #fff;
  padding: 0.6rem 0.75rem;
}

.file-picker-item-meta {
  min-width: 0;
}

.file-picker-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #173448;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

.file-picker-item-size {
  font-size: 0.78rem;
  color: #6b8294;
}

.upload-progress {
  display: grid;
  gap: 0.35rem;
}

.upload-progress-label {
  font-size: 0.82rem;
  color: #355468;
  font-weight: 600;
}

.upload-progress-track {
  height: 0.7rem;
  border-radius: 999px;
  background: #e8f2f6;
}

.upload-progress-bar {
  background: linear-gradient(135deg, var(--shkian-dark-teal), var(--shkian-cerulean));
}

.user-selector {
  border: 1px solid var(--shkian-pale-blue);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.user-selector-toolbar {
  display: flex;
  gap: 0.5rem;
}

.user-selector-search {
  min-height: 40px;
}

.user-selector-summary {
  font-size: 0.82rem;
  color: #4d6a7e;
  font-weight: 600;
}

.user-selector-list {
  border: 1px solid #deebf0;
  border-radius: 10px;
  background: #fff;
  max-height: 210px;
  overflow: auto;
  padding: 0.4rem;
  display: grid;
  gap: 0.35rem;
}

.user-selector-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.user-selector-item:hover {
  background: #f4fafc;
}

.user-selector-item.is-selected {
  background: #eaf6fa;
  border-color: #cbe4ec;
}

.user-selector-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.user-selector-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1d3c50;
}

.user-selector-item-username {
  font-size: 0.78rem;
  color: #6a8396;
}

.user-selector-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.user-chip {
  border: 1px solid #c9e0e8;
  background: #f1f9fc;
  color: #20445a;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.user-chip-close {
  opacity: 0.7;
}

.user-selector-empty {
  font-size: 0.84rem;
  color: #688293;
  padding: 0.5rem;
}

.btn-primary,
.btn-success {
  border: 0;
  box-shadow: 0 8px 18px rgba(22, 105, 122, 0.22);
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--shkian-dark-teal), var(--shkian-cerulean));
}

.btn-success {
  background: linear-gradient(135deg, var(--shkian-dark-teal), var(--shkian-light-blue));
}

.btn-outline-primary:hover {
  background-color: var(--shkian-dark-teal);
  border-color: var(--shkian-dark-teal);
}

.btn {
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary:hover,
.btn-success:hover {
  box-shadow: 0 12px 24px rgba(22, 105, 122, 0.28);
  filter: brightness(1.02);
}

.form-control,
.form-select,
textarea.form-control {
  border-radius: 12px;
  border-color: var(--shkian-pale-blue);
  background: #fff;
  min-height: 44px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--shkian-cerulean);
  box-shadow: 0 0 0 0.2rem rgba(110, 181, 203, 0.2);
}

.form-control::placeholder,
textarea.form-control::placeholder {
  color: #88a0b2;
}

.form-label {
  font-weight: 600;
  color: #244357;
}

.table > :not(caption) > * > * {
  padding: 0.9rem;
  vertical-align: middle;
}

.table thead th {
  color: var(--gray-600);
  background: #f0f7fa;
  border-bottom: 1px solid var(--shkian-pale-blue);
  font-weight: 700;
}

.table {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(199, 229, 237, 0.28);
}

.file-name-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.alert-success {
  background: #edf8f2;
  border-color: #b7dfcd;
  color: #0f5132;
}

.alert-danger {
  background: #feeff1;
  border-color: #f5c2c7;
  color: #842029;
}

.alert {
  border-radius: 12px;
  border-width: 1px;
}

.rtl {
  direction: rtl;
  text-align: right;
}

.ltr {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .table tbody td::before {
  margin-left: 0.5rem;
}

html[dir="ltr"] .table tbody td::before {
  margin-right: 0.5rem;
}

@media (max-width: 767.98px) {
  .app-navbar {
    top: 8px;
    left: 24px;
    right: 16px;
    width: calc(100% - 40px);
    border-radius: 40px;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .app-topbar-brand {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .app-topbar-actions {
    gap: 6px;
  }

  .app-topbar-user-name,
  .app-topbar-nav {
    display: none;
  }

  .app-topbar-btn {
    height: 34px;
    min-width: 34px;
    padding: 0 10px;
  }

  .app-main-content {
    min-height: calc(100dvh - 56px - 18px);
  }

  .table-responsive {
    border: 0;
  }

  .table thead {
    display: none;
  }

  .table tbody tr {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 0.85rem;
    background: #fff;
  }

  .table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: 0;
    padding: 0.65rem 0.85rem;
  }

  .table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gray-600);
  }

  .table tbody td:last-child {
    justify-content: flex-end;
  }
}
