/* =============================================
   AM Studio – Kundenbereich Styles
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent:     #6c63ff;
  --bg:         #0a0a0f;
  --bg-2:       #111118;
  --bg-3:       #1a1a28;
  --text:       #e8e8f0;
  --text-muted: #8888aa;
  --border:     rgba(255,255,255,0.08);
  --radius:     16px;
  --red:        #f5576c;
  --green:      #43e97b;
  --yellow:     #f6c90e;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hidden { display: none !important; }

/* ---- Logo ---- */
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.03em;
}
.logo span { color: var(--accent); }

/* =============================================
   PIN SCREEN
   ============================================= */

#pin-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

#pin-screen::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 65%);
  pointer-events: none;
}

.pin-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
}

.pin-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.pin-card h1 {
  font-size: 1.75rem;
  font-weight: 800;
}

.pin-card > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* PIN Felder */
.pin-inputs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 8px 0;
}

.pin-digit {
  width: 60px;
  height: 68px;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Inter', monospace;
}

.pin-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.2);
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.pin-digit.shake { animation: shake 0.4s ease; border-color: var(--red); }

/* Fehler */
.pin-error {
  color: var(--red);
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.2s;
  height: 18px;
}
.pin-error.visible { opacity: 1; }

/* Button */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }

.pin-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.pin-hint a {
  color: var(--accent);
  text-decoration: none;
}

/* =============================================
   PROJECT SCREEN
   ============================================= */

#project-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* Header */
#project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 44px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  flex-wrap: wrap;
}

.project-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.project-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.project-name-wrap strong {
  font-size: 0.8rem;
  color: var(--text);
}

.meta-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* Status Badge */
.status-badge {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.status-review   { background: rgba(246,201,14,0.15);  color: var(--yellow); border: 1px solid rgba(246,201,14,0.3); }
.status-approved { background: rgba(67,233,123,0.15);  color: var(--green);  border: 1px solid rgba(67,233,123,0.3); }
.status-progress { background: rgba(108,99,255,0.15);  color: var(--accent); border: 1px solid rgba(108,99,255,0.3); }

/* Header Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn-feedback {
  padding: 5px 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-feedback:hover { opacity: 0.85; }

.btn-logout {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn-logout:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* Note Bar */
#project-note-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: rgba(108,99,255,0.08);
  border-bottom: 1px solid rgba(108,99,255,0.15);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
#project-note-bar svg { color: var(--accent); flex-shrink: 0; }

/* iFrame */
#iframe-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#project-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Blocked Fallback */
#iframe-blocked {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.blocked-box {
  text-align: center;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.blocked-icon { font-size: 3rem; }
.blocked-box h3 { font-size: 1.3rem; font-weight: 700; }
.blocked-box p { color: var(--text-muted); line-height: 1.6; font-size: 0.9rem; }

.btn-external {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.btn-external:hover { opacity: 0.85; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .hide-mobile { display: none; }

  .project-meta {
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .project-name-wrap strong {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }
}

@media (max-width: 520px) {
  .pin-card { padding: 36px 24px; }
  .pin-digit { width: 52px; height: 58px; font-size: 1.5rem; }

  #project-header { height: auto; padding: 12px 16px; gap: 10px; }
  .header-actions { width: 100%; }
  .btn-feedback, .btn-logout { font-size: 0.78rem; padding: 6px 12px; }
}
