/* profile.css - Trang Quản Lý Tài Khoản - Cobalt Prime Design */

/* ============================================================
   PAGE HERO BANNER
   ============================================================ */
.profile-hero {
  background: linear-gradient(135deg, #0b0f19 0%, #0f172a 50%, #1a0a1e 100%);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(255, 70, 100, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 60%, rgba(22, 136, 212, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.profile-hero-inner {
  position: relative;
  z-index: 1;
}

.profile-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(22, 136, 212, 0.12);
  border: 1px solid rgba(22, 136, 212, 0.3);
  color: #58b6f5;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.profile-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.profile-hero-title span {
  background: linear-gradient(135deg, var(--secondary), #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   PROFILE SECTION LAYOUT
   ============================================================ */
.profile-section {
  padding: 60px 0 100px;
  background-color: var(--bg-main);
}

/* Left Sidebar Card */
.profile-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 24px;
  text-align: center;
}

/* Avatar Upload & Preview */
.profile-avatar-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.profile-avatar-preview {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-main);
  box-shadow: var(--shadow-md);
  background-color: #f1f5f9;
}

.profile-avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: 3px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.profile-avatar-upload-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.profile-avatar-file-input {
  display: none;
}

.profile-user-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.profile-user-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 70, 100, 0.08);
  color: var(--primary);
  border: 1px solid rgba(255, 70, 100, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

/* Sidebar Stats */
.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  margin-bottom: 24px;
}

.profile-stat-box {
  text-align: center;
}

.profile-stat-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-heading);
}

.profile-stat-lbl {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Sidebar Vertical Tabs Menu */
.profile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-menu-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.2s ease;
}

.profile-menu-item-btn i {
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.profile-menu-item-btn:hover {
  background: var(--bg-main);
  color: var(--text-heading);
}

.profile-menu-item-btn.active {
  background: rgba(255, 70, 100, 0.06);
  border-color: rgba(255, 70, 100, 0.15);
  color: var(--primary);
}

.profile-menu-item-btn.active i {
  color: var(--primary);
}

/* Right Content Area Card */
.profile-content-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
  min-height: 100%;
}

.profile-content-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* Tab panes visibility */
.profile-tab-pane {
  display: none;
}

.profile-tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Form Styles */
.profile-form .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.profile-form .form-control,
.profile-form .form-select {
  height: 48px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  color: var(--text-heading);
  background-color: var(--bg-main);
  padding: 0 16px;
  transition: all 0.2s ease;
}

.profile-form .form-control:focus,
.profile-form .form-select:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 70, 100, 0.1);
  outline: none;
}

.profile-form-alert {
  display: none;
  margin-top: 20px;
}

.profile-form .btn-submit-profile {
  height: 48px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-glow);
  padding: 0 28px;
}

/* Table Style for Order History Tab */
.profile-order-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.profile-order-table th {
  background: var(--bg-main);
  color: var(--text-heading);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
}

.profile-order-table td {
  padding: 12px 16px;
  vertical-align: middle;
  font-size: 0.86rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
}

.profile-order-table tr:last-child td {
  border-bottom: none;
}

.profile-order-table td.col-code {
  font-family: monospace;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
}

.profile-order-table td.col-date {
  color: var(--text-muted);
  white-space: nowrap;
}

.profile-order-table td.col-price {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.profile-order-table td.col-status {
  white-space: nowrap;
}

.profile-order-table td.col-action {
  white-space: nowrap;
}

.order-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}

.order-badge-status.success {
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-order-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-order-download:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .profile-sidebar-card {
    margin-bottom: 30px;
  }
  .profile-content-card {
    padding: 30px 24px;
  }
}
