/* Smart Link Manager - Clean Admin UI */

.slm-wrapper {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px;
  font-family: Tahoma, Arial, sans-serif;
  color: #1f2937;
  direction: rtl;
}

.slm-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.slm-card__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}

.slm-card__subtitle {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.8;
}

.slm-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.slm-stat {
  background: #f9fafb;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.slm-stat__number {
  display: block;
  font-size: 1.65rem;
  font-weight: 900;
  color: #0E2EB0;
  line-height: 1;
}

.slm-stat__label {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
}

.slm-alert {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 18px;
  line-height: 1.8;
  font-size: 0.92rem;
}

.slm-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.slm-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.slm-form {
  display: grid;
  gap: 14px;
}

.slm-field {
  margin: 0;
}

.slm-field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
  font-size: 0.86rem;
  color: #374151;
}

.slm-field small,
.slm-hint {
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.8;
}

.slm-field input[type="text"],
.slm-field input[type="url"],
.slm-field input[type="datetime-local"],
.slm-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.slm-field textarea {
  min-height: 86px;
  resize: vertical;
}

.slm-field input:focus,
.slm-field textarea:focus {
  border-color: #0E2EB0;
  box-shadow: 0 0 0 3px rgba(14, 46, 176, 0.14);
}

.slm-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.slm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.slm-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.slm-advanced {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  padding: 0;
  overflow: hidden;
}

.slm-advanced summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 900;
  color: #111827;
  background: #f3f4f6;
  border-bottom: 1px solid transparent;
}

.slm-advanced[open] summary {
  border-bottom-color: #e5e7eb;
}

.slm-advanced summary::-webkit-details-marker {
  display: none;
}

.slm-advanced__body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.slm-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #0E2EB0;
  color: #F9F8F8;
  padding: 13px 18px;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.slm-btn:hover {
  background: #0b2489;
  transform: translateY(-1px);
}

.slm-copy-btn,
.slm-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  background: #ffffff;
  color: #111827;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  transition: background 0.2s, border-color 0.2s;
}

.slm-copy-btn:hover,
.slm-action-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.slm-copy-btn--danger:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.slm-copy-btn--success {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #047857 !important;
}

.slm-post-create {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.slm-qr-img {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.slm-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slm-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 0.82rem;
}

.slm-share--wa { background: #25d366; }
.slm-share--tg { background: #0088cc; }
.slm-share--tw { background: #111827; }

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

.slm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.slm-table th,
.slm-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.slm-table th {
  text-align: right;
  background: #f9fafb;
  color: #4b5563;
  font-weight: 900;
  white-space: nowrap;
}

.slm-table__title {
  font-weight: 800;
  max-width: 220px;
}

.slm-short-url {
  direction: ltr;
  display: inline-block;
  color: #0E2EB0;
  font-weight: 800;
  word-break: break-all;
}

.slm-click-count {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  background: rgba(14, 46, 176, 0.10);
  color: #0E2EB0;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 900;
}

.slm-table__actions {
  white-space: nowrap;
}

.slm-thumb {
  width: 72px;
  height: 42px;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.slm-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 1.2rem;
}

.slm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

.slm-bio-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.slm-bio-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.slm-bio-item--inactive {
  opacity: 0.5;
}

.slm-bio-item__icon {
  font-size: 1.35rem;
}

.slm-bio-item__title {
  font-weight: 900;
  color: #111827;
}

.slm-bio-item__url {
  display: block;
  color: #6b7280;
  font-size: 0.78rem;
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 760px) {
  .slm-wrapper {
    margin: 12px auto;
    padding: 0 10px;
  }

  .slm-card {
    padding: 18px;
    border-radius: 12px;
  }

  .slm-row,
  .slm-grid-2,
  .slm-grid-3 {
    grid-template-columns: 1fr;
  }

  .slm-bio-item {
    grid-template-columns: auto 1fr;
  }

  .slm-bio-item form {
    grid-column: 1 / -1;
  }
}