/* ==========================================================================
   YF 3D FAB // Mobil Sipariş Portalı Modern Industrial Glassmorphic CSS
   ========================================================================== */

:root {
  --bg-deep: #070b14;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-sub: rgba(30, 41, 59, 0.7);
  --bg-card-hover: rgba(51, 65, 85, 0.85);

  --border-light: rgba(56, 189, 248, 0.22);
  --border-glow: rgba(0, 240, 255, 0.5);

  --accent-cyan: #00f0ff;
  --accent-blue: #0284c7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.08);
  --shadow-btn: 0 4px 20px rgba(0, 240, 255, 0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
}

/* Ambient glow & grid */
.bg-glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.16) 0%, rgba(2, 132, 199, 0) 70%);
  top: -60px;
  right: -80px;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, rgba(0, 240, 255, 0) 70%);
  bottom: 10%;
  left: -100px;
}

.bg-grid-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* App Wrapper */
.portal-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 32px;
}

/* Header */
.portal-header {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 26px;
  color: var(--accent-cyan);
  text-shadow: 0 0 12px var(--accent-cyan);
  line-height: 1;
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.8px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

.brand-badge {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
}

/* Connection Pill */
.conn-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-light);
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  animation: pulse-dot 1.8s infinite;
}

.conn-dot.online {
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.conn-dot.offline {
  background: var(--accent-rose);
  animation: none;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.conn-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--text-main);
}

/* Channel Row */
.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
}

.channel-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.channel-chip:hover {
  color: var(--accent-cyan);
}

.chip-icon {
  font-size: 12px;
}

.chip-text strong {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.chip-edit-icon {
  font-size: 10px;
  opacity: 0.7;
}

.live-pulse-badge {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Main Section */
.portal-main {
  flex: 1;
}

/* Order Card */
.order-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Form Fields */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.3px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qty-hint {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.label-icon {
  font-size: 14px;
}

/* Text Input */
.input-wrap {
  position: relative;
  display: flex;
}

.text-input {
  width: 100%;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px;
  outline: none;
  transition: all 0.25s ease;
}

.text-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.text-input::placeholder {
  color: var(--text-dim);
  font-weight: 500;
}

/* Product Cards Grid */
.product-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.product-card {
  background: var(--bg-card-sub);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.product-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

.product-card.active {
  background: rgba(2, 132, 199, 0.16);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3), inset 0 0 12px rgba(0, 240, 255, 0.1);
  transform: translateY(-2px);
}

.p-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.p-icon {
  font-size: 22px;
}

.p-radio-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  color: transparent;
  transition: all 0.2s;
}

.product-card.active .p-radio-check {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #080c14;
}

.p-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.p-spec {
  font-size: 9.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.p-precision-tag {
  align-self: flex-start;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Stepper */
.stepper-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 6px;
}

.btn-step {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-step:active {
  transform: scale(0.92);
  background: var(--accent-blue);
}

.stepper-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stepper-number {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.stepper-unit {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-top: 2px;
}

/* Quick Qty Pills */
.quick-qty-pills {
  display: flex;
  gap: 8px;
}

.qty-pill {
  flex: 1;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-pill:hover {
  color: #fff;
  border-color: var(--accent-blue);
}

.qty-pill.active {
  background: var(--accent-blue);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

/* Material Pills */
.material-pills-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.mat-pill:hover {
  color: #fff;
  border-color: rgba(0, 240, 255, 0.4);
}

.mat-pill.active {
  background: rgba(2, 132, 199, 0.18);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.mat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-carbon { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.dot-pla { background: #10b981; box-shadow: 0 0 6px #10b981; }
.dot-nylon { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }

/* Custom Switch Toggle */
.custom-switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px dashed rgba(244, 63, 94, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.switch-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.switch-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
}

.switch-desc {
  font-size: 9.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.switch-wrap {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  transition: 0.3s;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch-wrap input:checked + .slider-round {
  background-color: var(--accent-rose);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.5);
}

.switch-wrap input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* Big Action Button */
.btn-submit-order {
  position: relative;
  background: linear-gradient(135deg, #0284c7 0%, #00f0ff 100%);
  border: none;
  border-radius: 14px;
  color: #080c14;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.6px;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-btn);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.btn-submit-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 240, 255, 0.55);
}

.btn-submit-order:active {
  transform: translateY(1px);
}

.btn-submit-icon {
  font-size: 18px;
}

/* Tracking Section */
.tracking-section {
  display: flex;
  flex-direction: column;
  animation: enter-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tracking-section.hidden {
  display: none;
}

@keyframes enter-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.tracking-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--accent-cyan);
  box-shadow: var(--shadow-card), 0 0 25px rgba(0, 240, 255, 0.2);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tracking-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.th-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 1.5s infinite;
}

.th-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.th-order-id {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  color: var(--accent-cyan);
}

.track-summary-box {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ts-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.ts-label {
  color: var(--text-dim);
}

.ts-val {
  color: #fff;
}

/* Timeline */
.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 6px;
}

.timeline-steps::before {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 20px;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.t-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.t-step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

.t-step-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t-step-info strong {
  font-size: 12px;
  color: var(--text-muted);
}

.t-step-info span {
  font-size: 10px;
  color: var(--text-dim);
}

.t-step.step-done .t-step-circle {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.t-step.step-done .t-step-info strong {
  color: #fff;
}

.t-step.step-active .t-step-circle {
  background: var(--accent-blue);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
  animation: pulse-dot 1.8s infinite;
}

.t-step.step-active .t-step-info strong {
  color: var(--accent-cyan);
}

/* Feedback Box */
.factory-live-msg-box {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.msg-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

/* New Order Button */
.btn-new-order {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  padding: 13px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-new-order:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #0f172a;
  border: 1px solid var(--accent-cyan);
  border-radius: 18px;
  width: 100%;
  max-width: 380px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.modal-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.btn-modal-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-save {
  background: var(--accent-cyan);
  border: none;
  color: #080c14;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* Footer */
.portal-footer {
  margin-top: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portal-footer p {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.portal-footer span {
  font-size: 9px;
  color: var(--text-dim);
}
