/* Phone2Pic App CSS */

:root {
  --p2p-primary: #556B2F;
  --p2p-primary-dark: #3D4F22;
  --p2p-primary-darker: #2A3617;
  --p2p-accent: #F2C94C;
  --p2p-accent-dark: #D9B23F;
  --p2p-dark-bg: #1F2A18;
  --p2p-dark-card: #2C3A22;
  --p2p-dark-card-2: #26321C;
  --p2p-dark-border: #475938;
  --p2p-dark-border-2: #5A6D44;
  --p2p-text-light: #F4F1E6;
  --p2p-text-muted: #B5BAA0;
  --p2p-text-dim: #7A8068;
}

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

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; }


.admin-container {
  min-height: 100vh;
  background: #F4F1E6;
}



.code-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}



.code-digit {
  width: 60px;
  height: 68px;
  border: 2px solid #e8e8f0;
  border-radius: 16px;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
  background: #fafaff;
  color: #1a1a2e;
}



.code-digit:focus {
  border-color: #556B2F;
  box-shadow: 0 0 0 4px rgba(85, 107, 47, 0.12);
  background: #fff;
}



.code-digit.filled {
  border-color: #556B2F;
  background: #fff;
  color: #556B2F;
}



@keyframes landingReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}



.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #556B2F;
}



.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}



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



.loading-text {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}



.admin-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #556B2F;
  padding: 24px;
}



.admin-login-card {
  background: #fff;
  border-radius: 20px;
  padding: 48px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  text-align: center;
}



.admin-login-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #556B2F;
  margin-bottom: 4px;
}



.admin-login-subtitle {
  font-size: 14px;
  color: #888;
  margin-bottom: 32px;
}



.admin-login-field {
  margin-bottom: 14px;
}



.admin-login-field input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8e8f0;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}



.admin-login-field input:focus {
  border-color: #556B2F;
}



.admin-login-error {
  color: #e74c3c;
  font-size: 13px;
  margin-bottom: 12px;
}



.admin-login-btn {
  width: 100%;
  padding: 14px;
  background: #556B2F;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
}



.admin-login-btn:hover {
  opacity: 0.9;
}



.admin-login-google {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  font-weight: 600;
}



.admin-login-google:hover {
  background: #f8f8f8;
  opacity: 1;
}



.admin-login-hint {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-top: 16px;
}



@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



.p2p-transition {
  animation: p2pFadeIn 0.25s ease-out;
  background: #1F2A18;
  min-height: 100vh;
}



@keyframes p2pFadeIn {
  from { opacity: 0.6; }
  to { opacity: 1; }
}



.p2p-page {
  min-height: 100vh;
  background: #1F2A18;
  color: #e2e8f0;
}



.p2p-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #2C3A22;
  border-bottom: 1px solid #475938;
  position: sticky;
  top: 0;
  z-index: 100;
}



.p2p-header-back {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}



.p2p-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}



.p2p-header-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}



.p2p-header-title {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}



.p2p-body {
  padding: 20px 16px 40px;
}



.p2p-hero {
  text-align: center;
  padding: 32px 0 24px;
}



.p2p-hero-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 16px;
  display: block;
}



.p2p-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
}



.p2p-hero-sub {
  font-size: 14px;
  color: #94a3b8;
}



.p2p-card {
  background: #2C3A22;
  border: 1px solid #475938;
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 16px;
}



.p2p-card-secondary {
  background: #26321C;
  border-color: #3A4A2D;
}



.p2p-card-center {
  text-align: center;
}



.p2p-qr-reader-container {
  margin: 12px auto 0;
  max-width: 300px;
  border-radius: 12px;
  overflow: hidden;
}



.p2p-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 6px;
}



.p2p-card-desc {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 16px;
}



.p2p-card .code-inputs {
  justify-content: center;
  margin: 16px 0;
}



.p2p-card .code-digit {
  background: #1F2A18;
  border: 2px solid #475938;
  color: #f8fafc;
  font-size: 24px;
  font-weight: 700;
  border-radius: 12px;
}



.p2p-card .code-digit.filled {
  border-color: #F2C94C;
}



.p2p-card .code-digit:focus {
  border-color: #F2C94C;
  outline: none;
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.2);
}



.p2p-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}



.p2p-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}



.p2p-btn-primary {
  background: #F2C94C;
  color: #fff;
}



.p2p-btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 201, 76, 0.3);
}



.p2p-btn-outline {
  background: transparent;
  border: 2px solid #5A6D44;
  color: #e2e8f0;
}



.p2p-btn-outline:not(:disabled):hover {
  border-color: #F2C94C;
  color: #F2C94C;
}



.p2p-btn-small {
  padding: 6px 14px;
  border: 1px solid #5A6D44;
  border-radius: 8px;
  background: #2C3A22;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
}



.p2p-btn-small:hover {
  border-color: #F2C94C;
  color: #F2C94C;
}



.p2p-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin: 12px 0;
}



.p2p-status-loading {
  color: #94a3b8;
}



.p2p-status-error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}



.p2p-status-found {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}



.p2p-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
}



.p2p-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #475938;
}



.p2p-divider span {
  position: relative;
  background: #1F2A18;
  padding: 0 16px;
  color: #64748b;
  font-size: 13px;
}



.p2p-footer {
  text-align: center;
  padding: 32px 0 16px;
  font-size: 12px;
  color: #5A6D44;
}



.p2p-footer strong {
  color: #64748b;
}



.p2p-station-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 10px;
  font-size: 13px;
  color: #4ade80;
  margin-bottom: 24px;
}



.p2p-section-title {
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}



.p2p-section-desc {
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 20px;
}



.p2p-size-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}



.p2p-size-card {
  background: #2C3A22;
  border: 2px solid #475938;
  border-radius: 16px;
  padding: 20px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}



.p2p-size-card:hover {
  border-color: #F2C94C;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(242, 201, 76, 0.15);
}



.p2p-size-card:active {
  transform: scale(0.97);
}



.p2p-size-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}



.p2p-size-rect {
  background: #475938;
  border: 1px solid #5A6D44;
  border-radius: 4px;
}



.p2p-size-split-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}



.p2p-split-sheet {
  width: 90px;
  border: 1.5px solid #F2C94C;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(242, 201, 76, 0.05);
}



.p2p-split-half {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  color: #94a3b8;
}



.p2p-split-half span {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}



.p2p-split-half-a {
  color: #60a5fa;
}



.p2p-split-half-b {
  color: #f472b6;
}



.p2p-split-cut-line {
  border-top: 1.5px dashed #F2C94C;
  text-align: center;
  line-height: 0;
}



.p2p-split-cut-line span {
  background: #2C3A22;
  padding: 0 6px;
  font-size: 7px;
  color: #F2C94C;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  top: -1px;
}



.p2p-split-sheet-label {
  font-size: 9px;
  color: #64748b;
  font-weight: 500;
}



.p2p-size-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}



.p2p-size-label {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
}



.p2p-size-sub {
  font-size: 11px;
  color: #64748b;
}



.p2p-size-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #F2C94C;
  color: #1F2A18;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}



.p2p-size-info-box {
  background: #2C3A22;
  border: 1px solid #475938;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.6;
}



.p2p-upload-header {
  margin-bottom: 8px;
}



.p2p-upload-slot {
  margin-bottom: 16px;
  position: relative;
}



.p2p-upload-slot-label {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 8px;
}



.p2p-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border: 2px dashed #5A6D44;
  border-radius: 16px;
  background: #2C3A22;
  color: #64748b;
  cursor: pointer;
  padding: 32px;
  transition: all 0.2s;
  min-height: 140px;
}



.p2p-upload-zone:hover {
  border-color: #F2C94C;
  color: #F2C94C;
}



.p2p-upload-zone span {
  font-size: 14px;
  font-weight: 500;
}



.p2p-upload-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}



.p2p-upload-split {
  margin-bottom: 16px;
}



.p2p-upload-split-divider {
  text-align: center;
  padding: 8px 0;
  color: #5A6D44;
  font-size: 11px;
  letter-spacing: 2px;
}



.p2p-upload-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(242, 201, 76, 0.08);
  border: 1px solid rgba(242, 201, 76, 0.15);
  border-radius: 10px;
  font-size: 12px;
  color: #F2C94C;
  margin-bottom: 20px;
}



.p2p-bottom-actions {
  position: sticky;
  bottom: 16px;
  padding-top: 8px;
}



.p2p-multi-upload {
  position: relative;
}



.p2p-multi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}



.p2p-multi-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #475938;
  cursor: pointer;
  transition: border-color 0.15s;
}



.p2p-multi-thumb.active {
  border-color: #F2C94C;
}



.p2p-multi-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.p2p-multi-thumb-num {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}



.p2p-multi-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.85);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}



.p2p-multi-add {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 2px dashed #5A6D44;
  background: transparent;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: border-color 0.15s, color 0.15s;
}



.p2p-multi-add:hover {
  border-color: #94a3b8;
  color: #94a3b8;
}



.p2p-multi-count {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}



.p2p-multi-editor {
  margin-bottom: 16px;
}



.p2p-btn-small-danger {
  color: #f87171 !important;
}



.p2p-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px;
}



.p2p-preview-grid-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}



.p2p-preview-grid-item img {
  width: 100%;
  display: block;
}



.p2p-preview-grid-num {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}



.photo-cropper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #475938;
  background: #2C3A22;
}



.photo-cropper-reset {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 11px;
  cursor: pointer;
}



.photo-cropper-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 4px;
}



.photo-cropper-zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #5A6D44;
  background: #2C3A22;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}



.photo-cropper-zoom-btn:disabled {
  opacity: 0.3;
  cursor: default;
}



.photo-cropper-zoom-label {
  font-size: 12px;
  color: #94a3b8;
  min-width: 40px;
  text-align: center;
}



.photo-cropper-reset-btn {
  padding: 4px 12px;
  border-radius: 6px;
  background: #475938;
  color: #e2e8f0;
  border: none;
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}



.p2p-preview-card {
  background: #2C3A22;
  border: 1px solid #475938;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}



.p2p-preview-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}



.p2p-preview-size {
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
}



.p2p-preview-mm {
  font-size: 12px;
  color: #64748b;
}



.p2p-preview-image {
  border-radius: 8px;
  overflow: hidden;
  background: #1F2A18;
}



.p2p-preview-image img {
  width: 100%;
  display: block;
}



.p2p-preview-loading {
  padding: 40px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}



.p2p-approve-section {
  margin-top: 8px;
}



.p2p-approve-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}



.p2p-approve-tab {
  flex: 1;
  padding: 10px;
  border: 1px solid #475938;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}



.p2p-approve-tab.active {
  background: #F2C94C;
  border-color: #F2C94C;
  color: #1F2A18;
}



.p2p-sending {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  color: #94a3b8;
  font-size: 14px;
}



.p2p-complete-card {
  text-align: center;
  padding: 48px 20px 32px;
}



.p2p-complete-icon {
  margin-bottom: 20px;
}



.p2p-complete-title {
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 12px;
}



.p2p-complete-desc {
  font-size: 16px;
  color: #94a3b8;
  margin-bottom: 8px;
}



.p2p-complete-sub {
  font-size: 13px;
  color: #64748b;
}



.p2p-logs-tabs {
  display: flex;
  gap: 0;
  margin: 16px 24px 0;
  border-bottom: 2px solid #e2e8f0;
}



.p2p-logs-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}



.p2p-logs-tab.active {
  color: #556B2F;
  border-bottom-color: #556B2F;
}



.p2p-stats-grid {
  padding: 16px 24px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}



.p2p-stat-card {
  flex: 1 1 140px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}



.p2p-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #2C3A22;
}



.p2p-stat-label {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}



.p2p-stat-section {
  flex-basis: 100%;
  background: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}



.p2p-stat-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: #475938;
  margin-bottom: 10px;
}



.p2p-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}



.p2p-log-table th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}



.p2p-log-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #475938;
}



.p2p-log-table tbody tr:hover {
  background: #f8fafc;
}



.p2p-logs-filters {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
}



.p2p-logs-filters select {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #475938;
  background: #fff;
  flex: 1;
}



.p2p-logs-table-wrap {
  padding: 0 24px 32px;
  overflow-x: auto;
}



.p2p-log-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}



.p2p-log-code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}



.p2p-log-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}



.p2p-log-status-sent {
  background: #dcfce7;
  color: #16a34a;
}



.p2p-log-status-error {
  background: #fef2f2;
  color: #dc2626;
}



.p2p-log-error {
  background: #fef2f2;
}



.p2p-log-err-msg {
  font-size: 11px;
  color: #dc2626;
  margin-top: 2px;
}



.p2p-log-uid {
  font-family: monospace;
  font-size: 12px;
  color: #94a3b8;
}



@keyframes sg-fade-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}



.p2p-version-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #556B2F;
  background: rgba(85, 107, 47, 0.15);
  border-radius: 20px;
  letter-spacing: 1px;
}



.p2p-v2-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}



.p2p-v2-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
}



.p2p-v2-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.p2p-v2-photo-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
}



.p2p-v2-assign-preview.editable {
  cursor: pointer;
}



.p2p-v2-edit-hint {
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 2px 0;
  pointer-events: none;
}



.p2p-v2-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: rgba(239, 68, 68, 0.8);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}



.p2p-v2-assign-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}



.p2p-v2-assign-item {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 12px;
}



.p2p-v2-assign-item.expanded {
  border-color: rgba(85, 107, 47, 0.4);
}



.p2p-v2-assign-card {
  display: flex;
  gap: 12px;
  align-items: stretch;
}



.p2p-v2-assign-preview {
  position: relative;
  flex: 1;
  min-height: 140px;
  border-radius: 10px;
  overflow: hidden;
  background: #2C3A22;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}



.p2p-v2-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: rgba(239, 68, 68, 0.8);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
}



.p2p-v2-assign-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 110px;
  flex-shrink: 0;
}



.p2p-v2-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}



.p2p-v2-ctrl-btn:hover {
  background: rgba(255,255,255,0.12);
}



.p2p-v2-ctrl-label {
  white-space: nowrap;
}



.p2p-v2-ctrl-btn.highlight {
  border-color: #556B2F;
  color: #556B2F;
  animation: p2p-pulse 2s ease-in-out infinite;
}



@keyframes p2p-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(85, 107, 47, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(85, 107, 47, 0.15); }
}



.p2p-v2-ctrl-btn.disabled,



.p2p-v2-ctrl-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}



.p2p-v2-fill-toggle.disabled {
  opacity: 0.3;
  pointer-events: none;
}



.p2p-v2-size-dropdown {
  position: relative;
}



.p2p-v2-size-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  background: #2C3A22;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}



.p2p-v2-size-dropdown.open-up .p2p-v2-size-menu {
  top: auto;
  bottom: calc(100% + 4px);
}



.p2p-v2-size-option {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}



.p2p-v2-size-option:last-child {
  border-bottom: none;
}



.p2p-v2-size-option:hover {
  background: rgba(255,255,255,0.08);
}



.p2p-v2-size-option.active {
  background: rgba(85, 107, 47, 0.2);
}



.p2p-v2-size-option-label {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}



.p2p-v2-size-option-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}



.p2p-v2-preview-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}



.p2p-v2-preview-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}



.p2p-v2-preview-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2C3A22;
}



.p2p-v2-preview-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}



.p2p-v2-fill-toggle {
  display: flex;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}



.p2p-v2-fill-btn {
  flex: 1;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}



.p2p-v2-fill-btn + .p2p-v2-fill-btn {
  border-left: 1px solid rgba(255,255,255,0.15);
}



.p2p-v2-fill-btn.active {
  color: #fff;
  background: #556B2F;
}



.p2p-v2-editor-label {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 8px;
}



.p2p-v2-assign-editor {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}



.p2p-v2-cropper {
  border-radius: 10px;
  overflow: hidden;
}



.p2p-v2-editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}



.p2p-v2-assign-hint {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  padding: 20px 0;
}



.p2p-v2-sheets-summary {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  padding: 8px 0 12px;
}



.p2p-v2-sheets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}



.p2p-v2-sheet-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 12px;
}



.p2p-v2-sheet-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}



.p2p-v2-sheet-num {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
}



.p2p-v2-sheet-size {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}



.p2p-v2-sheet-badge {
  font-size: 11px;
  font-weight: 600;
  color: #556B2F;
  background: rgba(85, 107, 47, 0.15);
  padding: 2px 8px;
  border-radius: 10px;
}



.p2p-v2-sheet-preview {
  border-radius: 10px;
  overflow: hidden;
  background: #2C3A22;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}



.p2p-v2-sheet-preview img {
  width: 100%;
  display: block;
  border-radius: 8px;
}



.p2p-v2-menu-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 20px 0 16px;
}



.p2p-v2-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}



.p2p-v2-menu-card {
  background: #2C3A22;
  border: 2px solid #475938;
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}



.p2p-v2-menu-card:active {
  transform: scale(0.97);
  border-color: #556B2F;
}



.p2p-v2-menu-icon {
  color: #94a3b8;
  margin-bottom: 12px;
}



.p2p-v2-menu-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}



.p2p-v2-menu-card-desc {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}



.p2p-v2-id-upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 32px 16px;
  border: 2px dashed #5A6D44;
  border-radius: 12px;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  transition: border-color 0.2s;
}



.p2p-v2-id-upload-btn:active {
  border-color: #556B2F;
}



.p2p-v2-id-preview-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}



.p2p-v2-id-preview-img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #475938;
}



.p2p-v2-id-layout-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}



.p2p-v2-id-layout-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid #475938;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
}



.p2p-v2-id-layout-option.active {
  border-color: #556B2F;
  background: rgba(85, 107, 47, 0.08);
}



.p2p-v2-id-layout-grid {
  display: grid;
  gap: 2px;
  width: 48px;
  height: 36px;
  flex-shrink: 0;
}



.p2p-v2-id-layout-cell {
  background: #5A6D44;
  border-radius: 2px;
}



.p2p-v2-id-layout-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}



.p2p-v2-id-layout-info strong {
  font-size: 14px;
}



.p2p-v2-id-layout-info span {
  font-size: 12px;
  color: #94a3b8;
}



.p2p-v2-id-sheet-preview {
  margin: 12px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #475938;
  background: #fff;
}



.p2p-v2-id-sheet-preview img {
  width: 100%;
  display: block;
}



.p2p-v2-id-spec-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}



.p2p-v2-id-spec-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border: 2px solid #475938;
  border-radius: 10px;
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s;
}



.p2p-v2-id-spec-btn.active {
  border-color: #556B2F;
  background: rgba(85, 107, 47, 0.08);
}



.p2p-v2-id-spec-btn strong {
  font-size: 14px;
}



.p2p-v2-id-spec-btn span {
  font-size: 12px;
  color: #94a3b8;
}



.p2p-v2-id-crop-container {
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #475938;
  position: relative;
}



.p2p-v2-id-layout-note {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 12px;
}



.p2p-v2-id-mode-select {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}



.p2p-v2-id-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 16px;
  border: 2px solid #475938;
  border-radius: 12px;
  background: #2C3A22;
  color: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}



.p2p-v2-id-mode-btn:active {
  background: #475938;
}



.p2p-v2-id-mode-btn strong {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}



.p2p-v2-id-mode-btn span {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}



.p2p-v2-id-mode-btn-ai {
  border-color: #556B2F;
  background: #2C3A22;
}



.p2p-v2-id-mode-btn-ai:active {
  background: #3D4F22;
}



.p2p-v2-id-mode-btn-ai svg {
  color: #7A8B4A;
}



.p2p-v2-id-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  gap: 12px;
}



.p2p-v2-id-processing-text {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}



.p2p-v2-id-processing-bar {
  width: 100%;
  max-width: 260px;
}



.p2p-v2-id-ai-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #22c55e;
  padding: 6px 10px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 6px;
  margin-bottom: 6px;
}



.p2p-v2-id-ai-badge-warn {
  color: #F2C94C;
  background: rgba(242, 201, 76, 0.08);
}


