:root {
  --pink: #e91e8c;
  --pink-light: #f8b4d9;
  --pink-bg: #fff0f8;
  --gold: #f4c842;
  --dark: #2d1a2e;
  --gray: #6b7280;
  --gray-light: #f3f4f6;
  --error: #dc2626;
  --error-bg: #fef2f2;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(233,30,140,0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--pink-bg);
  color: var(--dark);
  min-height: 100vh;
  line-height: 1.5;
}

/* LOGIN */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}

.logo-area {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.logo-area h1 {
  font-size: 1.5rem;
  color: var(--pink);
  font-weight: 700;
}

.subtitle {
  color: var(--gray);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* HEADER */
header {
  background: white;
  border-bottom: 2px solid var(--pink-light);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  font-size: 1.25rem;
  color: var(--pink);
  flex: 1;
}

header .logo-icon {
  font-size: 1.5rem;
}

.logout-link {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  transition: all 0.2s;
}

.logout-link:hover {
  background: var(--gray-light);
  color: var(--dark);
}

/* MAIN */
main {
  padding: 1.5rem 1rem;
  max-width: 680px;
  margin: 0 auto;
}

/* CARD */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
}

.card h2 {
  font-size: 1.35rem;
  color: var(--pink);
  margin-bottom: 0.5rem;
}

.description {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* FORM */
.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  color: var(--dark);
}

.required { color: var(--pink); }
.optional { color: var(--gray); font-weight: normal; font-size: 0.8rem; }

textarea {
  width: 100%;
  border: 2px solid var(--pink-light);
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--pink);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  border: 2px solid var(--pink-light);
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--pink);
}

/* FILE DROP */
.file-drop {
  position: relative;
  border: 2px dashed var(--pink-light);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--pink-bg);
}

.file-drop:hover,
.file-drop.drag-over {
  border-color: var(--pink);
  background: #fff0f8cc;
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
}

.drop-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.25rem;
}

.file-drop-label span {
  font-size: 0.875rem;
  color: var(--gray);
}

.file-hint {
  font-size: 0.75rem !important;
  color: #9ca3af !important;
}

/* FILE PREVIEW */
.file-preview {
  margin-top: 0.75rem;
  pointer-events: none;
}

.file-preview img {
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: block;
  margin: 0 auto;
}

.multi-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.multi-preview img {
  max-height: 100px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* BUTTONS */
.btn-primary {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: var(--pink);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  background: #c91678;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(233,30,140,0.3);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: white;
  color: var(--pink);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--pink);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--pink-bg);
}

/* ERROR */
.error-box {
  background: var(--error-bg);
  border: 1px solid #fca5a5;
  color: var(--error);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* RESULT */
.result-card h2 { margin-bottom: 0.25rem; }

.result-image-wrap {
  margin: 1.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.result-image {
  width: 100%;
  display: block;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.result-tip {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #92400e;
}

@media (min-width: 480px) {
  .result-actions {
    flex-direction: row;
  }
  .result-actions a {
    flex: 1;
  }
}
