/* ===== account.css — Account area + mobile order cards ===== */

/* ===== Myorder: desktop-only table / mobile-only cards ===== */

.mobile-order-cards { display: none; }

/* Status badge colour — all screen sizes */
.badge-new       { background: #fff3e0; color: #e65100; }
.badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-active    { background: #e8f5e9; color: #2e7d32; }

@media (max-width: 767px) {
  .desktop-order-table { display: none !important; }

  .mobile-order-cards {
    display: block;
    padding: 4px 0 60px;
  }

  .oc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 14px 16px;
    margin-bottom: 12px;
  }

  .oc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  .oc-code {
    font-size: 15px;
    font-weight: 700;
    color: #c0392b;
    letter-spacing: .3px;
  }

  .oc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  .oc-product {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.4;
  }
  .oc-product a { color: #374151; text-decoration: none; }

  .oc-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
  }

  .oc-date { font-size: 13px; color: #9ca3af; }

  .oc-total {
    font-size: 16px;
    font-weight: 700;
    color: #d32121;
  }

  .oc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .oc-btn-detail,
  .oc-btn-cancel {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }

  .oc-btn-detail { background: #c0392b; color: #fff; border: none; }
  .oc-btn-cancel { background: #fff; color: #6b7280; border: 1px solid #d1d5db; }
}

/* ===== Account area ===== */

/* --- Sidebar --- */
.account-sidebar { margin-bottom: 20px; }

.ac-sidebar-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.ac-user-info {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
}

.ac-user-name  { display: block; font-weight: 700; font-size: 15px; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-user-email { display: block; font-size: 12px; color: #9ca3af; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ac-sidebar-nav { padding: 8px 0; }

.ac-nav-item {
  display: block;
  padding: 10px 20px;
  color: #374151;
  font-size: 14px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.ac-nav-item:hover  { background: #fef2f2; color: #c0392b; text-decoration: none; }
.ac-nav-item.active { background: #fef2f2; color: #c0392b; font-weight: 600; border-left-color: #c0392b; }

/* --- Generic account card --- */
.account-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.account-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.account-card-title a       { font-size: 13px; font-weight: 400; color: #c0392b; text-decoration: none; }
.account-card-title a:hover { text-decoration: underline; }

/* --- Info rows --- */
.ac-info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid #f9fafb;
  font-size: 14px;
  line-height: 1.5;
}
.ac-info-row:last-child { border-bottom: none; }
.ac-info-label { min-width: 110px; color: #6b7280; font-weight: 500; flex-shrink: 0; }
.ac-info-value { color: #1f2937; }

/* --- Welcome box --- */
.ac-welcome { padding: 14px 0 6px; margin-bottom: 4px; }
.ac-welcome strong { font-size: 18px; color: #1f2937; }
.ac-welcome p      { color: #6b7280; font-size: 14px; margin: 4px 0 0; }

/* --- Status / error messages --- */
.account-msg {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}
.account-msg.error   { background: #fef2f2; color: #c0392b; border: 1px solid #fecaca; }
.account-msg.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* --- Form inputs --- */
.ac-form-input {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.ac-form-input:focus {
  border-color: #c0392b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(192,57,43,.10);
}
select.ac-form-input           { height: 42px; padding: 0 8px; }
input[readonly].ac-form-input  { background: #f9fafb; color: #9ca3af; cursor: not-allowed; }

.ac-form-label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
  margin-bottom: 5px;
}
.ac-form-label em { color: #c0392b; margin-right: 2px; }

/* --- Primary button --- */
.ac-btn-primary {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}
.ac-btn-primary:hover { background: #a93226; color: #fff; }

/* --- Orders table (desktop) --- */
.account-orders-table { width: 100%; border-collapse: collapse; }
.account-orders-table th {
  background: #f9fafb;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid #f3f4f6;
}
.account-orders-table td {
  padding: 10px 12px;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #f9fafb;
  vertical-align: middle;
}
.account-orders-table tbody tr:hover td { background: #fef9f9; }
.account-orders-table .td-total          { font-weight: 700; color: #d32121; }
.account-orders-table .td-actions a      { font-size: 13px; color: #c0392b; text-decoration: none; }
.account-orders-table .td-actions a:hover { text-decoration: underline; }

/* --- Account status badge --- */
.account-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Mobile --- */
@media (max-width: 767px) {
  .account-sidebar { width: 100% !important; float: none !important; padding: 0 !important; }

  .ac-sidebar-card { border-radius: 0; border-left: none; border-right: none; border-top: none; box-shadow: none; background: #fff; }

  .ac-user-info { padding: 10px 14px; }
  .ac-user-name { font-size: 14px; }

  .ac-sidebar-nav { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0; }

  .ac-nav-item {
    padding: 12px 14px;
    white-space: nowrap;
    border-left: none !important;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-size: 13px;
  }
  .ac-nav-item.active { background: transparent; color: #c0392b; border-bottom-color: #c0392b; }
  .ac-nav-item:hover  { background: transparent; }

  .account-card { padding: 14px; border-radius: 8px; }
  .account-card-title { font-size: 15px; }
  .ac-info-label { min-width: 90px; font-size: 13px; }
  .ac-info-value { font-size: 13px; }

  .ac-form-input, select.ac-form-input { font-size: 16px; }
  .ac-btn-primary { display: block; width: 100%; text-align: center; padding: 12px; }

  .account-orders-table { display: none; }
}
