/* --------------------------------------------
   Seattle Wedding Films Portal - FINAL STYLES
   ✅ Gold branding | ✅ Contract styling | ✅ Complete
--------------------------------------------- */

:root {
  --black: #000;
  --white: #fff;
  --emerald: #2ECC71;
  --error: #ff4f4f;
  --warning: #FFA500;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  min-height: 100vh;
}

/* ===== HEADER ===== */
header.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 30px;
  border-bottom: 1px solid rgba(46,204,113,0.3);
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  height: 45px;
  transition: var(--transition);
}

.logo:hover {
  opacity: 0.8;
}

.logo-link {
  text-decoration: none;
}

/* ===== TYPOGRAPHY ===== */
.title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--white);
  text-align: center;
  margin: 0 0 10px 0;
}

.subtitle {
  text-align: center;
  color: rgba(255,255,255,0.75);
  margin: 0 0 20px 0;
  line-height: 1.6;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary,
.btn-text {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  transition: var(--transition);
  text-align: center;
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--emerald);
  color: var(--black);
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
  background: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46,204,113,0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--emerald);
  border: 1px solid var(--emerald);
  padding: 10px 20px;
  font-size: 1rem;
}

.btn-secondary:hover {
  background: var(--emerald);
  color: var(--black);
}

.btn-text {
  background: transparent;
  color: var(--emerald);
  border: none;
  padding: 8px 12px;
  font-size: 0.95rem;
}

.btn-text:hover {
  color: #27ae60;
  text-decoration: underline;
}

/* ===== FORMS ===== */
.login-form,
.contract-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 450px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

label {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  margin-bottom: -10px;
}

input,
select,
textarea {
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid rgba(46,204,113,0.3);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--emerald);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(46,204,113,0.1);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
}

/* ===== MESSAGES ===== */
.error-message,
.form-message {
  text-align: center;
  margin-top: 8px;
  font-size: 0.95rem;
  padding: 8px;
  border-radius: 4px;
  transition: var(--transition);
}

.error-message,
.form-message.error {
  color: var(--error);
  background: rgba(255,79,79,0.1);
}

.form-message.success {
  color: var(--emerald);
  background: rgba(46,204,113,0.1);
}

/* ===== LAYOUTS ===== */
.center-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
  padding: 40px 20px;
  text-align: center;
}

.portal-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== DASHBOARD ===== */
.dashboard {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.contracts-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.contracts-table th,
.contracts-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(46,204,113,0.2);
  text-align: left;
}

.contracts-table th {
  background: rgba(46,204,113,0.15);
  font-weight: 500;
  color: var(--emerald);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.contracts-table tr:last-child td {
  border-bottom: none;
}

.contracts-table tbody tr {
  transition: var(--transition);
}

.contracts-table tbody tr:hover {
  background: rgba(46,204,113,0.05);
}

/* ===== FORM PAGE ===== */
.form-page {
  max-width: 650px;
  margin: 40px auto;
  padding: 40px 20px;
}

/* ===== CONTRACT CONTENT ===== */
.contract-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}

.contract-content {
  line-height: 1.8;
  background: rgba(46,204,113,0.05);
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 40px;
  border: 1px solid rgba(46,204,113,0.2);
}

.contract-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--emerald);
  padding-bottom: 20px;
}

.contract-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--emerald);
  margin: 0 0 10px 0;
  letter-spacing: 2px;
}

.contract-subtitle {
  color: var(--emerald);
  font-size: 0.9rem;
  margin: 0 0 20px 0;
}

.contract-heading {
  color: var(--emerald);
  font-size: 1.3rem;
  margin: 10px 0 0 0;
  letter-spacing: 1px;
}

.contract-details {
  background: rgba(0,0,0,0.3);
  border-left: 3px solid var(--emerald);
  padding: 20px;
  margin: 20px 0;
  border-radius: 6px;
}

.contract-details p {
  margin: 8px 0;
  font-size: 1rem;
}

.contract-details .label {
  color: var(--emerald);
  font-weight: 600;
  display: inline-block;
  min-width: 150px;
}

.contract-section {
  margin: 25px 0;
}

.contract-section h3 {
  color: var(--emerald);
  font-size: 1.1rem;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.contract-section p,
.contract-section ul {
  margin: 8px 0;
  line-height: 1.6;
}

.contract-section ul {
  padding-left: 20px;
}

.contract-section li {
  margin: 5px 0;
}

.contract-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

/* ===== SIGNATURE SECTION ===== */
.signature-section {
  text-align: center;
  background: rgba(46,204,113,0.05);
  padding: 30px;
  border-radius: 10px;
  border: 1px solid rgba(46,204,113,0.2);
}

.name-input-group {
  margin: 20px 0 30px 0;
  text-align: left;
}

.name-input-group label {
  display: block;
  color: var(--emerald);
  font-weight: 500;
  margin-bottom: 10px;
  font-size: 1rem;
}

.name-input-group input {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: block;
  font-size: 1.1rem;
  padding: 15px;
  text-align: center;
}

.signature-label {
  color: var(--emerald);
  margin: 20px 0 10px 0;
  font-size: 1.1rem;
}

.signature-pad {
  background: var(--black);
  border: 2px solid var(--emerald);
  border-radius: 8px;
  margin: 20px auto;
  display: block;
  max-width: 100%;
  height: 150px;
  touch-action: none;
  cursor: crosshair;
}

.signature-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.signature-date {
  color: var(--emerald);
  font-size: 0.95rem;
  margin: 15px 0;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(46,204,113,0.2);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  header.header {
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
  }

  .logo {
    height: 38px;
  }

  .dashboard {
    padding: 20px 15px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .contracts-table {
    font-size: 0.85rem;
  }

  .contracts-table th,
  .contracts-table td {
    padding: 12px 8px;
  }

  .contracts-table th:nth-child(2),
  .contracts-table td:nth-child(2) {
    display: none;
  }

  .contract-content {
    padding: 20px;
  }

  .contract-title {
    font-size: 1.5rem;
  }

  .signature-section {
    padding: 20px 15px;
  }

  .signature-pad {
    width: 100%;
    height: 120px;
  }

  .portal-actions {
    flex-direction: column;
    width: 100%;
  }

  .portal-actions .btn-primary,
  .portal-actions .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .contracts-table th:nth-child(5),
  .contracts-table td:nth-child(5) {
    display: none;
  }

  .contract-title {
    font-size: 1.3rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  header.header,
  .signature-controls,
  .btn-primary,
  .btn-secondary,
  .btn-text {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .contract-content {
    background: white;
    border: 1px solid #000;
  }
}
