:root {
  --osc-bg-1: #0c2436;
  --osc-bg-2: #163a4d;
  --osc-bg-3: #0a1b28;
  --osc-accent: #2bb0a6;
  --osc-accent-2: #3ccfc3;
  --osc-accent-dark: #1f8f87;
  --osc-panel: rgba(255, 255, 255, 0.96);
  --osc-panel-border: rgba(255, 255, 255, 0.55);
  --osc-text: #132833;
  --osc-muted: #5d7380;
  --osc-line: rgba(19, 40, 51, 0.08);
  --osc-shadow: 0 20px 48px rgba(4, 18, 28, 0.28);
  --osc-radius: 1.1rem;
  --osc-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  height: 100%;
}

.osc-body {
  margin: 0;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  color: var(--osc-text);
  background:
    radial-gradient(ellipse 80% 55% at 85% 8%, rgba(43, 176, 166, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 40% at 8% 90%, rgba(28, 110, 140, 0.22), transparent 50%),
    linear-gradient(155deg, var(--osc-bg-1), var(--osc-bg-2) 48%, var(--osc-bg-3));
  min-height: 100vh;
  background-attachment: fixed;
}

.osc-hero {
  color: #f5fffd;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.osc-hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -20% 40%;
  height: 70%;
  background:
    radial-gradient(circle at 30% 40%, rgba(43, 176, 166, 0.35), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(90, 180, 210, 0.2), transparent 50%);
  pointer-events: none;
  animation: osc-drift 14s var(--osc-ease) infinite alternate;
}

@keyframes osc-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, -2%, 0) scale(1.05); }
}

.osc-hero .container {
  position: relative;
  z-index: 1;
  opacity: 1;
  animation: osc-rise 0.7s var(--osc-ease) both;
}

@keyframes osc-rise {
  from { opacity: 0.01; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.osc-brand {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--osc-accent);
  margin: 0;
}

.osc-hero .osc-brand {
  color: var(--osc-accent-2);
  text-shadow: 0 0 28px rgba(43, 176, 166, 0.35);
}

.osc-hero-title {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0.6rem 0 0.85rem;
  max-width: 16ch;
}

.osc-hero-lead {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.osc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.osc-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  font-size: 0.92rem;
  opacity: 0.85;
}

.osc-hero-links a {
  color: #dff9f5;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.osc-hero-links a:hover {
  border-bottom-color: rgba(223, 249, 245, 0.7);
  opacity: 1;
}

.osc-panel {
  background: var(--osc-panel);
  border: 1px solid var(--osc-panel-border);
  border-radius: var(--osc-radius);
  box-shadow: var(--osc-shadow);
  backdrop-filter: blur(8px);
  animation: osc-rise 0.55s var(--osc-ease) both;
}

.osc-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.osc-page-head h1 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.osc-page-sub {
  color: var(--osc-muted);
  font-size: 0.9rem;
  margin: 0;
}

.btn-primary {
  background-color: var(--osc-accent);
  border-color: var(--osc-accent);
  font-weight: 600;
  transition: transform 0.18s var(--osc-ease), background-color 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary:hover {
  background-color: var(--osc-accent-dark);
  border-color: var(--osc-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(43, 176, 166, 0.28);
}

.btn-outline-light {
  border-width: 1.5px;
  font-weight: 600;
}

.btn-outline-primary {
  color: var(--osc-accent-dark);
  border-color: rgba(43, 176, 166, 0.55);
  font-weight: 600;
}

.btn-outline-primary:hover {
  background: rgba(43, 176, 166, 0.12);
  color: var(--osc-accent-dark);
  border-color: var(--osc-accent);
}

.form-control, .form-select {
  border-radius: 0.7rem;
  border-color: rgba(19, 40, 51, 0.14);
  padding: 0.6rem 0.85rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--osc-accent);
  box-shadow: 0 0 0 0.2rem rgba(43, 176, 166, 0.18);
}

.table {
  --bs-table-bg: transparent;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
}

.table thead th {
  font-size: 0.82rem;
  color: var(--osc-muted);
  font-weight: 600;
  border-bottom-width: 1px;
}

/* Admin / dashboard tiles */
.osc-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

/* ========== Landing (Default.aspx) ========== */
.osc-landing {
  background:
    radial-gradient(ellipse 90% 60% at 12% 18%, rgba(60, 207, 195, 0.22), transparent 58%),
    radial-gradient(ellipse 70% 50% at 92% 78%, rgba(24, 96, 120, 0.35), transparent 55%),
    linear-gradient(165deg, #071820 0%, #0d2a3a 42%, #0a1f2c 100%);
}

.osc-landing-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f3fffc;
  isolation: isolate;
}

.osc-landing-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.osc-landing-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.osc-landing-glow-a {
  width: min(70vw, 720px);
  height: min(70vw, 720px);
  top: -18%;
  left: -12%;
  background: radial-gradient(circle, rgba(43, 176, 166, 0.45) 0%, transparent 68%);
  animation: osc-landing-breathe 10s var(--osc-ease) infinite alternate;
}

.osc-landing-glow-b {
  width: min(55vw, 560px);
  height: min(55vw, 560px);
  bottom: -20%;
  right: -8%;
  background: radial-gradient(circle, rgba(90, 170, 200, 0.32) 0%, transparent 70%);
  animation: osc-landing-breathe 12s var(--osc-ease) infinite alternate-reverse;
}

.osc-landing-mesh {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 40%, #000 20%, transparent 75%);
}

.osc-landing-orbit {
  position: absolute;
  inset: 12% 8% 18% 8%;
}

.osc-landing-bubble {
  position: absolute;
  display: block;
  border-radius: 1.25rem 1.25rem 1.25rem 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  animation: osc-landing-float 9s var(--osc-ease) infinite;
}

.osc-landing-bubble-1 {
  width: min(38vw, 280px);
  height: 72px;
  top: 18%;
  left: 8%;
  animation-delay: 0s;
}

.osc-landing-bubble-2 {
  width: min(28vw, 200px);
  height: 56px;
  top: 38%;
  right: 12%;
  border-radius: 1.25rem 1.25rem 0.35rem 1.25rem;
  animation-delay: 1.2s;
}

.osc-landing-bubble-3 {
  width: min(32vw, 240px);
  height: 64px;
  bottom: 22%;
  left: 22%;
  animation-delay: 2.1s;
}

.osc-landing-copy {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, 720px);
  margin: 0 auto 0;
  padding: clamp(5rem, 14vh, 8rem) 1.25rem clamp(3.5rem, 10vh, 5.5rem);
  animation: osc-landing-rise 0.85s var(--osc-ease) both;
}

.osc-landing-brand {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 6.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #5fe3d6;
}

.osc-landing-title {
  margin: 0 0 1rem;
  max-width: 11ch;
  font-size: clamp(1.65rem, 4.4vw, 2.55rem);
  font-weight: 700;
  line-height: 1.3;
  color: #f7fffd;
}

.osc-landing-lead {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.75;
  color: rgba(232, 252, 248, 0.82);
}

.osc-landing-actions-triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: min(100%, 40rem);
}

.osc-landing-actions-triple .osc-landing-cta {
  width: 100%;
  text-align: center;
}

.osc-landing-role-list {
  margin: 0 0 1.25rem;
  padding: 0 1.1rem 0 0;
  color: var(--osc-muted);
  line-height: 1.8;
}

.osc-landing-role-list strong {
  color: var(--osc-text);
}

@media (max-width: 640px) {
  .osc-landing-actions-triple {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

.osc-landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  border-radius: 0.65rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s var(--osc-ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.osc-landing-cta-primary {
  background: #2bb0a6;
  color: #062029;
  border: 1px solid #2bb0a6;
}

.osc-landing-cta-primary:hover {
  background: #3ccfc3;
  border-color: #3ccfc3;
  color: #042028;
  transform: translateY(-2px);
}

.osc-landing-cta-ghost {
  background: transparent;
  color: #e8fcf8;
  border: 1.5px solid rgba(232, 252, 248, 0.45);
}

.osc-landing-cta-ghost:hover {
  border-color: #e8fcf8;
  color: #fff;
  transform: translateY(-2px);
}

.osc-landing-access {
  position: relative;
  z-index: 1;
  padding: 3.5rem 1.25rem 4.5rem;
  background: linear-gradient(180deg, rgba(7, 24, 32, 0.2), rgba(245, 251, 250, 0.97) 28%);
  color: var(--osc-text);
}

.osc-landing-access-inner {
  width: min(100%, 720px);
  margin: 0 auto;
  animation: osc-landing-rise 0.7s var(--osc-ease) 0.15s both;
}

.osc-landing-access-title {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.osc-landing-access-lead {
  margin: 0 0 1.35rem;
  color: var(--osc-muted);
  font-size: 0.98rem;
  max-width: 34ch;
}

.osc-landing-access-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
}

.osc-landing-access-nav a {
  color: #1a5c58;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 92, 88, 0.25);
  padding-bottom: 0.1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.osc-landing-access-nav a:hover {
  color: #0f8a7e;
  border-bottom-color: #0f8a7e;
}

@keyframes osc-landing-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes osc-landing-breathe {
  from { transform: scale(1) translate(0, 0); opacity: 0.85; }
  to { transform: scale(1.08) translate(2%, -1%); opacity: 1; }
}

@keyframes osc-landing-float {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(-12px); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .osc-landing-copy,
  .osc-landing-access-inner,
  .osc-landing-glow,
  .osc-landing-bubble {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .osc-landing-copy {
    padding-top: 4.5rem;
  }

  .osc-landing-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .osc-landing-cta {
    width: 100%;
  }

  .osc-landing-bubble-1,
  .osc-landing-bubble-2,
  .osc-landing-bubble-3 {
    opacity: 0.45;
  }
}

.osc-nav-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 108px;
  padding: 1rem 1.05rem;
  border-radius: 0.9rem;
  text-decoration: none;
  color: var(--osc-text);
  background: linear-gradient(160deg, #fff, #f3fbfa);
  border: 1px solid var(--osc-line);
  transition: transform 0.2s var(--osc-ease), box-shadow 0.2s ease, border-color 0.2s ease;
}

.osc-nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(15, 42, 61, 0.12);
  border-color: rgba(43, 176, 166, 0.45);
  color: var(--osc-text);
}

.osc-nav-card .osc-nav-title {
  font-weight: 700;
  font-size: 0.98rem;
}

.osc-nav-card .osc-nav-desc {
  font-size: 0.78rem;
  color: var(--osc-muted);
  margin-top: 0.35rem;
}

.osc-nav-card.is-primary {
  background: linear-gradient(145deg, rgba(43, 176, 166, 0.18), #fff 55%);
}

.osc-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
}

.osc-stat-card {
  border: 1px solid var(--osc-line);
  border-radius: 0.85rem;
  padding: 0.85rem 0.95rem;
  background: #fff;
}

.osc-stat-card .label {
  font-size: 0.78rem;
  color: var(--osc-muted);
  margin-bottom: 0.25rem;
}

.osc-stat-card .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--osc-text);
}

/* Chat */
.osc-chat-shell {
  max-width: 880px;
}

.osc-chat-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--osc-line);
}

.osc-chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.osc-chat-list {
  height: min(52vh, 460px);
  overflow-y: auto;
  padding: 0.9rem;
  background:
    linear-gradient(180deg, rgba(15, 42, 61, 0.03), rgba(43, 176, 166, 0.05));
  border-radius: 0.9rem;
  border: 1px solid var(--osc-line);
  scroll-behavior: smooth;
}

.osc-msg {
  max-width: min(85%, 420px);
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid rgba(19, 40, 51, 0.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  animation: osc-rise 0.28s var(--osc-ease) both;
}

.osc-msg-mine {
  margin-right: auto;
  margin-left: 0;
  background: linear-gradient(160deg, rgba(43, 176, 166, 0.2), rgba(43, 176, 166, 0.1));
  border-color: rgba(43, 176, 166, 0.22);
}

.osc-msg-peer {
  margin-left: auto;
  margin-right: 0;
}

.osc-msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.74rem;
  color: var(--osc-muted);
  margin-bottom: 0.28rem;
}

.osc-msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.osc-msg-status {
  font-size: 0.68rem;
  color: #6a7c86;
  margin-top: 0.25rem;
  text-align: left;
}

.osc-presence {
  font-size: 0.78rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.osc-presence.osc-online {
  color: #0b6b4f;
  background: rgba(43, 176, 166, 0.18);
  border-color: rgba(43, 176, 166, 0.35);
}

.osc-presence.osc-offline {
  color: #6a7c86;
  background: rgba(106, 124, 134, 0.12);
  border-color: rgba(106, 124, 134, 0.2);
}

.osc-chat-compose {
  margin-top: 0.35rem;
}

.osc-compose-bar {
  display: flex;
  gap: 0.45rem;
  align-items: stretch;
}

.osc-compose-bar .form-control {
  flex: 1;
  min-height: 3rem;
}

.osc-compose-tools {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.osc-chat-compose textarea {
  resize: none;
}

.osc-att {
  margin-top: 0.45rem;
}

.osc-att-image {
  max-width: 100%;
  max-height: 240px;
  border-radius: 0.55rem;
  display: block;
}

.osc-att-video {
  max-width: 100%;
  max-height: 260px;
  border-radius: 0.55rem;
  display: block;
  background: #000;
}

.osc-att-audio {
  width: 100%;
  max-width: 320px;
}

.osc-att-file {
  font-weight: 600;
  color: #1a4a5c;
  text-decoration: none;
}

.osc-att-file:hover {
  text-decoration: underline;
  color: #2bb0a6;
}

.osc-att-meta {
  font-size: 0.72rem;
  color: #6a7c86;
  margin-top: 0.2rem;
}

.osc-recording {
  background: #c0392b !important;
  border-color: #c0392b !important;
  color: #fff !important;
}

.osc-incoming {
  background: rgba(43, 176, 166, 0.12);
  border: 1px solid rgba(43, 176, 166, 0.35);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
}

.osc-call-overlay {
  background: linear-gradient(160deg, #0c1f2c, #143445);
  color: #f5fffd;
  border-radius: 0.9rem;
  padding: 0.85rem;
}

.osc-call-videos {
  position: relative;
  min-height: 200px;
  background: #07141c;
  border-radius: 0.6rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.osc-remote-video {
  width: 100%;
  max-height: 360px;
  background: #000;
  display: block;
}

.osc-remote-video.osc-audio-only {
  min-height: 120px;
  max-height: 120px;
  object-fit: cover;
}

.osc-local-video {
  position: absolute;
  width: 28%;
  max-width: 160px;
  bottom: 0.5rem;
  left: 0.5rem;
  border-radius: 0.45rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: #000;
}

@media (max-width: 576px) {
  .osc-compose-bar {
    flex-direction: column;
  }

  .osc-compose-tools {
    flex-direction: row;
  }

  .osc-chat-list {
    height: min(48vh, 380px);
  }

  .osc-nav-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.osc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.osc-modal {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  direction: rtl;
  font-family: Vazirmatn, Tahoma, sans-serif;
}

.osc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e8eef3;
  background: #f8fafc;
}

.osc-modal-title {
  font-size: 1rem;
  color: #0f172a;
}

.osc-modal-close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0 0.25rem;
}

.osc-modal-body {
  padding: 1rem 1.1rem;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.osc-modal-foot {
  padding: 0.75rem 1rem 1rem;
  display: flex;
  justify-content: flex-start;
}

.osc-setting-radios label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

body.osc-embed {
  background: #f4f7f8;
}

body.osc-embed .container {
  max-width: none !important;
  padding: 0.65rem !important;
}

body.osc-embed .osc-page-head a[href*="Default"],
body.osc-embed a[href*="Default.aspx"],
body.osc-embed a[href*="portal=admin"],
body.osc-embed a[href*="portal=responder"],
body.osc-embed a[href*="FirstRun"] {
  display: none !important;
}
