* { box-sizing: border-box; }
body {
  font-family: 'Sarabun', sans-serif;
  background-color: #f1f5f9;
  margin: 0; padding: 0; color: #1e293b;
}

nav {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  min-height: 80px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; position: sticky; top: 0; z-index: 1000;
}
.flex-nav { display: flex; align-items: center; gap: 28px; }
nav a:not(.flex-nav a) { display: flex; align-items: center; }
.flex-nav a {
  text-decoration: none; color: #1e293b; font-weight: 600; font-size: 15px; transition: color 0.2s;
}
.flex-nav a:hover { color: #2563eb; }

.btn-logout {
  background: #ef4444; color: white; border: none; padding: 10px 18px;
  border-radius: 8px; cursor: pointer; font-family: 'Sarabun', sans-serif;
  font-weight: 600; font-size: 14px; transition: background 0.2s;
}
.btn-logout:hover { background: #dc2626; }

.profile-layout {
  display: flex; gap: 30px;
  max-width: 1200px; margin: 40px auto; padding: 0 20px;
  align-items: flex-start;
}

/* Sidebar */
.profile-sidebar {
  width: 280px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 20px;
}
.user-card {
  background: white; border-radius: 12px; padding: 30px 20px;
  text-align: center; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  border: 1px solid #e8ecf1;
}
.avatar-large {
  width: 80px; height: 80px; border-radius: 50%; background: #2563eb;
  color: white; font-size: 32px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}
.user-card h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #0f172a; }
.user-card p { margin: 0; color: #64748b; font-size: 14px; word-break: break-all; }

.sidebar-menu {
  background: white; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); display: flex; flex-direction: column;
  border: 1px solid #e8ecf1;
}
.menu-btn {
  background: transparent; border: none; padding: 16px 20px;
  text-align: left; font-size: 15px; font-family: 'Sarabun', sans-serif;
  cursor: pointer; border-bottom: 1px solid #f1f5f9; color: #475569;
  font-weight: 500; transition: all 0.2s;
}
.menu-btn:last-child { border-bottom: none; }
.menu-btn:hover { background: #f8fafc; color: #2563eb; }
.menu-btn.active { 
  background: #eff6ff; color: #2563eb; 
  border-left: 4px solid #2563eb; font-weight: 600; 
  padding-left: 16px; 
}

/* Main Content */
.profile-content {
  flex: 1; min-width: 0;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.tab-pane h2 { margin: 0 0 20px 0; font-size: 24px; color: #0f172a; font-weight: 700; }

.card {
  background: white; border-radius: 12px; padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  border: 1px solid #e8ecf1;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.form-group input { 
  width: 100%; max-width: 450px; padding: 12px 16px; border: 1px solid #cbd5e1;
  border-radius: 8px; font-family: 'Sarabun', sans-serif; outline: none; transition: border 0.2s;
  font-size: 15px;
}
.form-group input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

.btn-primary {
  background: #2563eb; color: white; border: none; padding: 12px 28px;
  font-family: 'Sarabun', sans-serif; font-size: 15px; font-weight: 600; 
  border-radius: 8px; cursor: pointer; transition: background 0.2s; margin-top: 16px;
}
.btn-primary:hover { background: #1d4ed8; }

/* Tables */
.table-responsive { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 16px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
th { background: #f8fafc; font-weight: 600; color: #475569; white-space: nowrap; border-top: 1px solid #f1f5f9; }
tr:hover td { background: #f8fafc; }
.text-center { text-align: center; color: #64748b; padding: 40px !important; }

.status-badge {
  padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600;
  display: inline-block; white-space: nowrap;
}
.status-pending { background: #fef3c7; color: #d97706; }
.status-progress { background: #dbeafe; color: #2563eb; }
.status-success { background: #d1fae5; color: #059669; }
.status-cancel { background: #fee2e2; color: #dc2626; }

@media (max-width: 768px) {
  nav { padding: 15px 20px; flex-wrap: wrap; gap: 15px; }
  .profile-layout { flex-direction: column; margin: 20px auto; gap: 20px; }
  .profile-sidebar { width: 100%; }
  .card { padding: 16px; }
  th, td { padding: 12px; font-size: 13px; }
}

/* Review Modal & Stars */
.modal {
  display: none; position: fixed; z-index: 2000; left: 0; top: 0;
  width: 100%; height: 100%; background-color: rgba(0,0,0,0.5);
  align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.modal.show { display: flex; opacity: 1; }
.modal-content {
  background-color: #fff; margin: auto; padding: 30px;
  border-radius: 12px; max-width: 500px; width: 90%;
  position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  transform: translateY(-20px); transition: transform 0.3s;
}
.modal.show .modal-content { transform: translateY(0); }
.modal-close {
  position: absolute; right: 20px; top: 20px;
  font-size: 20px; cursor: pointer; border: none; background: none; color: #94a3b8;
}
.modal-close:hover { color: #0f172a; }

.star-rating {
  display: flex; gap: 8px; font-size: 40px; color: #e2e8f0; cursor: pointer;
}
.star-rating span { transition: color 0.2s; }
.star-rating span.hover, .star-rating span.selected { color: #eab308; }

textarea {
  width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1;
  border-radius: 8px; font-family: 'Sarabun', sans-serif;
  font-size: 15px; resize: vertical; outline: none; transition: border 0.2s;
}
textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

