/* App-Specific Styles (layered on tailwind.local.css) */
html { transition: background-color 0.25s ease, color 0.25s ease; }
body, .card, .btn, input, textarea, select { transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--gray-700); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background-color: #4b5563; }
html { scrollbar-width: thin; scrollbar-color: var(--gray-700) transparent; }

.apo-hero-bg {
  position: relative;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
              radial-gradient(ellipse 60% 50% at 100% 0%, rgba(16, 185, 129, 0.12), transparent);
}
.apo-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.apo-card { background-color: var(--gray-900); border: 1px solid var(--gray-800); border-radius: 1rem; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.apo-card:hover { border-color: var(--indigo-500); transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(79, 70, 229, 0.25); }

.apo-btn-gradient { background: linear-gradient(135deg, var(--indigo-600), var(--indigo-500)); background-size: 200% 200%; transition: background-position 0.4s ease, transform 0.15s ease; }
.apo-btn-gradient:hover { background-position: 100% 0; transform: translateY(-1px); }
.apo-btn-gradient:active { transform: translateY(0); }

.apo-icon-tile { width: 3rem; height: 3rem; border-radius: 0.85rem; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(99,102,241,0.05)); border: 1px solid rgba(99,102,241,0.25); }

.apo-score-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 3rem; height: 3rem; border-radius: 9999px; font-weight: 700; font-size: 1rem; border: 3px solid; }
.apo-score-high { border-color: var(--emerald-500); color: var(--emerald-400); }
.apo-score-mid  { border-color: var(--amber-500); color: var(--amber-400); }
.apo-score-low  { border-color: var(--red-500); color: var(--red-400); }

.apo-spinner { width: 1.25rem; height: 1.25rem; border: 2.5px solid rgba(255,255,255,0.2); border-top-color: var(--white); border-radius: 50%; animation: apo-spin 0.7s linear infinite; display: inline-block; }
@keyframes apo-spin { to { transform: rotate(360deg); } }

.apo-skeleton { background: linear-gradient(90deg, var(--gray-800) 25%, var(--gray-700) 37%, var(--gray-800) 63%); background-size: 400% 100%; animation: apo-skeleton-loading 1.4s ease infinite; border-radius: 0.5rem; }
@keyframes apo-skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.apo-toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; max-width: 22rem; }
.apo-toast { background-color: var(--gray-900); border: 1px solid var(--gray-800); border-left-width: 4px; border-radius: 0.6rem; padding: 0.85rem 1rem; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); animation: apo-toast-in 0.3s ease-out; font-size: 0.85rem; color: var(--gray-100); }
.apo-toast-success { border-left-color: var(--emerald-500); }
.apo-toast-error { border-left-color: var(--red-500); }
.apo-toast-info { border-left-color: var(--indigo-500); }
.apo-toast.apo-toast-hide { animation: apo-toast-out 0.25s ease-in forwards; }
@keyframes apo-toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes apo-toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(24px); } }

.apo-copy-btn { position: relative; }
.apo-copy-btn.apo-copied::after { content: 'Copied!'; position: absolute; top: -1.75rem; right: 0; background: var(--emerald-600); color: white; font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 0.35rem; animation: apo-fade-in 0.2s ease-out; white-space: nowrap; }

.apo-textarea { resize: vertical; min-height: 8rem; line-height: 1.6; }

.apo-tab { position: relative; padding-bottom: 0.5rem; }
.apo-tab.apo-tab-active { color: var(--indigo-400); }
.apo-tab.apo-tab-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--indigo-500); border-radius: 2px; }

.apo-mobile-drawer { transform: translateX(100%); transition: transform 0.3s ease; }
.apo-mobile-drawer.apo-open { transform: translateX(0); }
.apo-mobile-drawer-left { transform: translateX(-100%); transition: transform 0.3s ease; }
.apo-mobile-drawer-left.apo-open { transform: translateX(0); }
.apo-drawer-overlay { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.apo-drawer-overlay.apo-open { opacity: 1; pointer-events: auto; }

@media print {
  .apo-no-print { display: none !important; }
  body { background: white !important; color: black !important; }
}
