/* PO Tool Page Styles */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-teal), #00ffcc);
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  border-color: rgba(64, 162, 163, 0.5);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(64, 162, 163, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-teal);
  box-shadow: inset 0 0 0 1px rgba(64, 162, 163, 0.2);
}

.tool-card-content h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.tool-card-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tool-card-action {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-teal);
  font-size: 0.9rem;
  font-weight: 600;
  transition: gap 0.2s;
}

.tool-card:hover .tool-card-action {
  gap: 12px;
}

/* Modal Styles */
.po-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.po-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.po-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 700px;
  max-width: 90vw;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.po-modal-overlay.active .po-modal-content {
  transform: translateY(0) scale(1);
}

.po-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
}

.po-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.po-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px;
}

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

.po-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
}

.po-modal-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.po-step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.po-step-item {
  display: flex;
  gap: 16px;
  background: var(--surface2);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.po-step-number {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--brand-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.po-step-text strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 1rem;
}

.po-step-text p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.po-code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: var(--brand-teal);
  font-size: 0.85em;
  border: 1px solid rgba(255,255,255,0.1);
}

.po-link {
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  text-decoration: none;
  border: 1px solid rgba(88, 166, 255, 0.2);
  transition: all 0.2s;
  cursor: pointer;
  display: inline-block;
}

.po-link:hover {
  background: rgba(88, 166, 255, 0.2);
  text-decoration: underline;
}

.po-modal-footer {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}

.po-download-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-teal);
  color: #000;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(64, 162, 163, 0.3);
}

.po-download-btn:hover {
  background: #368a8b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(64, 162, 163, 0.4);
}
