/* [project]/src/app/globals.css [app-client] (css) */
:root {
  --brand-dark: #141413;
  --brand-light: #faf9f5;
  --brand-mid: #b0aea5;
  --brand-subtle: #e8e6dc;
  --brand-orange: #d97757;
  --brand-blue: #6a9bcc;
  --brand-green: #788c5d;
  --surface-0: #faf9f5;
  --surface-1: #fff;
  --surface-2: #f2f1ec;
  --surface-3: #eae8e1;
  --surface-4: #dddbd3;
  --text-primary: #141413;
  --text-secondary: #5c5b56;
  --text-tertiary: #9c9a91;
  --border-color: #1414131a;
  --border-subtle: #1414130d;
  --risk-safe: #788c5d;
  --risk-warn: #c4912e;
  --risk-danger: #c05a3c;
  --sidebar-w: 252px;
  --header-h: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font-heading: "Poppins", Arial, "PingFang SC", sans-serif;
  --font-body: "Lora", Georgia, "Noto Serif SC", serif;
  --shadow-sm: 0 1px 3px #0000000f;
  --shadow-md: 0 4px 12px #00000012;
  --shadow-lg: 0 12px 32px #00000014;
  --hover-overlay: #1414130a;
  --active-orange-bg: #d9775714;
  --badge-submitted-bg: #eae8e1;
  --badge-submitted-color: #5c5b56;
  --badge-doc-review-bg: #6a9bcc1f;
  --badge-doc-review-color: #4a7ba6;
  --badge-audit-bg: #d977571a;
  --badge-audit-color: #b4613e;
  --badge-cert-bg: #788c5d1f;
  --badge-cert-color: #5f7340;
  --badge-halal-bg: #788c5d1f;
  --badge-halal-color: #5f7340;
  --badge-haram-bg: #d977571a;
  --badge-haram-color: #b4613e;
  --badge-mashbooh-bg: #d9a7571a;
  --badge-mashbooh-color: #9e7a2a;
  --badge-unknown-bg: #eae8e1;
  --badge-unknown-color: #9c9a91;
  --header-bg: #faf9f5e0;
  --stat-icon-bg: #f2f1ec;
}

[data-theme="dark"] {
  --surface-0: #141413;
  --surface-1: #1a1a19;
  --surface-2: #222221;
  --surface-3: #2c2c2a;
  --surface-4: #383835;
  --text-primary: #faf9f5;
  --text-secondary: #b0aea5;
  --text-tertiary: #6e6d66;
  --border-color: #faf9f514;
  --border-subtle: #faf9f50a;
  --risk-safe: #788c5d;
  --risk-warn: #d9a757;
  --risk-danger: #d97757;
  --shadow-sm: 0 1px 2px #00000059;
  --shadow-md: 0 4px 12px #0006;
  --shadow-lg: 0 12px 32px #00000073;
  --hover-overlay: #faf9f50a;
  --active-orange-bg: #d9775714;
  --badge-submitted-bg: var(--surface-3);
  --badge-submitted-color: var(--text-secondary);
  --badge-doc-review-bg: #6a9bcc1a;
  --badge-doc-review-color: var(--brand-blue);
  --badge-audit-bg: #d977571a;
  --badge-audit-color: var(--brand-orange);
  --badge-cert-bg: #788c5d1f;
  --badge-cert-color: #a3b584;
  --badge-halal-bg: #788c5d1f;
  --badge-halal-color: #a3b584;
  --badge-haram-bg: #d977571a;
  --badge-haram-color: #e8a08a;
  --badge-mashbooh-bg: #d9a7571a;
  --badge-mashbooh-color: #e0c484;
  --badge-unknown-bg: var(--surface-3);
  --badge-unknown-color: var(--text-tertiary);
  --header-bg: #141413e0;
  --stat-icon-bg: var(--surface-3);
}

*, :before, :after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--surface-0);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background .25s, color .25s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  letter-spacing: -.01em;
  font-weight: 600;
  line-height: 1.25;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  color: var(--text-secondary);
}

a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: color .15s;
}

a:hover {
  color: #e08a6e;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-container > * {
  animation: .4s both fadeUp;
}

.page-container > :first-child {
  animation-delay: 0s;
}

.page-container > :nth-child(2) {
  animation-delay: 60ms;
}

.page-container > :nth-child(3) {
  animation-delay: .12s;
}

.page-container > :nth-child(4) {
  animation-delay: .18s;
}

.page-container > :nth-child(5) {
  animation-delay: .24s;
}

.login-page {
  background: var(--surface-0);
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  display: flex;
}

.login-card {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  padding: 44px 36px;
  animation: .5s both fadeUp;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo h1 {
  color: var(--text-primary);
  letter-spacing: .02em;
  margin-bottom: 4px;
  font-size: 2.4rem;
  font-weight: 800;
}

.login-logo p {
  color: var(--text-tertiary);
  font-size: .85rem;
  font-family: var(--font-body);
}

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

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface-1);
  border-right: 1px solid var(--border-color);
  z-index: 100;
  flex-direction: column;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
}

.sidebar-header {
  border-bottom: 1px solid var(--border-color);
  min-height: var(--header-h);
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  display: flex;
}

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

.sidebar-brand-icon {
  background: var(--brand-orange);
  border-radius: var(--radius-sm);
  width: 34px;
  height: 34px;
  color: var(--brand-dark);
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
}

.sidebar-brand-text {
  font-size: .9rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-brand-text span {
  font-size: .6rem;
  font-weight: 400;
  font-family: var(--font-body);
  color: var(--text-tertiary);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-top: 1px;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
}

.sidebar-section-title {
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-tertiary);
  font-size: .58rem;
  font-weight: 600;
  font-family: var(--font-heading);
  margin-top: 6px;
  padding: 10px 12px 5px;
}

.sidebar-link {
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  align-items: center;
  gap: 10px;
  margin-bottom: 1px;
  padding: 9px 12px;
  font-size: .84rem;
  font-weight: 400;
  text-decoration: none;
  transition: background .15s, color .15s;
  display: flex;
  position: relative;
}

.sidebar-link:hover {
  background: var(--hover-overlay);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--active-orange-bg);
  color: var(--brand-orange);
  font-weight: 500;
}

.sidebar-link.active:before {
  content: "";
  background: var(--brand-orange);
  border-radius: 0 3px 3px 0;
  width: 3px;
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
}

.sidebar-link .icon {
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 18px;
  display: inline-flex;
}

.sidebar-link .badge {
  background: var(--brand-orange);
  color: var(--brand-dark);
  font-size: .6rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: 8px;
  margin-left: auto;
  padding: 2px 7px;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding: 14px;
}

.sidebar-user {
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  gap: 10px;
  padding: 8px;
  transition: background .15s;
  display: flex;
}

.sidebar-user:hover {
  background: var(--hover-overlay);
}

.sidebar-user-avatar {
  background: var(--brand-orange);
  width: 34px;
  height: 34px;
  color: var(--brand-dark);
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  display: flex;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--font-heading);
  overflow: hidden;
}

.sidebar-user-role {
  color: var(--text-tertiary);
  font-size: .7rem;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

.main-header {
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 50;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  display: flex;
  position: sticky;
  top: 0;
}

.main-header-left {
  align-items: center;
  gap: 14px;
  display: flex;
}

.main-header-right {
  align-items: center;
  gap: 10px;
  display: flex;
}

.page-container {
  max-width: 1400px;
  padding: 28px 32px;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  font-family: var(--font-heading);
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  display: flex;
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s;
}

.card:hover {
  border-color: #d9775733;
}

.card-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  display: flex;
}

.card-title {
  font-size: .68rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
  display: grid;
}

.stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  align-items: center;
  gap: 14px;
  padding: 20px;
  transition: border-color .2s, transform .2s;
  display: flex;
  position: relative;
}

.stat-card:hover {
  border-color: var(--brand-orange);
  transform: translateY(-2px);
}

.stat-card:before {
  content: "";
  background: var(--surface-4);
  border-radius: 3px 0 0 3px;
  width: 3px;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.stat-card.green:before {
  background: var(--brand-green);
}

.stat-card.gold:before {
  background: var(--brand-orange);
}

.stat-card.blue:before {
  background: var(--brand-blue);
}

.stat-card.red:before {
  background: var(--risk-danger);
}

.stat-card.purple:before {
  background: var(--brand-blue);
}

.stat-icon {
  border-radius: var(--radius-sm);
  background: var(--stat-icon-bg);
  width: 42px;
  height: 42px;
  color: var(--text-secondary);
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  display: flex;
}

.stat-icon.green {
  color: var(--brand-green);
}

.stat-icon.gold {
  color: var(--brand-orange);
}

.stat-icon.blue {
  color: var(--brand-blue);
}

.stat-icon.red {
  color: var(--risk-danger);
}

.stat-icon.purple {
  color: var(--brand-blue);
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: .68rem;
  font-weight: 500;
  font-family: var(--font-heading);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 2.1rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-primary);
  letter-spacing: -.02em;
  line-height: 1;
}

.stat-trend {
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  font-size: .7rem;
  display: flex;
}

.stat-trend.up {
  color: var(--brand-green);
}

.stat-trend.down {
  color: var(--risk-danger);
}

.workflow-steps {
  align-items: flex-start;
  padding: 20px 0;
  display: flex;
  overflow-x: auto;
}

.workflow-step {
  text-align: center;
  flex-direction: column;
  flex: 1;
  align-items: center;
  min-width: 90px;
  display: flex;
  position: relative;
}

.workflow-step:after {
  content: "";
  background: var(--surface-4);
  z-index: 0;
  width: 100%;
  height: 2px;
  position: absolute;
  top: 16px;
  left: 50%;
}

.workflow-step:last-child:after {
  display: none;
}

.workflow-step.completed:after {
  background: var(--brand-green);
}

.workflow-step-circle {
  width: 32px;
  height: 32px;
  font-size: .72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-tertiary);
  background: var(--surface-3);
  border: 2px solid var(--surface-4);
  z-index: 1;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  transition: all .2s;
  display: flex;
  position: relative;
}

.workflow-step.completed .workflow-step-circle {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--brand-dark);
}

.workflow-step.active .workflow-step-circle {
  background: var(--surface-2);
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  box-shadow: 0 0 0 3px #d9775726;
}

.workflow-step-label {
  font-size: .62rem;
  font-weight: 500;
  font-family: var(--font-heading);
  color: var(--text-tertiary);
  max-width: 74px;
  margin-top: 7px;
  line-height: 1.3;
}

.workflow-step.completed .workflow-step-label, .workflow-step.active .workflow-step-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.btn {
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border: none;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  text-decoration: none;
  transition: all .15s;
  display: inline-flex;
}

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-orange);
  color: var(--brand-dark);
}

.btn-primary:hover:not(:disabled) {
  background: #e08a6e;
}

.btn-cta {
  background: var(--brand-orange);
  color: var(--brand-dark);
  border-radius: var(--radius);
  padding: 12px 28px;
  font-size: .88rem;
  font-weight: 700;
  box-shadow: 0 2px 12px #d9775733;
}

.btn-cta:hover:not(:disabled) {
  background: #e08a6e;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px #d977574d;
}

.btn-secondary {
  background: var(--surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-4);
  color: var(--text-primary);
}

.btn-accent {
  background: var(--brand-blue);
  color: var(--brand-dark);
}

.btn-accent:hover:not(:disabled) {
  background: #7dadd4;
}

.btn-danger {
  background: var(--risk-danger);
  color: var(--brand-dark);
}

.btn-danger:hover:not(:disabled) {
  background: #e08a6e;
}

.btn-ghost {
  color: var(--text-secondary);
  background: none;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--hover-overlay);
  color: var(--text-primary);
}

.btn-sm {
  padding: 5px 12px;
  font-size: .76rem;
}

.btn-lg {
  padding: 13px 26px;
  font-size: .92rem;
}

.btn-icon {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 5px;
  display: block;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  font-size: .88rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  padding: 10px 14px;
  transition: border-color .15s, box-shadow .15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 2px #d977571f;
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.form-error {
  color: var(--risk-danger);
  margin-top: 3px;
  font-size: .78rem;
}

.form-hint {
  color: var(--text-tertiary);
  margin-top: 3px;
  font-size: .78rem;
}

.table-container {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-1);
  overflow-x: auto;
}

.table {
  border-collapse: collapse;
  width: 100%;
}

.table th {
  font-size: .62rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-tertiary);
  background: var(--surface-2);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  padding: 10px 14px;
}

.table td {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 11px 14px;
  font-size: .88rem;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--hover-overlay);
}

.badge {
  white-space: nowrap;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-size: .62rem;
  font-weight: 600;
  font-family: var(--font-heading);
  border-radius: 4px;
  align-items: center;
  padding: 2px 8px;
  display: inline-flex;
}

.badge-submitted {
  background: var(--badge-submitted-bg);
  color: var(--badge-submitted-color);
}

.badge-doc-review, .badge-contract {
  background: var(--badge-doc-review-bg);
  color: var(--badge-doc-review-color);
}

.badge-onsite-audit, .badge-audit-report {
  background: var(--badge-audit-bg);
  color: var(--badge-audit-color);
}

.badge-fatwa {
  background: var(--badge-submitted-bg);
  color: var(--badge-submitted-color);
}

.badge-cert-issued {
  background: var(--badge-cert-bg);
  color: var(--badge-cert-color);
}

.badge-monitoring {
  background: var(--badge-submitted-bg);
  color: var(--badge-unknown-color);
}

.badge-halal {
  background: var(--badge-halal-bg);
  color: var(--badge-halal-color);
}

.badge-haram {
  background: var(--badge-haram-bg);
  color: var(--badge-haram-color);
}

.badge-mashbooh {
  background: var(--badge-mashbooh-bg);
  color: var(--badge-mashbooh-color);
}

.badge-unknown {
  background: var(--badge-unknown-bg);
  color: var(--badge-unknown-color);
}

.badge-risk-low {
  background: var(--badge-halal-bg);
  color: var(--badge-halal-color);
}

.badge-risk-medium {
  background: var(--badge-mashbooh-bg);
  color: var(--badge-mashbooh-color);
}

.badge-risk-high {
  background: var(--badge-haram-bg);
  color: var(--badge-haram-color);
}

.lang-switcher {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  align-items: center;
  gap: 1px;
  padding: 2px;
  display: flex;
}

.lang-btn {
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: .7rem;
  font-weight: 600;
  font-family: var(--font-heading);
  background: none;
  border: none;
  border-radius: 4px;
  padding: 3px 10px;
  transition: all .15s;
}

.lang-btn.active {
  background: var(--brand-orange);
  color: var(--brand-dark);
}

.lang-btn:hover:not(.active) {
  color: var(--text-secondary);
}

.notification-bell {
  width: 34px;
  height: 34px;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  transition: color .15s;
  display: flex;
  position: relative;
}

.notification-bell:hover {
  color: var(--brand-orange);
}

.notification-bell .dot {
  background: var(--brand-orange);
  border: 2px solid var(--surface-1);
  border-radius: 50%;
  width: 7px;
  height: 7px;
  position: absolute;
  top: 5px;
  right: 5px;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  transition: color .15s, background .15s;
  display: flex;
}

.theme-toggle:hover {
  color: var(--brand-orange);
  background: var(--hover-overlay);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-state-icon {
  opacity: .35;
  margin-bottom: 14px;
  font-size: 2.5rem;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state-desc {
  color: var(--text-tertiary);
  margin-bottom: 20px;
  font-size: .88rem;
}

.modal-overlay {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1000;
  background: #0000008c;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: .15s fadeIn;
  display: flex;
  position: fixed;
  inset: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  animation: .25s modalUp;
  overflow-y: auto;
}

@keyframes modalUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  display: flex;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.modal-close {
  width: 30px;
  height: 30px;
  color: var(--text-tertiary);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  transition: color .15s;
  display: flex;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 22px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  display: flex;
}

.menu-toggle {
  width: 34px;
  height: 34px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  display: none;
}

@media (max-width: 1024px) {
  .page-container > div[style*="gridTemplateColumns: 1fr 1fr"], .page-container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .sidebar {
    z-index: 200;
    box-shadow: var(--shadow-lg);
    transition: transform .25s;
    position: fixed;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    z-index: 199;
    background: #0006;
    display: block;
    position: fixed;
    inset: 0;
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .page-container {
    padding: 16px 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .page-title {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start !important;
  }

  .table-container {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .table-container table {
    min-width: 600px;
  }

  .main-header {
    padding: 10px 14px;
  }

  .main-header-left {
    flex: 1;
    min-width: 0;
  }

  .lang-switcher .lang-btn {
    padding: 4px 8px;
    font-size: .7rem;
  }

  .modal {
    width: 95vw;
    max-width: 95vw;
    max-height: 90vh;
    margin: 20px auto;
  }

  .modal-body {
    max-height: 65vh;
    overflow-y: auto;
  }

  .modal-body div[style*="gridTemplateColumns"], .modal-body div[style*="grid-template-columns"], .card-grid, div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .filter-tabs, div[style*="flexWrap: wrap"] {
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    margin: 14px;
    padding: 28px 22px;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .btn {
    padding: 8px 14px;
    font-size: .82rem;
  }

  .main-header-right {
    gap: 6px;
  }
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-20 {
  gap: 20px;
}

.gap-24 {
  gap: 24px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.text-center {
  text-align: center;
}

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

.truncate {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  position: absolute;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: none;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

::selection {
  color: var(--text-primary);
  background: #d9775740;
}

@keyframes skeletonPulse {
  0% {
    opacity: .45;
  }

  50% {
    opacity: .2;
  }

  100% {
    opacity: .45;
  }
}

.skeleton {
  background: var(--surface-3);
  animation: 1.6s ease-in-out infinite skeletonPulse;
}

.toast-container {
  z-index: 10000;
  pointer-events: none;
  flex-direction: column;
  gap: 10px;
  display: flex;
  position: fixed;
  top: 20px;
  right: 20px;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.toast {
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  min-width: 280px;
  max-width: 420px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  pointer-events: auto;
  border: 1px solid var(--border-color);
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: .85rem;
  font-weight: 500;
  animation: .35s toastSlideIn;
  display: flex;
}

.toast-icon {
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 22px;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-success {
  color: var(--brand-green);
  background: #788c5d1f;
  border-color: #788c5d33;
}

.toast-success .toast-icon {
  background: var(--brand-green);
  color: #fff;
}

.toast-error {
  color: var(--brand-orange);
  background: #d977571a;
  border-color: #d9775733;
}

.toast-error .toast-icon {
  background: var(--risk-danger);
  color: #fff;
}

.toast-info {
  color: var(--brand-blue);
  background: #6a9bcc1a;
  border-color: #6a9bcc33;
}

.toast-info .toast-icon {
  background: var(--brand-blue);
  color: #fff;
}

[data-theme="dark"] .skeleton {
  background: var(--surface-4);
}

[data-theme="dark"] .toast-success {
  color: #a3b584;
  background: #788c5d26;
}

[data-theme="dark"] .toast-error {
  color: #e8a08a;
  background: #d977571f;
}

[data-theme="dark"] .toast-info {
  color: #8fb8dc;
  background: #6a9bcc1f;
}

[data-theme="dark"] .form-input:focus, [data-theme="dark"] .form-select:focus, [data-theme="dark"] .form-textarea:focus {
  box-shadow: 0 0 0 2px #d9775740;
}

[data-theme="dark"] .table tbody tr:nth-child(2n) {
  background: var(--surface-2);
}

[data-theme="dark"] .table tbody tr:hover {
  background: var(--surface-3);
}

[data-theme="dark"] .recharts-text {
  fill: var(--text-secondary) !important;
}

.pagination {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  display: flex;
}

.pagination-info {
  color: var(--text-tertiary);
  font-size: .8rem;
}

.pagination-controls {
  align-items: center;
  gap: 4px;
  display: flex;
}

.pagination-btn {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  min-width: 34px;
  height: 34px;
  color: var(--text-secondary);
  cursor: pointer;
  justify-content: center;
  align-items: center;
  padding: 0 8px;
  font-size: .82rem;
  transition: all .15s;
  display: flex;
}

.pagination-btn:hover:not(:disabled):not(.active) {
  background: var(--surface-2);
  border-color: var(--text-tertiary);
}

.pagination-btn.active {
  background: var(--brand-orange);
  color: #fff;
  border-color: var(--brand-orange);
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--text-tertiary);
  padding: 0 4px;
  font-size: .85rem;
}

.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  padding: 32px 24px;
  transition: border-color .2s, background .2s;
}

.dropzone:hover {
  border-color: var(--brand-orange);
  background: color-mix(in srgb, var(--brand-orange) 4%, var(--surface-2));
}

.dropzone.drag-over {
  border-color: var(--brand-orange);
  background: color-mix(in srgb, var(--brand-orange) 8%, var(--surface-2));
}

.dropzone-icon {
  color: var(--text-tertiary);
  margin-bottom: 8px;
  transition: color .2s;
}

.dropzone:hover .dropzone-icon, .dropzone.drag-over .dropzone-icon {
  color: var(--brand-orange);
}

.dropzone-text {
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
}

.dropzone-hint {
  color: var(--text-tertiary);
  margin-top: 4px;
  font-size: .75rem;
}

.file-queue {
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  display: flex;
}

.file-queue-item {
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--surface-1);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: .8125rem;
  transition: border-color .2s;
  display: flex;
}

.file-queue-item.uploading {
  border-color: var(--brand-orange);
  opacity: .8;
}

.file-queue-item.success {
  border-color: #22c55e;
}

.file-queue-item.error {
  border-color: #ef4444;
}

.file-queue-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  color: var(--text-primary);
  flex: 1;
  font-weight: 500;
  overflow: hidden;
}

.file-queue-size {
  color: var(--text-tertiary);
  white-space: nowrap;
  font-size: .75rem;
}

.file-queue-type {
  min-width: 120px;
}

.file-queue-type select {
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  width: 100%;
  color: var(--text-primary);
  padding: 3px 6px;
  font-size: .75rem;
}

.file-queue-status {
  white-space: nowrap;
  text-align: center;
  min-width: 56px;
  font-size: .75rem;
}

.file-queue-status.pending {
  color: var(--text-tertiary);
}

.file-queue-status.uploading {
  color: var(--brand-orange);
}

.file-queue-status.success {
  color: #22c55e;
}

.file-queue-status.error {
  color: #ef4444;
}

.file-queue-remove {
  cursor: pointer;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-radius: 4px;
  align-items: center;
  padding: 2px;
  transition: color .15s, background .15s;
  display: flex;
}

.file-queue-remove:hover {
  color: #ef4444;
  background: #ef444414;
}

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

.confirm-overlay {
  z-index: 1000;
  background: #00000073;
  justify-content: center;
  align-items: center;
  animation: .15s fadeIn;
  display: flex;
  position: fixed;
  inset: 0;
}

.confirm-dialog {
  background: var(--surface-1);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 380px;
  box-shadow: var(--shadow-lg, 0 8px 32px #0000002e);
  padding: 24px;
}

.confirm-dialog-title {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: .9375rem;
  font-weight: 600;
}

.confirm-dialog-message {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: .8125rem;
  line-height: 1.5;
}

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

.btn-delete-doc {
  color: var(--text-tertiary);
  transition: color .15s, background .15s;
}

.btn-delete-doc:hover {
  color: #ef4444;
  background: #ef444414;
}

/*# sourceMappingURL=src_app_globals_91e4631d.css.map*/