/* ===================================================
   MODAL DO APLICATIVO (IFRAME)
   =================================================== */

.app-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10005;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-modal.active {
  display: flex;
}

.app-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(15px);
}

.app-modal-box {
  position: relative;
  z-index: 10006;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  background: #020617;
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 100px rgba(14, 165, 233, 0.15);
  animation: modalEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.app-modal-header {
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.app-modal-controls {
  display: flex;
  gap: 8px;
}

.mac-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mac-btn.red { background: #ff5f56; cursor: pointer; }
.mac-btn.yellow { background: #ffbd2e; }
.mac-btn.green { background: #27c93f; }

.app-modal-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
}

.app-modal-close-icon {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.app-modal-body {
  flex: 1;
  position: relative;
  background: #000;
}

.app-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #020617;
  color: #fff;
  z-index: 1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(14, 165, 233, 0.1);
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}