/* ==========================================================================
   TYLO - Premium Profile Dashboard CSS
   Theme: Black + White + Mint Glossy Premium + Orange Interaction
   ========================================================================== */

:root {
  --bold-black: #020202;
  --soft-black: #1a1a1a;
  --charcoal: #2a2a2a;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --bg-luxury: #f4f7f6;

  --mint-primary: #2ebf91;
  --mint-light: #a8ff78;
  --mint-gradient: linear-gradient(145deg, #a8ff78, #2ebf91);
  --mint-gloss-shadow: 0 6px 18px rgba(46, 191, 145, 0.25);
  
  --saffron-primary: #e67300;
  --saffron-gradient: linear-gradient(145deg, #ff9933, #e67300);

  --border-delicate: 1px solid rgba(0, 0, 0, 0.08);
  --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.03);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  
  --error-red: #e74c3c;
  --success-green: #1b8a5f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-color: var(--bg-luxury);
  color: var(--bold-black);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   1. PREMIUM HEADER (Copied & Adjusted for structural consistency)
   ========================================================================== */
.header-main {
  background: var(--white);
  border-bottom: var(--border-delicate);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1536px;
  margin: 0 auto;
  padding: 12px 32px;
}
.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.header-logo { height: 36px; }
.brand-text { display: flex; flex-direction: column; }
.brand-title {
  font-size: 22px; font-weight: 900; letter-spacing: 2px;
  background: var(--saffron-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1;
}
.brand-subtitle {
  font-size: 9px; font-weight: 800; letter-spacing: 4px;
  background: var(--mint-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.search-action-area {
  flex: 1; display: flex; justify-content: flex-start; padding-left: 40px; align-items: center;
}
.search-container {
  display: flex; align-items: center; background: var(--off-white);
  border-radius: 8px; padding: 8px 16px; width: 100%; max-width: 500px;
  border: 1px solid #eaeaea; transition: var(--transition-smooth);
}
.search-container:focus-within {
  background: #fffdfa; border-color: var(--saffron-primary);
  box-shadow: 0 4px 12px rgba(230, 115, 0, 0.1);
}
.search-input { border: none; background: transparent; width: 100%; font-size: 14px; outline: none; }
.search-btn { background: transparent; border: none; cursor: pointer; padding-left: 8px; }
.search-icon-semantic {
  display: inline-block; width: 14px; height: 14px; border: 2px solid var(--mint-primary); border-radius: 50%; position: relative; transition: var(--transition-smooth);
}
.search-icon-semantic::after {
  content: ''; position: absolute; width: 2px; height: 6px; background: var(--mint-primary); bottom: -4px; right: -3px; transform: rotate(-45deg); transition: var(--transition-smooth);
}
.search-container:focus-within .search-icon-semantic { border-color: var(--saffron-primary); }
.search-container:focus-within .search-icon-semantic::after { background: var(--saffron-primary); }

.user-actions { display: flex; gap: 24px; margin-left: auto; }
.dropdown-trigger { background: transparent; border: none; font-size: 14px; font-weight: 700; color: var(--soft-black); cursor: pointer; display: flex; align-items: center; gap: 6px; transition: color 0.3s; }
.dropdown-trigger:hover, .dropdown-trigger.is-active { color: var(--mint-primary); }
.indicator-triangle { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }

/* ==========================================================================
   2. PROFILE DASHBOARD LAYOUT
   ========================================================================== */
.profile-dashboard-layout {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  flex: 1;
}

/* ==========================================================================
   3. LEFT SIDEBAR
   ========================================================================== */
.profile-sidebar {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  padding: 24px 16px;
  position: sticky;
  top: 100px;
}

.sidebar-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  width: 100%; text-align: left; background: transparent; border: none;
  padding: 14px 20px; border-radius: 10px; font-size: 14.5px; font-weight: 600;
  color: var(--soft-black); cursor: pointer; transition: var(--transition-smooth);
}
.sidebar-link:hover { background: rgba(46, 191, 145, 0.05); color: var(--bold-black); padding-left: 24px; }
.sidebar-link.active {
  background: var(--mint-gradient); color: var(--bold-black); font-weight: 800;
  box-shadow: 0 4px 12px rgba(46, 191, 145, 0.2);
}
.sidebar-link.link-danger { color: var(--error-red); margin-top: 16px; border-top: 1px solid #eee; border-radius: 0 0 10px 10px; padding-top: 20px;}
.sidebar-link.link-danger:hover { background: #fff0f0; color: #c0392b; padding-left: 20px; }

/* ==========================================================================
   4. RIGHT CONTENT AREA & SUMMARY CARD
   ========================================================================== */
.profile-content-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-summary-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.profile-summary-card::after {
  content: ''; position: absolute; right: 0; top: 0; width: 120px; height: 100%;
  background: var(--mint-gradient); opacity: 0.05; clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.summary-avatar-wrapper {
  position: relative; width: 110px; height: 110px; border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1); border: 4px solid var(--white);
  flex-shrink: 0;
}
.summary-avatar-img {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--off-white);
}
.avatar-upload-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.5); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  opacity: 0; transition: opacity 0.3s;
}
.summary-avatar-wrapper:hover .avatar-upload-overlay { opacity: 1; }
.camera-icon { font-size: 24px; color: var(--white); }
.hidden-input { display: none; }

.summary-info { flex: 1; z-index: 2; }
.summary-name { font-size: 26px; font-weight: 900; color: var(--bold-black); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.verified-badge { font-size: 12px; background: var(--success-green); color: white; border-radius: 50%; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-weight: bold; }

.summary-meta { font-size: 14px; color: #555; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-weight: 500; }
.meta-divider { color: #ccc; }
.summary-location { font-size: 14px; color: #666; margin-bottom: 16px; }

.summary-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #eee; padding-top: 16px; }
.member-since { font-size: 13px; color: #888; }

/* ==========================================================================
   5. SECTIONS & FORMS
   ========================================================================== */
.profile-section {
  background: var(--white); border-radius: 20px; box-shadow: var(--shadow-card); padding: 32px;
  display: none; animation: fadeIn 0.4s ease;
}
.profile-section.active-section { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; border-bottom: 1px solid #f0f0f0; padding-bottom: 16px; }
.section-header h2 { font-size: 20px; font-weight: 800; color: var(--bold-black); }

.profile-form { display: flex; flex-direction: column; gap: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.full-width { grid-column: 1 / -1; }

.input-group { position: relative; width: 100%; display: flex; flex-direction: column;}
.form-input, .form-select {
  width: 100%; padding: 24px 16px 10px 16px; font-size: 15px; font-weight: 600;
  color: var(--bold-black); background: var(--off-white); border: 1px solid #e0e0e0;
  border-radius: 10px; outline: none; transition: var(--transition-smooth); appearance: none;
}
.form-input:focus, .form-select:focus { background: var(--white); border-color: var(--mint-primary); box-shadow: 0 0 0 4px rgba(46, 191, 145, 0.1); }
.form-label {
  position: absolute; left: 16px; top: 18px; font-size: 14px; color: #888; pointer-events: none; transition: var(--transition-smooth);
}
.form-input:focus ~ .form-label, .form-input:not(:placeholder-shown) ~ .form-label, .always-float {
  top: 8px; font-size: 11px; font-weight: 800; color: var(--mint-primary);
}
.form-input:not(:focus):not(:placeholder-shown) ~ .form-label { color: #777; }
.input-hint { font-size: 11px; color: #999; margin-top: 4px; margin-left: 4px; }
.textarea { resize: vertical; min-height: 80px; }

/* Readonly Form State */
.readonly-mode .form-input { background: transparent; border-color: transparent; padding-left: 0; pointer-events: none;}
.readonly-mode .form-label { left: 0; color: #aaa; }
.readonly-mode .input-hint { display: none; }

.form-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 8px; padding-top: 24px; border-top: 1px solid #eee; }
.form-actions.align-left { justify-content: flex-start; }
.hidden { display: none !important; }

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */
.btn-primary-mint {
  background: var(--mint-gradient); color: var(--bold-black); font-weight: 800; font-size: 15px;
  padding: 14px 28px; border: none; border-radius: 8px; cursor: pointer; box-shadow: var(--mint-gloss-shadow);
  transition: var(--transition-smooth); text-transform: uppercase; letter-spacing: 0.5px;
}
.btn-primary-mint:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(46, 191, 145, 0.4); background: linear-gradient(145deg, #bdf0d5, #2ebf91); }
.btn-primary-mint:active { transform: translateY(0); }

.btn-outline-mint {
  background: transparent; color: var(--mint-primary); font-weight: 700; font-size: 14px;
  padding: 12px 24px; border: 2px solid var(--mint-primary); border-radius: 8px; cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-outline-mint:hover { background: rgba(46, 191, 145, 0.1); color: #147a51; border-color: #147a51; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-text { background: transparent; border: none; color: #666; font-weight: 600; font-size: 15px; cursor: pointer; padding: 14px 20px; transition: color 0.2s; }
.btn-text:hover { color: var(--bold-black); }
.btn-text.is-disabled { color: #ccc; pointer-events: none; }

.btn-danger { background: #fee; color: var(--error-red); font-weight: 700; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
.btn-danger:hover { background: var(--error-red); color: white; }
.full-width { width: 100%; }

/* ==========================================================================
   7. DATA CARDS (Orders, Addresses, Wishlist)
   ========================================================================== */
/* Address Cards */
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.address-card { border: 1px solid #eaeaea; border-radius: 12px; padding: 20px; position: relative; transition: 0.3s; background: var(--off-white); }
.address-card:hover { border-color: var(--mint-primary); box-shadow: 0 4px 15px rgba(46,191,145,0.1); }
.address-card.is-default { border-color: var(--mint-primary); background: #f2fcf8; }
.address-badge { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 800; background: #e0e0e0; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; }
.address-card.is-default .address-badge { background: var(--mint-primary); color: white; }
.addr-type { font-size: 16px; font-weight: 800; margin-bottom: 8px; color: var(--bold-black); }
.addr-full { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 8px; min-height: 42px; }
.addr-pin { font-size: 13px; font-weight: 700; color: var(--charcoal); margin-bottom: 16px; }
.addr-actions { display: flex; gap: 12px; border-top: 1px solid #ddd; padding-top: 12px; }
.addr-btn { background: none; border: none; font-size: 13px; font-weight: 600; color: var(--mint-primary); cursor: pointer; }
.addr-btn:hover { text-decoration: underline; }
.addr-btn.delete { color: var(--error-red); }

/* Order Cards */
.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card { display: flex; justify-content: space-between; align-items: center; border: 1px solid #eaeaea; border-radius: 12px; padding: 20px; background: var(--white); border-left: 4px solid var(--mint-primary); transition: 0.3s; }
.order-card.history { border-left-color: #ccc; }
.order-info h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.order-meta { font-size: 13px; color: #666; display: flex; gap: 12px; margin-bottom: 8px; }
.order-status { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.status-active { color: #e67300; } .status-delivered { color: #1b8a5f; } .status-cancelled { color: var(--error-red); }
.order-actions { display: flex; gap: 12px; }

/* Wishlist Grid */
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.wish-card { border: 1px solid #eaeaea; border-radius: 12px; overflow: hidden; background: var(--white); transition: 0.3s; }
.wish-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.wish-img { width: 100%; height: 160px; object-fit: cover; border-bottom: 1px solid #eaeaea; }
.wish-body { padding: 16px; text-align: center; }
.wish-title { font-size: 15px; font-weight: 800; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wish-cat { font-size: 12px; color: #888; margin-bottom: 12px; }
.wish-actions { display: flex; flex-direction: column; gap: 8px; }

/* ==========================================================================
   8. SETTINGS & SECURITY (Toggles & Blocks)
   ========================================================================== */
.settings-form { display: flex; flex-direction: column; gap: 24px; }
.toggle-list { display: flex; flex-direction: column; gap: 16px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 16px; border: 1px solid #eaeaea; border-radius: 10px; background: var(--white); cursor: pointer; transition: 0.2s; }
.toggle-row:hover { border-color: #ccc; }
.toggle-info { display: flex; flex-direction: column; gap: 4px; }
.toggle-title { font-size: 15px; font-weight: 700; color: var(--bold-black); }
.toggle-desc { font-size: 12px; color: #777; }

/* Pure CSS Toggle Switch */
.css-toggle { position: relative; width: 44px; height: 24px; }
.css-toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: var(--mint-primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* Security Blocks */
.security-blocks { display: grid; grid-template-columns: 1fr; gap: 16px; }
.security-card { display: flex; justify-content: space-between; align-items: center; padding: 24px; border: 1px solid #eaeaea; border-radius: 12px; background: var(--off-white); }
.sec-info h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.sec-info p { font-size: 13px; color: #666; }
.security-card.danger-zone { border-color: #fadbd8; background: #fffafa; }

/* Help & Support */
.support-container { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.support-summary { background: linear-gradient(145deg, #1a1a1a, #020202); color: white; padding: 32px; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
.support-summary h3 { font-size: 22px; font-weight: 800; background: var(--saffron-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.support-summary p { font-size: 14px; color: #bbb; line-height: 1.5; }
.quick-issue-box { padding: 24px; border: 1px solid #eaeaea; border-radius: 16px; background: var(--white); }
.quick-issue-box h4 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }

/* ==========================================================================
   9. MODALS (OTP, Address, Logout)
   ========================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  opacity: 1; visibility: visible; transition: var(--transition-smooth);
}
.modal-backdrop.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.modal-box {
  background: var(--white); width: 100%; max-width: 500px; border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2); overflow: hidden; transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.modal-backdrop.hidden .modal-box { transform: translateY(20px); }
.modal-box.small-box { max-width: 400px; }

.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 32px; border-bottom: 1px solid #eee; }
.modal-header h2 { font-size: 20px; font-weight: 800; }
.btn-close-modal { background: none; border: none; font-size: 28px; line-height: 1; color: #888; cursor: pointer; transition: 0.2s; }
.btn-close-modal:hover { color: var(--bold-black); }

.modal-body { padding: 32px; }
.modal-body.text-center { text-align: center; }

.modal-footer { padding: 24px 32px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 16px; background: var(--off-white); }
.modal-footer.split-footer { justify-content: space-between; }

/* OTP Inputs */
.otp-instruction { font-size: 14px; color: #555; margin-bottom: 24px; line-height: 1.5; }
.otp-inputs { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.otp-box {
  width: 48px; height: 56px; font-size: 24px; font-weight: 800; text-align: center;
  border: 1px solid #ccc; border-radius: 10px; background: var(--off-white); transition: 0.2s;
}
.otp-box:focus { background: var(--white); border-color: var(--mint-primary); box-shadow: 0 0 0 4px rgba(46, 191, 145, 0.1); outline: none; }
.otp-timer { font-size: 13px; color: #888; margin-bottom: 16px; }

/* ==========================================================================
   10. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .profile-dashboard-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 20px;
  }
  .profile-sidebar {
    position: static; padding: 16px; overflow-x: auto; white-space: nowrap;
  }
  .sidebar-list { flex-direction: row; gap: 12px; }
  .sidebar-link { text-align: center; padding: 10px 16px; }
  .sidebar-link:hover { padding-left: 16px; }
  .sidebar-link.link-danger { margin-top: 0; border: none; padding-top: 10px; background: #fff0f0; }
  .support-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-container { flex-wrap: wrap; gap: 16px; padding: 12px 16px; }
  .search-action-area { padding-left: 0; width: 100%; justify-content: space-between; }
  .search-container { max-width: 200px; }
  
  .profile-summary-card { flex-direction: column; text-align: center; padding: 24px; gap: 20px; }
  .summary-meta { justify-content: center; flex-wrap: wrap; }
  .summary-footer { flex-direction: column; gap: 16px; }
  
  .form-grid { grid-template-columns: 1fr; }
  .order-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .order-actions { width: 100%; justify-content: space-between; }
  .security-card { flex-direction: column; align-items: flex-start; gap: 16px; }
}