:root {
  --bg: #0f172a;
  --card: #111827;
  --border: #1f2933;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --danger: #ef4444;
  --success: #22c55e;
}

* {
  box-sizing: border-box;
}

.external-box {
  margin-top: 20px;
  float: right;
}

p {
  font-size: 16px;        
  color: #ffffff;
  margin-bottom: 14px;
  margin-left: 20px;
}

.license-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

#userId {
  margin-left: auto;
}

/* MODE badge */
#licenseStatus {
  margin: 0;
  order: -1;               
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #1e293b, #020617);
  color: #7dd3fc;
  border: 1px solid rgba(56,189,248,0.35);
  box-shadow:
    0 0 0 1px rgba(56,189,248,0.15),
    0 0 12px rgba(56,189,248,0.25);
  white-space: nowrap;
}


.license-row input,
.license-row button {
  width: auto;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

section {
  margin-left: 24px;
  margin-right: 24px;
  margin-top: 24px;
  margin-bottom: 24px;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: 24px;
  margin-bottom: 14px;
  margin-top: 24px;
}

label { 
  display: block; 
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.demo {
  background: #1e293b;
  color: var(--muted);
}

.badge.pro {
  background: var(--success);
  color: #022c22;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

button {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #020617;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow:
    0 0 0 rgba(56, 189, 248, 0.0);
}

button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 12px rgba(56, 189, 248, 0.6),
    0 0 24px rgba(99, 102, 241, 0.4);
}

button:active {
  transform: scale(0.97);
  box-shadow:
    0 0 8px rgba(56, 189, 248, 0.8);
}

button.danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #020617;
}

button.danger:hover {
  box-shadow:
    0 0 12px rgba(239, 68, 68, 0.6),
    0 0 24px rgba(249, 115, 22, 0.4);
}

button.primary {
  background: var(--accent);
  color: #fff9bb;
  border: none;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background:
    linear-gradient(180deg, #020617, #020617),
    linear-gradient(135deg, transparent 50%, var(--muted) 50%),
    linear-gradient(225deg, transparent 50%, var(--muted) 50%);
  background-repeat: no-repeat;
  background-size:
    100% 100%,
    6px 6px,
    6px 6px;
  background-position:
    0 0,
    calc(100% - 18px) 55%,
    calc(100% - 12px) 55%;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 42px 10px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.15s ease;
}

select:hover {
  border-color: var(--accent);
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

select option {
  background: #020617;
  color: var(--text);
}

input {
  background: linear-gradient(180deg, #020617, #020617);
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  width: 120px;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.15s ease;
}

input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

input:hover {
  border-color: #334155;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

input:focus-visible {
  transform: translateY(-1px);
}

input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.35);
}

input.success {
  border-color: var(--success);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

/* =================== Bar Chart Container – Dark Analytics Style ====================== */
.chart-box {
  position: relative;
  background:
    radial-gradient(
      circle at top left,
      rgba(56, 189, 248, 0.08),
      transparent 60%
    ),
    linear-gradient(180deg, #020617, #020617);

  border: 1px solid #1e293b;
  border-radius: 14px;

  padding: 14px 16px 16px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 8px 24px rgba(2, 6, 23, 0.8);

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover elevation (subtle, pro) */
.chart-box:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgb(255, 255, 255),
    0 14px 40px rgba(2, 6, 23, 0.95);
}

/* Chart title */
.chart-box h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #7dd3fc;
  margin-bottom: 10px;
}

/* Controls row (professional layout) */
.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}

.chart-box select {
  width: auto;
  min-width: 180px;
}

/* Scroll area under bars */
.chart-scroll {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.6),
    rgba(2, 6, 23, 0.6)
  );

  border-radius: 10px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Fade edges (gives depth to bar area) */
.chart-scroll::before,
.chart-scroll::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  pointer-events: none;
  z-index: 2;
}

.chart-scroll::before {
  top: 0;
  background: linear-gradient(180deg, #020617, transparent);
}

.chart-scroll::after {
  bottom: 0;
  background: linear-gradient(0deg, #020617, transparent);
}

/* Canvas styling */
.chart-box canvas {
  background: transparent;
  border-radius: 8px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}


.chart-scroll {
  height: 410px;    
  overflow: hidden;
}

/* =================== Pro Trading Table ====================== */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}

/* Header */
thead th {
  background: linear-gradient(180deg, #001677, #001885);
  color: #c7d3ff;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

/* Body cells */
tbody td {
  padding: 12px 10px;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}

/* Zebra rows (very subtle) */
tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.015);
}

/* Hover row */
tbody tr:hover {
  background: rgba(56,189,248,0.08);
  transition: background 0.2s ease;
}

/* First column (index) */
tbody td:first-child {
  color: #94a3b8;
  font-weight: 500;
}

/* Balance column emphasis */
tbody td:nth-child(7) {
  font-weight: 600;
  color: #e5e7eb;
}


tbody td:nth-child(8) {
  color: #e5e7eb;
}

/* Profit & Risk */
tbody td:nth-child(9) {
  color: #e5e7eb;
  font-weight: 600;
}

/* Result badges (text-based) */
tbody td:nth-child(10) {
  font-weight: 600;
}

/* Reason muted */
tbody td:nth-child(12) {
  color: var(--muted);
  font-size: 12px;
}

/* Action buttons */
td button {
  background: transparent;
  border: 1px solid var(--border);
  color: #c7d2fe;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

td button:hover {
  background: rgba(99,102,241,0.15);
  border-color: #6366f1;
  color: #ffffff;
}

/* Delete button */
td button:last-child:hover {
  background: rgba(239,68,68,0.2);
  border-color: #ef4444;
  color: #fff;
}

/* Mobile friendly */
@media (max-width: 900px) {
  table {
    font-size: 12px;
  }

  thead th {
    padding: 10px 8px;
  }

  tbody td {
    padding: 10px 8px;
  }
}

.trade-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

#addTrade {
  margin-left: auto;
}

/* ===== Center Alignment – Pro Table ===== */

table thead th,
table tbody td {
  text-align: center;
  vertical-align: middle;
}

/* Vertical & Horizontal Grid Lines */
thead th,
tbody td {
  border-right: 1px solid rgba(255,255,255,0.06);
}

thead th:last-child,
tbody td:last-child {
  border-right: none;
}

tbody tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

table {
  border: 1px solid rgba(56,189,248,0.35);
}

table thead th:last-child,
table tbody td:last-child {
  width: 120px;
  text-align: center;
}

tbody tr:nth-child(even) {
  background: rgba(56,189,248,0.035);
}

/* =================== Overall Performance – Distinct Pro Style ====================== */

.overall-table {
  max-width: 520px;
  margin-top: 10px;
}

.overall-table td:first-child {
  text-align: left;
  padding-left: 16px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c7d2fe;
}

.overall-table td:last-child {
  text-align: center;

  font-size: 13px;
  font-weight: 800;
  color: #e5e7eb;
}

.overall-table tr {
  height: 48px;
}

.overall-table tr:hover {
  background: rgba(56,189,248,0.06);
}

.balance-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.balance-row input {
  max-width: 220px;
}

.balance-actions {
  margin-left: auto;   
  display: flex;
  gap: 12px;
}

#tradesTable .td-reason {
  color: #e5e7eb;
  font-size: 13px;
}

/* =================== Modal ====================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;

  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-content {
  position: relative;
  background: #05001d;
  color: #ddd;
  width: 420px;
  max-width: 90%;
  border-radius: 8px;
  border: 1px solid #0b0062;
  padding: 16px;
  font-size: 13px;

  transform: scale(1);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.modal.hidden {
  display: none;
}

/* این را جایگزین کلاس hidden فعلی کن */
/*.modal.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}*/

.close-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  cursor: pointer;
}

.close-btn:hover {
  color: #fff;
}

/* ============ Modal Format =============== */


.modal-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  background: linear-gradient(
    135deg,
    #8fddff,
    #4f51ff
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin: 28px 0 6px 24px;
  text-align: center;
}

/* ====================================== */

.unlimit {
  font-size: 12px;
  color: #69a2ff;
}

hr {
  border: none;
  border-top: 1px solid #2ad4ff;
  margin: 12px 0;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-color: #000721;   
  
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ccc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;

  padding-right: 36px;

  color: #eee;
  border: 1px solid #595198;
  border-radius: 6px;
}


/*============================ CLOSE MODAL =====================*/
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
}


/*=============================== PANEL ===================================*/
/* ===============================   GRID LAYOUT================================= */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 30px;
}


/* ===============================   PANEL BOX STYLE  ================================= */

.panel-box {
  background:
    radial-gradient(circle at top left,
      rgba(56, 189, 248, 0.08),
      transparent 60%
    ),
    linear-gradient(180deg, #16053e, #110135);

  border: 1px solid #1e293b;
  border-radius: 16px;

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 10px 30px rgba(2, 6, 23, 0.7);

  padding: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel-box:hover {
  transform: translateY(-4px);
  box-shadow:
    0 14px 40px rgba(2, 6, 23, 0.9);
}


/* ===============================  PANEL TITLE  ================================= */

.panel-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  width: fit-content;
  margin: 0 auto 20px auto;
  background: linear-gradient(135deg, #e3e3ff, #5053ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ===============================  CONTROL PANEL GRID  ================================= */

.control-panel {
  display: grid;
  gap: 12px;
  width: 100%;
}

/* License → 3 in one row */
.license-panel {
  grid-template-columns: repeat(3, 1fr);
}

/* Control → 2 rows 3 columns */
.control-panel-extended {
  grid-template-columns: repeat(3, 1fr);
}


/* ===============================  BUTTON STYLE  ================================= */

.control-panel button {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;

  border-radius: 10px;
  border: 1px solid #334155;

  color: #cbd5e1;

  cursor: pointer;
  transition: all 0.2s ease;
}

.control-panel button:hover {
  background: #1a3357;
  transform: translateY(-2px);
}

.primary-btn {
  background: linear-gradient(135deg, #1596cd, #1518b6);
  border: none;
  color: white;
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.secondary-btn {
  background: linear-gradient(135deg,  #00064a, #0104b7);
  border: none;
  color: white;
}

.secondary-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

/* ===============================  RESPONSIVE (Mobile)  ================================= */

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

  .license-panel,
  .control-panel-extended {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .license-panel,
  .control-panel-extended {
    grid-template-columns: 1fr;
  }
}


/*========================== OVERALL PERFORMANCE =================================*/

.performance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.perf-item {
  position: relative;

  background:
    radial-gradient(circle at top left,
      rgba(56, 189, 248, 0.12),
      transparent 60%
    ),
    linear-gradient(145deg, #0f172a, #111c33);

  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;

  padding: 12px 16px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  transition: all 0.25s ease;
}


.perf-item:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
  transform: translateY(-2px);
}

.perf-item {
  background:
    radial-gradient(circle at top left,
      rgba(56, 123, 248, 0.451),
      transparent 55%
    ),
    linear-gradient(145deg, #0b1328, #1a2a4a);
}

.perf-item strong {
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================= TRADE ENTRY SECTION ================= */

.trade-entry-section {
  margin-top: 30px;
}

/* Control Bar زیر جدول */

.trade-control-bar {
  margin-top: 14px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 14px 18px;

  background: linear-gradient(145deg, #0f172a, #1a2747);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;

  box-shadow: 0 0 20px rgba(56, 189, 248, 0.08);
}

/* سمت چپ */

.left-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.left-controls label {
  font-size: 0.9rem;
  color: #94a3b8;
}

.left-controls input {
  width: 150px;
  padding: 8px 10px;

  background-color: #0b1328;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;

  color: #e2e8f0;
  outline: none;
  transition: all 0.2s ease;
}

.left-controls input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* سمت راست */

.right-controls .primary-btn {
  padding: 10px 18px;

  background: linear-gradient(90deg, #38bdf8, #6366f1);
  border: none;
  border-radius: 8px;

  color: white;
  font-weight: 600;
  cursor: pointer;

  transition: all 0.25s ease;
}

.right-controls .primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}

h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 20px;

  background: linear-gradient(135deg, #38bdf8, #38bdf8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h5 {
  font-size: 14px;        
  color: #ffffff;
}

h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 28px 0 6px 24px;
}

h6 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 28px 0 6px 24px;
}

.gradient-format1 {
  display: inline-block;
  background: linear-gradient(135deg, #59f9ff, #9c32ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(56,189,248,0.3));
}

.gradient-format2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  background: linear-gradient(135deg,#fefdff,#414141);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(56,189,248,0.3));
}

  /*======================== SECTION DEVIDER ======================================*/
.section-divider {
  position: relative;
  height: 1px;
  margin: 48px 24px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 189, 248, 0.6),
    rgba(99, 102, 241, 0.6),
    transparent
  );
}

.section-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  filter: blur(8px);
  opacity: 0.6;
}

/* ============================== TABLE WITH SCROLL =============================*/
.table-wrapper {
  max-height: 440px;       /* ارتفاع باکس */
  overflow-y: auto;        /* فقط عمودی اسکرول */
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

/* جدول */
#tradesTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

/* هدر ثابت */
#tradesTable thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #001677, #001885);
  color: #c7d3ff;  
  z-index: 2;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

thead th {
  background: linear-gradient(180deg, #001677, #001885);
  color: #c7d3ff;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

/* سلول‌ها */
#tradesTable th,
#tradesTable td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

/* ردیف hover */
#tradesTable tbody tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

/* اسکرول‌بار شیک */
.table-wrapper::-webkit-scrollbar {
  width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(#38bdf8, #6366f1);
  border-radius: 10px;
}

.result-stop {
  color: #ff7b7b;
}

.result-win {
  color: #00efdf;
}

/*============================ MODAL ==============================*/
.modal {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(5, 0, 30, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;

  animation: fadeIn 0.25s ease;
}

.modal-content {
  position: relative;
  width: 440px;
  max-width: 92%;

  background:
    radial-gradient(circle at top left,
      rgba(56, 189, 248, 0.08),
      transparent 60%
    ),
    linear-gradient(180deg, #0b0128, #07001d);

  border: 1px solid #1e293b;
  border-radius: 18px;

  padding: 28px 26px 32px;

  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(255,255,255,0.03);

  animation: scaleIn 0.25s ease;
}

.modal-content h2 {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;

  background: linear-gradient(135deg, #38bdf8, #6366f1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  margin-bottom: 20px;
}

.modal-content input[type="text"],
.modal-content input[type="password"] {
  width: 100%;
  padding: 10px 14px;

  background: #0e0135;
  border: 1px solid #1e293b;
  border-radius: 10px;

  color: #e2e8f0;
  font-size: 13px;

  transition: all 0.2s ease;
}

.modal-content input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.3);
}


.modal-content button {
  width: 100%;
  margin-top: 14px;

  padding: 10px 14px;
  border-radius: 10px;
  border: none;

  font-weight: 600;
  font-size: 13px;

  background: linear-gradient(135deg, #1596cd, #1518b6);
  color: white;

  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-content button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(21,24,182,0.4);
}


.master-box {
  background: #0f022f;
  border: 1px dashed #6366f1;
  border-radius: 12px;

  padding: 14px;
  margin-bottom: 0px;

  font-family: monospace;
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;

  color: #38bdf8;
}

#step1,
#step2,
#step3,
#step4 {
  animation: fadeIn 0.25s ease;
}

/*============================== CHECK BOX ===============================*/
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  outline: none;
  box-shadow: none;
}

.checkbox-row label {
  margin: 0;
  font-size: 13px;
}

/*================================= STATUS MODAL ===========================*/
.license-info-box {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 150, 255, 0.1);
  border: 1px solid rgba(0,150,255,0.3);  
  border-radius: 8px;
  font-size: 14px;
}

.info-row .label {
  color: #aaa;
  font-weight: 500;
}

.info-row .value {
  font-weight: 600;
  color: #60ffec;
}

.danger {
  color: #ff6363 !important;
}

/* دکمه Close کوچک، گرد و گوشه بالا سمت راست */
#closeStatusInfo {
  position: absolute;      /* روی هم قرار می‌گیره روی modal-content */
  top: 10px;               /* فاصله از بالا */
  right: 10px;             /* فاصله از راست */
  width: 28px;             /* سایز دایره */
  height: 28px;            /* سایز دایره */
  border-radius: 30%;      /* گرد */
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#closeStatusInfo:hover {
  background: rgba(255,255,255,0.2);
}


#closeLicenseInfo {
  position: absolute;      /* روی هم قرار می‌گیره روی modal-content */
  top: 10px;               /* فاصله از بالا */
  right: 10px;             /* فاصله از راست */
  width: 28px;             /* سایز دایره */
  height: 28px;            /* سایز دایره */
  border-radius: 30%;      /* گرد */
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#closeLicenseInfo:hover {
  background: rgba(255,255,255,0.2);
}

#closeLicenseModal {
  position: absolute;      /* روی هم قرار می‌گیره روی modal-content */
  top: 10px;               /* فاصله از بالا */
  right: 10px;             /* فاصله از راست */
  width: 28px;             /* سایز دایره */
  height: 28px;            /* سایز دایره */
  border-radius: 30%;      /* گرد */
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#closeLicenseModal:hover {
  background: rgba(255,255,255,0.2);
}

#closeRenewModal {
  position: absolute;      /* روی هم قرار می‌گیره روی modal-content */
  top: 10px;               /* فاصله از بالا */
  right: 10px;             /* فاصله از راست */
  width: 28px;             /* سایز دایره */
  height: 28px;            /* سایز دایره */
  border-radius: 30%;      /* گرد */
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#closeRenewModal:hover {
  background: rgba(255,255,255,0.2);
}

/*================================== LICENSE INFO MODAL ================================*/
.license-wrapper {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  flex-wrap: nowrap;      /* مهم */
}

.license-card {
  flex: 1;                /* هر دو مساوی فضا بگیرن */
  min-width: 180px;   /* مهم */
  padding: 18px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
}

.license-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,150,255,0.4);
}

/* عنوان هر مود */
.license-title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* رنگ خاص برای pro */
.license-card.pro {
  background: rgba(0,150,255,0.08);
  border: 1px solid rgba(0,150,255,0.25);
}

/* لیست */
.license-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.license-list li {
  font-size: 13px;
  padding: 6px 0;
  display: flex;
  align-items: center;
}

/* آیتم‌های فعال */
.license-list li.ok::before {
  content: "✓";
  color: #3ddc84;
  margin-right: 8px;
  font-weight: bold;
}

/* آیتم‌های غیرفعال */
.license-list li.no {
  opacity: 0.7;
}

.license-list li.no::before {
  content: "✗";
  color: #ff6363;
  margin-right: 8px;
}

#licenseInfoModal .modal-content {
  width: 85%;
  max-width: 600px;   /* این مهمه */
}

/*========================= CONTACT ============================*/

.contact-section {
  padding: 10px 10px;
  background: linear-gradient(135deg, #000229, #070056);
  position: relative;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #a1e3ff, #6366f1);
  opacity: 0.6;
}

.contact-container {
  max-width: 1100px;
  margin: 0 auto 20px;
  text-align: center;
}

.contact-header {
  margin-bottom: 30px;
}

.contact-title {
  font-size: 2rem;
  margin-bottom: 15px;
  font-weight: 600;
  display: inline-block;
  background: linear-gradient(135deg, #5a65ff, #cac4ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-text {
  font-size: 1rem;
  background: linear-gradient(135deg,  #ffffff, #747474);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #b7c0ff;
  max-width: 1000px;
  margin: 0 auto;
  line-height: 1.7;
}

/*=================================== CONTACT CARDS ================================*/

.contact-methods {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  flex-direction: column;
  padding: 16px 28px;
  min-width: 260px;
  border-radius: 14px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);

  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(130,150,255,0.4);
}

.contact-label {
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7f8cff;
  margin-bottom: 6px;
}

.contact-value {
  font-size: 1rem;
  color: #ffffff;
  font-weight: 500;
}

/*================================== FOOTER ========================================*/
.footer {
  background: #0a0c10;
  padding: 40px 20px 25px;
  font-size: 14px;
  color: #8b8f98;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-built {
  color: #a6a6a7;
  line-height: 1;
  display: flex;
  align-items: center;
}

.footer-logo {
  height: 40px;
  width: 40px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
  border-radius: 8px;
  transition: transform 0.3s ease;
  object-fit: cover;
}

.footer-logo:hover {
  transform: scale(1.05);
}

.footer-legal {
  margin-bottom: 20px;
  text-align: center;
}

.footer-legal a {
  color: #8b8f98;
  text-decoration: none;
  margin: 0 10px;
  transition: 0.3s ease;
}

.footer-legal a:hover {
  color: #ffffff;
}

.footer-right {
  display: flex;
  align-items: center;   /* این مهم‌ترین خطه */
  gap: 10px;
}

.footer-right:hover .footer-logo {
  transform: scale(1.05);
  transition: 0.3s ease;
}
/*=============================== TRADE MARK ================================*/

.tm-mark {
    position: relative;
    top: -15px;         /* کمی بالاتر از لبه لوگو */
    right: 8px;      /* چسبیده به لبه سمت راست لوگو */
    font-size: 20px;   /* سایز ظریف */
    font-weight: normal;
    color: #a6a6a7;    /* رنگ آبی درخشان لایسنس */
    opacity: 1;      /* کمی شفافیت برای شیک‌تر شدن */
}



/*=============================== THIRD PARTY ================================*/
.scroll-box {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px; /* فاصله از اسکرول */
}

/* Webkit Browsers */
.scroll-box::-webkit-scrollbar {
  width: 8px;
}

.scroll-box::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-box::-webkit-scrollbar-thumb {
  background: linear-gradient(#38bdf8, #6366f1);
  border-radius: 10px;
}

.scroll-box::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#59d4ff, #7c7fff);
}

/* Firefox */
.scroll-box {
  scrollbar-width: thin;
  scrollbar-color: #38bdf8 transparent;
}


#confirmThirdParty:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#renewB:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#closeThirdParty {
  position: absolute;      /* روی هم قرار می‌گیره روی modal-content */
  top: 10px;               /* فاصله از بالا */
  right: 10px;             /* فاصله از راست */
  width: 28px;             /* سایز دایره */
  height: 28px;            /* سایز دایره */
  border-radius: 30%;      /* گرد */
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#closeThirdParty:hover {
  background: rgba(255,255,255,0.2);
}


/* ================= MODAL STYLING ================= */
.thirdParty-modal {
  width: 80%;               /* پهنای کلی modal بیشتر شد */
  max-width: 700px;         /* حداکثر پهنا */
  margin: 50px auto;        /* وسط‌چین صفحه */
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.modal-body.scroll-box {
  max-height: 65vh;         /* محدودیت ارتفاع */
  overflow-y: auto;         /* اسکرول عمودی فعال */
  text-align: justify;      /* متن justify شد */
  line-height: 1.6;         /* فاصله خطوط بهتر */
  padding-right: 10px;      /* برای scrollbar جا باز کنیم */
}

.modal-header h2 {
  font-size: 1.5rem;
  margin: 0;
  text-align: center;
}

.checkbox-row {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row a {
  color: #007bff;
  text-decoration: underline;
  font-weight: 500;
  font-size: 14px;
}

.checkbox-row a:hover {
  color: #0056b3;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/*======================== APP MODAL ALERT ======================*/
/* BACKDROP & MODAL */
.app-alert-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-alert-modal-content {
  background-color: #1e1e2f;
  color: #f5f5f5;
  padding: 2rem;
  border-radius: 12px;
  min-width: 300px;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  animation: appAlertFadeIn 0.3s ease-out;
}

/* عنوان */
.app-alert-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  background: linear-gradient(90deg, #ff7f50, #ffb347);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* متن هشدار */
.app-alert-text {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 auto 1.5rem auto;
  text-align: center;
  color: #ddd;
}

/* دکمه */
.app-alert-btn {
  padding: 0.6rem 1.4rem;
  background: linear-gradient(90deg, #ff7f50, #ffb347);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-alert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255,127,80,0.4);
}

/* انیمیشن ورود */
@keyframes appAlertFadeIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/*======================== APP MODAL IMPORTANT ALERT ======================*/
/* BACKDROP & MODAL */
.app-imp-alert-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* MODAL CONTENT */
.app-imp-alert-modal-content {
  background-color: #1e1e2f;
  color: #f5f5f5;
  padding: 2rem;
  border-radius: 12px;
  min-width: 300px;
  max-width: 450px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  animation: appAlertFadeIn 0.3s ease-out;
}

/* عنوان */
.app-imp-alert-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  background: linear-gradient(90deg, #ff0000, #ff7e7e);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* متن هشدار */
.app-imp-alert-text {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 auto 1.5rem auto;
  text-align: center;
  color: #ddd;
}

/* دکمه */
.app-imp-alert-btn {
  padding: 0.6rem 1.4rem;
  margin-left: 20px;
  margin-right: 20px;
  background: linear-gradient(90deg, #ff0000, #ff7e7e);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-imp-alert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255,127,80,0.4);
}

/* انیمیشن ورود */
@keyframes appImpAlertFadeIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/*=========================== PASSWORD ROW ================================*/
.password-row {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.password-row input {
  width: 100%;
  height: 40px;
  font-size: 13px;
  padding: 0 40px 0 10px;
  box-sizing: border-box;
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;

}

.eye-icon {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
}

.password-note{
  display:block;
  margin-top:4px;
  font-size:11px;
  color:#888;
  text-align: center;
}

.app-logo {
  height: 55px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
  border-radius: 8px;
  transition: transform 0.3s ease;
  position: absolute;
  top: 50px;
  right:50px;
}

.app-logo:hover {
  transform: scale(1.1);
}


