* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  background: #ffffff;
  color: #1f1f1f;
  min-height: 100vh;
}

.glass-container {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #ffffff;
}

.login-box {
  max-width: 480px;
  width: 100%;
  padding: 48px;
  text-align: center;
  animation: slideUp 0.6s ease-out;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.logo {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1f1f1f;
  font-size: 52px;
  margin: 0 auto 20px;
}

.login-box h1 {
  color: #1f1f1f;
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 12px;
}

.login-box p {
  color: #666666;
  font-size: 1.1em;
  margin-bottom: 40px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #1f1f1f;
  display: none;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0 0 16px 16px;
}

header.visible {
  display: flex;
}

.header-title {
  font-weight: 600;
  color: #1f1f1f;
  font-size: 1.2em;
}

.panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateX(-100%);
  transition: 0.3s ease;
  padding: 30px 20px;
  z-index: 1000;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.panel.open {
  transform: translateX(0);
}

.panel nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: #1f1f1f;
  text-decoration: none;
  font-weight: 500;
  padding: 12px 15px;
  border-radius: 12px;
  transition: all 0.2s;
}

.panel nav a:hover {
  background: rgba(0, 0, 0, 0.04);
}

.panel nav a i {
  font-size: 20px;
  color: #1f1f1f;
}

.panel button {
  margin-top: 30px;
  background: #ff3b30;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
}

#closeSidebar {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 20px;
  cursor: pointer;
  color: #666666;
}

.page-content {
  padding: 40px 20px;
  margin-top: 70px;
  display: none;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  background: #ffffff;
}

.page-content.visible {
  display: flex;
}

.card {
  background: #ffffff;
  padding: 24px;
  border-radius: 20px;
  width: 240px;
  height: 160px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1f1f1f;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.card-title {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  font-weight: 600;
  font-size: 0.9em;
  color: #666666;
}

.card-number {
  font-size: 40px;
  font-weight: 700;
  color: #1f1f1f;
}

.card-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-top: 20px;
}

.upload-card {
  cursor: pointer;
}

.premium-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  min-height: 180px;
}

.premium-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.card-icon-wrapper.blue {
  background: rgba(0, 122, 255, 0.12);
  color: #007AFF;
}

.card-icon-wrapper.green {
  background: rgba(52, 199, 89, 0.12);
  color: #34C759;
}

.card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
}

.card-badge.success {
  background: rgba(52, 199, 89, 0.1);
  color: #34C759;
}

.card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  transition: all 0.2s ease;
}

.premium-card.clickable:hover .card-arrow {
  background: #007AFF;
  color: white;
}

.premium-card .card-title {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 8px;
}

.premium-card .card-content {
  padding-top: 0;
  height: auto;
  flex: none;
  flex-direction: column;
  align-items: flex-start;
}

.card-subtitle {
  font-size: 13px;
  color: #666666;
}

.card-decoration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  opacity: 0.6;
}

.decoration-circles {
  display: flex;
  gap: 6px;
}

.decoration-circles span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #007AFF;
}

.decoration-circles span:nth-child(2) {
  opacity: 0.6;
}

.decoration-circles span:nth-child(3) {
  opacity: 0.3;
}

.decoration-bar {
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #34C759, rgba(52, 199, 89, 0.3));
}

.docs-stack {
  display: flex;
  position: absolute;
  bottom: 16px;
  right: 16px;
}

.docs-stack .doc-icon {
  width: 36px;
  height: 44px;
  background: #f0f7ff;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #007AFF;
  font-size: 18px;
  margin-left: -12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.docs-stack .doc-icon:first-child {
  margin-left: 0;
  z-index: 1;
}

.docs-stack .doc-icon:nth-child(2) {
  z-index: 2;
  transform: translateY(-4px);
}

.docs-stack .doc-icon:nth-child(3) {
  z-index: 3;
  transform: translateY(-8px);
}

.premium-card .card-number {
  font-size: 36px;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 12px;
}

.premium-card .buy-credits-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.premium-card .buy-credits-btn:hover {
  background: #0066d6;
}

.upload-default {
  font-size: 48px;
  color: #666666;
  transition: all 0.3s;
}

.upload-default:hover {
  transform: scale(1.1);
}

.file-list {
  width: 100%;
  max-height: 100px;
  overflow-y: auto;
  padding: 5px;
  font-size: 12px;
}

.upload-btn-wrapper {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
}

.upload-btn {
  width: 100%;
  padding: 8px 12px;
  background: #1f1f1f;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
}

#overlayPanel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  padding: 30px;
  display: none;
  z-index: 2000;
  overflow-y: auto;
}

#overlayPanel.fullscreen-panel {
  padding-top: 50px;
}

.overlay-panel-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 2001;
}

.overlay-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.overlay-back-btn:hover {
  color: #1f1f1f;
}

.document-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
  width: 100%;
}

.document-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  color: #1f1f1f;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.document-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.document-card .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.document-card .card-icon {
  font-size: 28px;
  color: #1f1f1f;
}

.document-card h4 {
  font-size: 1.1em;
  font-weight: 700;
  color: #1f1f1f;
  margin: 0;
  word-break: break-word;
}

.document-card .card-info {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 15px;
}

.document-card .card-info p {
  margin: 5px 0;
  word-break: break-word;
}

.document-card .card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.icon-btn {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  color: #1f1f1f;
  font-size: 20px;
  text-decoration: none;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: #e8e8ed;
}

.icon-btn i {
  font-size: inherit;
}

.settings-panel {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  color: #1f1f1f;
}

.settings-panel h2 {
  font-size: 24px;
  color: #1f1f1f;
  margin-bottom: 25px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 15px;
}

.settings-section {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.settings-section h3 {
  color: #1f1f1f;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.settings-section h3 i {
  font-size: 20px;
}

.setting-item {
  margin-bottom: 20px;
  padding: 10px 0;
}

.setting-item label {
  display: block;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 8px;
  font-size: 15px;
}

.setting-item input[type="text"],
.setting-item input[type="email"],
.setting-item textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #ffffff;
}

.setting-item input[type="text"]:focus,
.setting-item input[type="email"]:focus,
.setting-item textarea:focus {
  outline: none;
  border-color: #1f1f1f;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.setting-item textarea {
  resize: vertical;
  min-height: 80px;
}

.setting-description {
  font-size: 12px;
  color: #666666;
  margin-top: 5px;
  line-height: 1.4;
  background: #f5f5f7;
  padding: 8px 12px;
  border-radius: 8px;
}

.permission-note {
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 4px solid #1f1f1f;
  border-radius: 12px;
  padding: 15px;
  font-size: 14px;
  color: #1f1f1f;
  line-height: 1.5;
  font-weight: 500;
}

.btn-upload-csv {
  background: #34c759;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  transition: background 0.3s ease, transform 0.2s ease;
  width: auto;
}

.btn-upload-csv:hover {
  background: #2db84d;
  transform: translateY(-2px);
}

.btn-upload-csv i {
  font-size: 18px;
}

.toggle-label {
  display: flex !important;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  color: #1f1f1f;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 50px;
  height: 28px;
  background: #e5e5ea;
  border-radius: 28px;
  margin-right: 12px;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-label input:checked+.toggle-slider {
  background: #34c759;
}

.toggle-label input:checked+.toggle-slider::before {
  transform: translateX(22px);
}

.settings-actions {
  display: flex;
  gap: 12px;
  padding-top: 20px;
  justify-content: flex-end;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 25px;
  flex-wrap: wrap;
}

.settings-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  min-width: 120px;
  text-align: center;
}

.btn {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #1f1f1f;
  color: white;
}

.btn-primary:hover {
  background: #333333;
}

.btn-secondary {
  background: #f5f5f7;
  color: #1f1f1f;
}

.btn-secondary:hover {
  background: #e8e8ed;
}

.btn-danger {
  background: #ff3b30;
  color: white;
}

.btn-danger:hover {
  background: #d63027;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.custom-modal-content {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: popupSlideIn 0.3s ease-out;
}

.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.custom-modal-header h3 {
  margin: 0;
  color: #1f1f1f;
  font-size: 20px;
  font-weight: 600;
}

.custom-modal-close {
  font-size: 28px;
  cursor: pointer;
  color: #666666;
  line-height: 1;
}

.custom-modal-close:hover {
  color: #1f1f1f;
}

.custom-modal-body p {
  color: #666666;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 30px;
}

.custom-modal-footer {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.custom-modal-btn {
  padding: 12px 25px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-size: 15px;
}

.custom-modal-btn-primary {
  background: #1f1f1f;
  color: white;
}

.custom-modal-btn-primary:hover {
  background: #333333;
}

.custom-modal-btn-secondary {
  background: #f5f5f7;
  color: #1f1f1f;
}

.custom-modal-btn-secondary:hover {
  background: #e8e8ed;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.signatures-viewer {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  color: #1f1f1f;
}

.signatures-viewer h2 {
  font-size: 24px;
  color: #1f1f1f;
  margin-bottom: 25px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 15px;
}

.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.signature-search-input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #f5f5f7;
}

.signature-search-input:focus {
  outline: none;
  border-color: #1f1f1f;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666666;
  font-size: 20px;
}

.signature-list {
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 10px;
}

.signature-log-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.signature-log-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.signature-info {
  flex-grow: 1;
  word-break: break-word;
}

.signature-info strong {
  color: #1f1f1f;
  font-size: 16px;
}

.signature-info span {
  font-size: 14px;
  color: #666666;
  display: block;
}

.signature-info small {
  font-size: 12px;
  color: #999999;
}

.signature-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.isolated-tag {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 5px;
}

.download-isolated-btn {
  background: #1f1f1f;
  color: white;
}

.download-isolated-btn:hover {
  background: #333333;
}

@media (max-width: 768px) {
  .login-box {
    padding: 32px 24px;
    margin: 20px;
  }

  .login-box h1 {
    font-size: 2em;
  }

  header {
    padding: 12px 16px;
  }

  .header-title {
    font-size: 1.1em;
  }

  .panel {
    width: 100%;
  }

  .page-content {
    padding: 20px 16px;
    margin-top: 60px;
  }

  .card {
    width: 100%;
    max-width: 280px;
    height: 140px;
  }

  #overlayPanel {
    width: 100%;
    padding: 20px 16px;
  }

  .document-cards-grid {
    grid-template-columns: 1fr;
  }

  .document-card .card-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .icon-btn {
    flex-grow: 1;
    max-width: 100px;
  }

  .settings-panel {
    padding: 20px;
  }

  .settings-section {
    padding: 15px;
  }

  .settings-actions {
    justify-content: center;
    gap: 8px;
  }

  .settings-actions .btn {
    flex: 1;
    min-width: unset;
    width: 100%;
  }

  .signatures-viewer {
    padding: 20px;
  }

  .signatures-viewer h2 {
    font-size: 20px;
  }

  .signature-log-entry {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .signature-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .isolated-tag {
    margin-top: 8px;
  }

  .custom-modal-content {
    padding: 24px;
    margin: 0 15px;
  }

  .custom-modal-header h3 {
    font-size: 18px;
  }

  .custom-modal-body p {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .custom-modal-btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .btn-upload-csv {
    width: 100%;
    justify-content: center;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .card {
    height: 120px;
    padding: 16px;
  }

  .card-number {
    font-size: 32px;
  }

  .upload-default {
    font-size: 36px;
  }

  .settings-section {
    padding: 15px;
    margin: 15px 0;
  }

  .settings-actions {
    flex-direction: column;
  }

  .settings-actions .btn {
    width: 100%;
  }

  .custom-modal-content {
    padding: 20px;
  }

  .custom-modal-header h3 {
    font-size: 16px;
  }
}

.signatures-manager {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  color: #1f1f1f;
}

.signatures-manager h2 {
  font-size: 24px;
  color: #1f1f1f;
  margin-bottom: 25px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 15px;
}

.signature-create-section {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 30px;
}

.signature-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.signature-tab {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666666;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}

.signature-tab.active {
  color: #1f1f1f;
  border-bottom-color: #1f1f1f;
}

.signature-tab:hover {
  color: #1f1f1f;
}

.signature-tab-content {
  display: none;
}

.signature-tab-content.active {
  display: block;
}

#signatureText {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 15px;
}

#signatureFont {
  width: 200px;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  margin-bottom: 15px;
}

.signature-preview {
  border: 1px dashed rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 15px;
  text-align: center;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 12px;
}

#signatureCanvas {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: white;
  cursor: crosshair;
  display: block;
  margin-bottom: 15px;
}

.canvas-controls {
  display: flex;
  gap: 10px;
}

.saved-signatures-section h3 {
  color: #1f1f1f;
  margin-bottom: 15px;
  font-size: 18px;
}

.saved-signatures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.signature-item {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 15px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.signature-display {
  width: 100%;
  padding: 10px;
  border: 1px dashed rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  text-align: center;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .signature-tabs {
    flex-direction: column;
  }

  #signatureCanvas {
    width: 100%;
    height: 120px;
  }

  .saved-signatures-grid {
    grid-template-columns: 1fr;
  }
}

.signature-display-container {
  margin-top: 8px;
}

.signature-display-dashboard {
  margin-top: 8px;
}

.signature-name {
  word-break: break-word;
}

.log-entry .signature-display-container {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.signature-log-entry .signature-display-dashboard {
  margin-top: 10px;
}

@media (max-width: 768px) {

  .signature-display-container img,
  .signature-display-dashboard img {
    max-width: 120px;
    max-height: 35px;
  }

  .signature-display-container .signature-name,
  .signature-display-dashboard div[style*="font-family"] {
    font-size: 14px !important;
    padding: 6px !important;
  }
}

.signature-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.signature-actions .icon-btn {
  min-width: 32px;
}

@media (max-width: 768px) {
  .signature-actions {
    gap: 4px;
  }

  .signature-actions .icon-btn {
    min-width: 28px;
    padding: 6px;
  }
}

.extension-container {
  background: #f5f5f7;
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 1.5rem 0;
  color: #1f1f1f;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.extension-container h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.extension-container .text-muted {
  opacity: 0.6;
  margin-bottom: 1.5rem;
}

.btn-extend {
  background: #1f1f1f;
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-extend:hover {
  background: #333333;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.segmented-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.segmented-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  color: #1f1f1f;
  transition: background 0.2s ease;
}

.segmented-card-item:last-child {
  border-bottom: none;
}

.segmented-card-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.segmented-card-item i {
  font-size: 20px;
  color: #1f1f1f;
}

.segmented-card-item .item-content {
  flex: 1;
  margin-left: 12px;
}

.segmented-card-item .item-title {
  font-weight: 500;
  color: #1f1f1f;
}

.segmented-card-item .item-subtitle {
  font-size: 12px;
  color: #666666;
  margin-top: 2px;
}

.api-panel {
  max-width: 100%;
  overflow-x: hidden;
}

.api-panel h2 {
  color: #1f1f1f;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.api-panel .settings-section {
  overflow-x: auto;
}

.api-panel table {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
  margin: 15px 0;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.api-panel table th {
  background: #1f1f1f;
  color: white;
  font-weight: 600;
  padding: 12px;
  text-align: left;
}

.api-panel table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.api-panel ul {
  line-height: 1.8;
  padding-left: 20px;
}

.api-panel ul li {
  margin-bottom: 8px;
}

.api-panel code {
  background: #f5f5f7;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
}

.code-example {
  margin: 15px 0;
  background: #f5f5f7;
  border-radius: 12px;
  padding: 16px;
  border-left: 4px solid #1f1f1f;
}

.code-example strong {
  color: #1f1f1f;
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.code-example .code-block,
.code-example pre {
  background: #1f1f1f;
  color: #e2e8f0;
  padding: 16px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 8px 0;
}

.code-example code {
  background: transparent;
  padding: 0;
}

@media (max-width: 768px) {
  .api-panel table {
    font-size: 12px;
  }

  .api-panel table th,
  .api-panel table td {
    padding: 8px;
  }

  .code-example .code-block,
  .code-example pre {
    font-size: 11px;
    padding: 12px;
  }
}

.api-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.api-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f5f5f7;
  border-radius: 12px;
  color: #1f1f1f;
}

.api-user-info i {
  font-size: 24px;
}

.api-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f5f7;
  color: #666666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.api-close-btn:hover {
  background: #e8e8ed;
}

.api-key-section {
  margin: 20px 0;
  padding: 20px;
  background: #f5f5f7;
  border-radius: 16px;
}

.api-key-display {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.api-key-display input {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
  background: white;
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: #1f1f1f;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.btn-icon:hover {
  background: #333333;
}

.btn-danger-icon {
  background: #ff3b30;
}

.btn-danger-icon:hover {
  background: #e0342a;
}

.api-stats {
  font-size: 12px;
  color: #666666;
  margin-top: 12px;
}

.api-loading {
  text-align: center;
  padding: 40px;
  color: #666666;
}

.api-docs h3 {
  color: #1f1f1f;
  font-size: 16px;
  margin: 24px 0 12px 0;
}

.code-block-container {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #1f1f1f;
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #999999;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.code-content {
  background: #2d2d2d;
  color: #e2e8f0;
  padding: 16px;
  margin: 0;
  overflow-x: auto;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.code-content code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.api-endpoints {
  background: #f5f5f7;
  border-radius: 12px;
  overflow: hidden;
}

.endpoint-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.endpoint-item:last-child {
  border-bottom: none;
}

.endpoint-item code {
  background: #1f1f1f;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.endpoint-item span {
  color: #666666;
  font-size: 13px;
}

.api-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.api-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f5f5f7;
  border-radius: 50px;
  color: #1f1f1f;
  font-size: 14px;
}

.api-user-pill i {
  font-size: 20px;
}

.api-key-box {
  padding: 20px;
  background: #f5f5f7;
  border-radius: 16px;
  margin-bottom: 24px;
}

.api-key-box p {
  color: #666666;
  margin-bottom: 12px;
}

.api-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #1f1f1f;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.api-generate-btn:hover {
  background: #333333;
}

.api-key-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.api-key-row input {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
  background: white;
}

.api-copy-key,
.api-regen-key {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: #1f1f1f;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.api-regen-key {
  background: #ff3b30;
}

.api-key-meta {
  font-size: 12px;
  color: #666666;
  margin-top: 10px;
}

.api-section {
  margin-bottom: 24px;
}

.api-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 12px;
}

.api-code-block {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.api-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.api-code-header span {
  font-size: 12px;
  font-weight: 500;
  color: #666666;
}

.api-code-header button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: none;
  font-size: 12px;
  color: #666666;
  cursor: pointer;
  border-radius: 6px;
}

.api-code-header button:hover {
  background: rgba(0, 0, 0, 0.05);
}

.api-code-content {
  margin: 0;
  padding: 14px;
  background: transparent;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}

.api-code-content code {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 13px;
  background: transparent !important;
}

.api-endpoints-list {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.api-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.api-endpoint:last-child {
  border-bottom: none;
}

.api-endpoint code {
  padding: 4px 8px;
  background: #1f1f1f;
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.api-endpoint span {
  flex: 1;
  font-size: 13px;
  color: #1f1f1f;
  font-family: 'SF Mono', Monaco, monospace;
}

.api-endpoint small {
  font-size: 12px;
  color: #666666;
}

.api-notes {
  margin: 0;
  padding-left: 20px;
  color: #666666;
  font-size: 13px;
  line-height: 1.8;
}

.api-notes code {
  background: #f5f5f7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.api-section.api-notes-card {
  background: #f9f9fb;
  border-radius: 16px;
  padding: 20px;
}

.api-section.api-notes-card h3 {
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(0, 0, 0, 0.1);
}

.api-code-block pre,
.api-code-content,
.api-code-content code,
pre[class*="language-"],
code[class*="language-"] {
  background: transparent !important;
  color: #1f1f1f !important;
}

.api-code-content .token.string {
  color: #22863a !important;
}

.api-code-content .token.keyword {
  color: #d73a49 !important;
}

.api-code-content .token.function {
  color: #6f42c1 !important;
}

.api-code-content .token.operator {
  color: #d73a49 !important;
}

.api-code-content .token.punctuation {
  color: #24292e !important;
}

.api-code-content .token.property {
  color: #005cc5 !important;
}

.api-code-content .token.comment {
  color: #6a737d !important;
}

.sig-page {
  max-width: 400px;
  margin: 0 auto;
}

.sig-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.sig-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1f1f1f;
  margin: 0;
}

.sig-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f5f5f7;
  color: #666666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.sig-close:hover {
  background: #e8e8ed;
}

.sig-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.sig-tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: #f5f5f7;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #666666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sig-tab.active {
  background: #1f1f1f;
  color: white;
}

.sig-content {
  display: none;
}

.sig-content.active {
  display: block;
}

.sig-input {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.sig-select {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 10px;
  background: white;
}

.sig-preview {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f7;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 24px;
  font-style: italic;
  color: #1f1f1f;
}

.sig-save-btn {
  width: 100%;
  padding: 14px;
  background: #1f1f1f;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sig-save-btn:hover {
  background: #333333;
}

#signatureCanvas {
  width: 100%;
  height: 120px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: white;
  cursor: crosshair;
  touch-action: none;
}

.sig-canvas-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.sig-clear-btn {
  width: 50px;
  padding: 14px;
  background: #f5f5f7;
  color: #666666;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sig-clear-btn:hover {
  background: #e8e8ed;
}

.sig-canvas-actions .sig-save-btn {
  flex: 1;
}

.sig-saved {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sig-saved-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #666666;
  margin-bottom: 12px;
}

.sig-saved-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sig-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f5f5f7;
  border-radius: 12px;
}

.sig-saved-item img {
  max-height: 40px;
  max-width: 150px;
}

.sig-saved-item .sig-typed {
  font-size: 20px;
  font-style: italic;
}

.sig-saved-item .sig-delete {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #ff3b30;
  cursor: pointer;
  border-radius: 8px;
}

.sig-saved-item .sig-delete:hover {
  background: rgba(255, 59, 48, 0.1);
}

.settings-page {
  padding: 0;
  width: 100%;
}

.settings-title {
  font-size: 24px;
  font-weight: 600;
  color: #1f1f1f;
  margin: 0 0 24px 0;
  text-align: center;
}

.settings-section {
  background: transparent;
  border-radius: 0;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: none;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  padding: 0;
  margin: 0 0 10px 0;
}

.settings-group {
  margin-bottom: 24px;
  padding: 0;
}

.settings-section {
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  text-decoration: none;
  color: #1f1f1f;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  text-align: left;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.settings-option:first-child {
  border-top: none;
}

.settings-option:hover {
  background: #f5f5f7;
}

.settings-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-option-left i {
  font-size: 20px;
  color: #007AFF;
}

.settings-option>i {
  color: #c8c8c8;
  font-size: 16px;
}

.logout-option {
  color: #FF3B30;
}

.logout-option .settings-option-left i {
  color: #FF3B30;
}