/* ===================================================
   BOOTHIE PHOTO PRINT — CSS Variables & Reset
   =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  --pink:        #ff6b9d;
  --pink-dark:   #e8437d;
  --pink2:       #ff4d8d;
  --pink-light:  #ffb3cc;
  --pink-pale:   #fff0f5;
  --pink-bg:     #fdf4f7;
  --peach:       #ffccd5;
  --text:        #3d1c35;
  --text-mid:    #6b4460;
  --muted:       #9c7a93;
  --border:      #f0d0dd;
  --white:       #ffffff;
  --yellow-bg:   #fffbe6;
  --yellow:      #ffd046;
  --green-bg:    #e8faf0;
  --green:       #2ecc71;
  --blue-bg:     #eff6ff;
  --blue:        #3b82f6;
  --purple-bg:   #f5f0ff;
  --purple:      #8b5cf6;
  --red-bg:      #fff0f0;
  --red:         #ef4444;
  --radius:      14px;
  --radius-sm:   10px;
  --radius-xs:   6px;
  --shadow:      0 4px 20px rgba(255,107,157,.1);
  --shadow-md:   0 8px 32px rgba(255,107,157,.16);
  --shadow-lg:   0 16px 56px rgba(255,107,157,.22);
  --sidebar-w:   230px;
  --topbar-h:    64px;
  --transition:  .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--pink-bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: 'Nunito', sans-serif; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: 'Nunito', sans-serif; outline: none; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--pink-pale); }
::-webkit-scrollbar-thumb { background: var(--pink-light); border-radius: 4px; }

/* ===== SHARED COMPONENTS ===== */

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 50px; font-weight: 700; font-size: 14px; transition: all var(--transition); }
.btn-primary { background: var(--pink); color: var(--white); box-shadow: 0 4px 14px rgba(255,107,157,.4); }
.btn-primary:hover { background: var(--pink-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,157,.5); }
.btn-secondary { background: var(--white); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--pink); color: var(--pink); }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 14px; }
.btn-ghost:hover { background: var(--pink-pale); color: var(--pink); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: var(--red); color: white; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-xs { padding: 5px 10px; font-size: 11px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.btn-icon-sm { width: 30px; height: 30px; padding: 0; border-radius: 50%; font-size: 13px; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1.5px solid var(--border); }
.card-sm { padding: 14px; }
.card-title { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* Inputs */
.input { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; color: var(--text); transition: border var(--transition); background: var(--white); }
.input:focus { border-color: var(--pink); }
.input::placeholder { color: var(--muted); }
.input-sm { padding: 7px 12px; font-size: 13px; }
.textarea { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; color: var(--text); resize: vertical; min-height: 80px; transition: border var(--transition); background: var(--white); }
.textarea:focus { border-color: var(--pink); }
.select { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; color: var(--text); background: var(--white); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239c7a93' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select:focus { border-color: var(--pink); }

/* Labels */
.label { display: block; font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

/* Status badges */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; }
.badge-pending  { background: #fff8e6; color: #e67e22; border: 1px solid #ffe0a0; }
.badge-processing { background: #eff6ff; color: #3b82f6; border: 1px solid #bfdbfe; }
.badge-printing { background: var(--purple-bg); color: var(--purple); border: 1px solid #ddd6fe; }
.badge-shipping { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-done     { background: #e8faf0; color: #059669; border: 1px solid #a7f3d0; }
.badge-cancel   { background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }
.badge-member   { background: var(--pink-pale); color: var(--pink); border: 1px solid var(--pink-light); }
.badge-new      { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 900; color: var(--text); display: flex; align-items: center; gap: 8px; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; font-weight: 600; }

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: white; padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); animation: slideInRight .3s ease; max-width: 300px; display: flex; align-items: center; gap: 8px; }
.toast.success { background: #059669; }
.toast.error   { background: var(--red); }
.toast.info    { background: var(--blue); }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(61,28,53,.45); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn .25s ease; }
@keyframes modalIn { from { transform: scale(.94) translateY(16px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.modal-header { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 17px; font-weight: 900; }
.modal-close { width: 30px; height: 30px; border-radius: 50%; background: var(--pink-pale); color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--pink); color: white; }
.modal-body { padding: 16px 24px; }
.modal-footer { padding: 12px 24px 20px; display: flex; gap: 10px; border-top: 1px solid var(--border); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { border-bottom: 2px solid var(--border); }
thead th { padding: 10px 12px; text-align: left; font-weight: 800; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:hover { background: var(--pink-pale); }
tbody td { padding: 12px; vertical-align: middle; }

/* Form row */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--pink-pale); border-radius: 50px; padding: 4px; }
.tab { padding: 7px 16px; border-radius: 50px; font-size: 13px; font-weight: 700; color: var(--muted); transition: all var(--transition); background: none; border: none; white-space: nowrap; }
.tab.active { background: var(--pink); color: white; }
.tabs-line { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-line { padding: 10px 18px; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -2px; background: none; }
.tab-line.active { color: var(--pink); border-bottom-color: var(--pink); }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 20px; }
.page-btn { width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--white); color: var(--text); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.page-btn.active, .page-btn:hover { background: var(--pink); color: white; border-color: var(--pink); }

/* Avatar */
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--pink-pale); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--pink); flex-shrink: 0; }

/* Switch toggle */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 50px; transition: .3s; }
.slider:before { position: absolute; content: ''; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
input:checked + .slider { background: var(--pink); }
input:checked + .slider:before { transform: translateX(20px); }

/* Responsive */
@media (max-width: 768px) {
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}
