/* ============================================
   DTF Price Calculator - RinsKreations.com
   Shared Styles
   ============================================ */

:root {
  --primary: #e91e63;
  --primary-dark: #c2185b;
  --primary-light: #f8bbd0;
  --secondary: #1a1a2e;
  --secondary-light: #16213e;
  --accent: #f50057;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --text: #212121;
  --text-light: #757575;
  --border: #e0e0e0;
  --success: #4caf50;
  --warning: #ff9800;
  --error: #f44336;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.header h1 span {
  color: var(--primary);
}

.header p {
  font-size: 0.95rem;
  opacity: 0.8;
}

/* Container */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tabs */
.tabs {
  display: flex;
  background: var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: calc(var(--radius) - 2px);
  transition: all 0.2s ease;
  color: var(--text-light);
}

.tab-btn.active {
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form elements */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text);
}

.form-group select,
.form-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  font-size: 1rem;
  transition: border-color 0.2s;
  background: white;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Price result */
.price-result {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-top: 1rem;
}

.price-result .total-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-light);
  margin: 0.5rem 0;
}

.price-result .price-detail {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0.25rem 0;
}

.price-result .price-breakdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.price-result .breakdown-item {
  text-align: center;
}

.price-result .breakdown-item .value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-light);
}

.price-result .breakdown-item .label {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Pricing table */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.pricing-table th,
.pricing-table td {
  padding: 0.6rem 0.8rem;
  text-align: center;
  border: 1px solid var(--border);
}

.pricing-table th {
  background: var(--secondary);
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
}

.pricing-table td {
  background: white;
}

.pricing-table tr:nth-child(even) td {
  background: #f9f9f9;
}

.pricing-table .highlight {
  background: var(--primary-light) !important;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Gang sheet visual */
.gang-sheet-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.gang-sheet-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gang-sheet-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.gang-sheet-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.gang-sheet-card .sheet-size {
  font-weight: 700;
  font-size: 1rem;
  color: var(--secondary);
}

.gang-sheet-card .sheet-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.5rem 0;
}

.gang-sheet-card .sheet-detail {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Notes */
.notes-bar {
  text-align: center;
  padding: 1rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-light);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Admin-specific styles */
.admin-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
}

.admin-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-nav-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.admin-nav-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

/* Admin table editing */
.price-input {
  width: 80px;
  padding: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}

.price-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

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

.btn-outline {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--warning); }

/* Login overlay */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.login-box {
  background: white;
  border-radius: var(--radius);
  padding: 2rem;
  width: 90%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-box h2 {
  margin-bottom: 1rem;
  color: var(--secondary);
  justify-content: center;
}

.login-box .form-group {
  text-align: left;
}

.login-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

/* Responsive */
@media (max-width: 600px) {
  .header h1 { font-size: 1.4rem; }
  .form-row { grid-template-columns: 1fr; }
  .price-result .total-price { font-size: 2rem; }
  .price-result .price-breakdown { flex-direction: column; gap: 0.75rem; }
  .gang-sheet-cards { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 0.75rem; }
}
