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

:root {
  --ink-900: var(--palette-black);
  --ink-700: var(--palette-gray-2);
  --ink-600: var(--palette-gray-3);
  --border: var(--palette-gray-6);
  --bg: var(--palette-white);
  --primary: var(--palette-black);
  --primary-600: var(--palette-gray-2);
  --radius-md: 12px;
  --radius-sm: 8px;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--ink-700);
  line-height: 1.6;
}

button,
input,
select {
  font-family: 'Outfit', sans-serif;
}

.container {
  display: flex;
  height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 280px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, .05);
}

.sidebar h2 {
  font-size: 20px;
  margin-bottom: 30px;
  font-weight: 600;
  color: var(--ink-900);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  color: var(--ink-600);
  transition: all .2s ease;
}

.sidebar li.active,
.sidebar li:hover {
  background: var(--palette-gray-7);
  color: var(--primary);
}

.sidebar li.active .material-symbols-rounded,
.sidebar li:hover .material-symbols-rounded {
  color: var(--primary);
}

.material-symbols-rounded {
  font-size: 20px;
  color: var(--ink-600);
}

.logout {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.logout-btn {
  border: none;
  background: none;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-sm);
  transition: all .2s ease;
}

.logout-btn:hover {
  background: var(--palette-gray-7);
  color: var(--palette-black);
}

/* ===== Content ===== */
.content {
  flex: 1;
  padding: 40px;
  background: var(--bg);
  height: 100vh;
  overflow-y: auto;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: fadeIn .3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

h3 {
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 24px;
  color: var(--ink-900);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-700);
  margin: -8px 0 18px;
  /* sits neatly above the H3 */
}

.crumb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink-700);
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease;
}

.crumb-link:hover {
  background: var(--palette-gray-7);
  color: var(--ink-900);
}

.crumb-link .material-symbols-rounded {
  font-size: 18px;
}

.crumb-sep {
  color: var(--palette-gray-4);
}

.crumb-current {
  color: var(--ink-900);
  font-weight: 500;
}

/* ===== Mobile Tabs (hidden on desktop) ===== */
.mobile-tabs {
  display: none;
  gap: 8px;
  margin: 0 0 14px;
}

.mobile-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-700);
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}

.mobile-tab .material-symbols-rounded {
  font-size: 18px;
}

.mobile-tab.active,
.mobile-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--palette-white);
}

/* ===== Profile Header ===== */
.profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.profile-pic {
  text-align: center;
}

.avatar-initial {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--palette-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.profile-info h2 {
  font-size: 22px;
  color: var(--ink-900);
  margin-bottom: 4px;
  min-height: 1.2em;
}

.profile-info p {
  color: var(--ink-600);
  font-size: 15px;
  min-height: 1.2em;
}

/* ===== Form (information card) ===== */
form {
  background: var(--palette-white);
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #E2E8F0;
}

.form-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.form-row:last-of-type {
  margin-bottom: 0;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-600);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E2E8F0;
  border-radius: 24px;
  font-size: 15px;
  background: var(--palette-white);
  color: var(--palette-black);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Outfit', sans-serif;
  height: 48px;
}

.form-group input:focus {
  border-color: #1E293B;
  outline: none;
  box-shadow: none;
}

.form-group input::placeholder {
  color: var(--palette-gray-3);
}

select {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px;
  border: 2px solid #E2E8F0;
  border-radius: 24px;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: var(--palette-white);
  color: var(--palette-black);
  font-family: 'Outfit', sans-serif;
  height: 48px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%231E293B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

select:focus {
  outline: none;
  border-color: #1E293B;
  box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

select:hover:not([readonly]) {
  border-color: #CBD5E1;
}

/* Modern dropdown options styling */
select option {
  padding: 14px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  background: #FFFFFF;
  color: #1E293B;
  border-radius: 8px;
  margin: 4px;
  transition: all 0.2s ease;
}

/* Selected option styling */
select option:checked {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  color: #FFFFFF;
  font-weight: 500;
}

/* Hover state for options */
select option:hover {
  background: #F8FAFC;
  color: #1E293B;
  font-weight: 500;
}

input[readonly],
select[readonly] {
  background: #F8FAFC;
  color: var(--ink-600);
  cursor: not-allowed;
  border-color: #F1F5F9;
  pointer-events: none;
  user-select: none;
}

input[readonly]:hover,
input[readonly]:focus,
select[readonly]:hover,
select[readonly]:focus {
  border-color: #F1F5F9;
  box-shadow: none;
  outline: none;
}

/* Actions */
.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #3B82F6;
  color: #FFFFFF;
  padding: 12px 24px;
  border: none;
  border-radius: 24px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  height: 48px;
  min-width: 140px;
  font-family: 'Outfit', sans-serif;
}

.save-btn:hover:not(:disabled) {
  background: #2563EB;
}

.save-btn:active:not(:disabled) {
  background: #1D4ED8;
  transform: scale(0.98);
}

.save-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ===== Orders ===== */
.orders-filter {
  display: flex;
  gap: 10px;
  margin: 22px 0;
}

.filter-btn {
  padding: 10px 20px;
  border: 2px solid #E2E8F0;
  background: var(--bg);
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s ease;
  height: 40px;
  display: inline-flex;
  align-items: center;
  font-family: 'Outfit', sans-serif;
}

.filter-btn.active,
.filter-btn:hover {
  background: #1E293B;
  color: var(--palette-white);
  border-color: #1E293B;
}

#orders-list {
  list-style: none;
  margin-top: 12px;
}

.order-item {
  padding: 18px;
  background: var(--bg);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  transition: transform .2s ease;
}

.order-item:hover {
  transform: translateY(-2px);
}

.order-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-id {
  font-weight: 600;
  color: var(--ink-900);
}

.order-date {
  color: var(--ink-600);
}

.order-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.order-items,
.order-price {
  color: var(--ink-700);
}

.order-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.order-status.completed {
  background: var(--palette-gray-7);
  color: var(--palette-black);
}

.order-status.processing {
  background: var(--palette-gray-7);
  color: var(--palette-gray-2);
}

.order-status.cancelled {
  background: var(--palette-gray-7);
  color: var(--palette-gray-3);
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
  .form-row {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  .container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  /* Sidebar: hide the horizontal tab row for better mobile UX */
  .sidebar {
    width: 100%;
    padding: 16px 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--border);
    height: auto;
  }

  .sidebar h2 {
    margin: 0;
    font-size: 18px;
  }

  .sidebar ul {
    display: none;
  }

  /* hide desktop-style tabs on mobile */
  .logout {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  .content {
    padding: 20px;
    height: auto;
  }

  /* Show mobile tab switcher */
  .mobile-tabs {
    display: flex;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .avatar-initial {
    width: 96px;
    height: 96px;
    font-size: 40px;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 13px;
    gap: 8px;
  }

  .crumb-link {
    padding: 6px 8px;
  }

  .mobile-tab {
    font-size: 13px;
    padding: 10px;
  }

  .form-actions {
    flex-direction: column;
    gap: 12px;
  }

  .save-btn {
    width: 100%;
    justify-content: center;
  }

  form {
    padding: 20px;
  }

  .orders-filter {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-btn {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
  }
}