@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,700&display=swap');

:root {
  --bg-color: #a3aab3;
  --bg-grad-1: #b5bdc6; /* Darker Silver light */
  --bg-grad-2: #707985; /* Darker Silver dark */
  --text-dark: #333333;
  --text-light: #5a6270;
  --primary-blue: #22252a;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html {
  min-height: 100vh;
  height: 100%;
  background-color: #22252a; /* Prevents white space on overscroll or tall pages */
}

body {
  background: linear-gradient(135deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.4s ease, color 0.4s ease;
}

body.landing-bg {
  background: 
    linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.15)), 
    url('../images/landing_bg.png') no-repeat 59% bottom fixed;
  background-size: cover;
}

.mobile-container {
  width: 100%;
  max-width: 1200px;
  background: transparent;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 40px 20px 0 20px;
  overflow-x: hidden;
}



/* Strivio Logo */
.logo {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 900;
  font-size: clamp(6rem, 20vw, 9rem);
  color: #020c24; /* Very dark blue */
  text-align: center;
  letter-spacing: -2px;
  /* Premium 3D Plastic Emboss Effect */
  text-shadow: 
    0px 1px 1px rgba(255,255,255,0.8),
    0px 2px 3px rgba(0,0,0,0.4),
    0px 4px 8px rgba(0,0,0,0.2),
    inset 0px 2px 3px rgba(255,255,255,0.5);
  position: relative;
}

.logo::after {
  content: "Strivio";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 1;
}

/* Subtitle */
.subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  text-align: center;
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  font-weight: 500;
  color: #dfcfcc !important; /* Premium light coppery cream, highly readable! */
  line-height: 1.5;
  width: 100%;
  padding: 0;
  margin: 0 0 40px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* Glass Auth Card */
.auth-card {
  background: rgba(230, 235, 240, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 28px;
  padding: 25px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  width: 100%;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  padding-left: 5px;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  background: transparent;
  color: var(--text-dark);
  font-size: 0.95rem;
  outline: none;
  box-shadow: inset 1px 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

input:focus {
  border-color: var(--primary-blue);
  background: rgba(255,255,255,0.5);
}

input::placeholder {
  color: #7a828e;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 20px;
  padding: 0 5px;
}

.auth-links a {
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
}

.auth-links a:hover {
  color: var(--primary-blue);
}

/* 3D Glossy Button */
.btn-glossy {
  background: #543734 !important;
  border: none !important;
  border-radius: 20px;
  padding: 14px 20px;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-glossy::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5%;
  width: 90%;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  border-radius: 30px 30px 0 0;
  pointer-events: none;
}

.btn-glossy:active {
  transform: scale(0.98);
}

.bottom-link {
  text-align: center;
  margin-top: 15px;
}

.bottom-link a {
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
}

/* White Info Card */
.info-card {
  background: rgba(245, 247, 250, 0.9);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.info-header {
  display: flex;
  gap: 15px;
  align-items: center;
}

.info-icon {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  font-size: 2rem;
}

.info-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-dark);
  font-weight: 500;
  flex: 1;
}

.info-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  padding: 0 10px;
}

.stat {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 600;
  text-align: center;
}

/* Horizontal Pills */
.action-pills {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  width: 100%;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.pill-light {
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 14px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dark);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.pill-dark {
  flex: 1.5;
  padding: 14px 20px;
  font-size: 0.85rem;
}

.btn-circle {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  cursor: pointer;
}

/* Bottom Section */
.bottom-text {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 15px;
}

.black-card {
  background: rgba(30, 32, 36, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(138, 85, 78, 0.4);
  border-radius: 28px 28px 0 0;
  padding: 30px 20px;
  color: white;
  margin-top: auto;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.black-card-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.black-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.black-card-tags {
  display: flex;
  gap: 10px;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  flex-wrap: wrap;
  justify-content: center;
}

.black-card-tags span {
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

.black-card-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}

.control-btn {
  width: 30px;
  height: 30px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  color: white;
  cursor: pointer;
}

/* Dashboard Top Nav */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(180deg, #22252a 0%, #1b1d22 100%);
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(84, 55, 52, 0.4);
  box-sizing: border-box;
  border-bottom: 1px solid rgba(138, 85, 78, 0.3);
  z-index: 1000;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 900;
  font-size: 1.5rem;
  color: white;
  letter-spacing: -1px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

#user-fullname {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: #a3aab3; /* Gray */
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.user-avatar svg {
  width: 20px;
  height: 20px;
}

.logout-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  padding: 5px;
}

.logout-btn:hover {
  color: white;
}

.logout-btn svg {
  width: 22px;
  height: 22px;
}

.dashboard-content {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 100px 20px 60px; /* Space for fixed nav and sides padding */
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap; /* wraps on mobile/small screens */
}

/* Training History Card */
.training-history-card {
  background: rgba(230, 235, 240, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 28px;
  padding: 25px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 650px;
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
}

.history-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  text-align: left;
  padding-left: 5px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px; /* Make it scrollable */
  overflow-y: auto;
  padding-right: 5px;
  margin-bottom: 20px;
}

/* Custom Scrollbar for list */
.history-list::-webkit-scrollbar {
  width: 6px;
}
.history-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
}
.history-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}

.history-item {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.history-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.9);
}

.history-item.active {
  background: #22252a;
  color: white;
}

.history-item.active .history-category {
  color: white;
}

.history-item.active .history-date {
  color: rgba(255,255,255,0.7);
}

.history-item.active .history-arrow {
  color: rgba(255,255,255,0.6);
}

.history-icon {
  width: 46px;
  height: 46px;
  border-radius: 23px;
  background: #c0c5ce;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  margin-right: 15px;
}

.history-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-category {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

.history-arrow {
  font-size: 1.5rem;
  color: var(--text-light);
  font-weight: 300;
  padding-left: 10px;
}

.mt-15 {
  margin-top: 15px;
}

.hidden {
  display: none !important;
}

/* Training Detail Modal */
.modal-card {
  background: rgba(248, 250, 252, 0.98);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 20px;
  padding: 22px;
  width: 340px;
  max-height: 65vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  animation: slideInRight 0.2s ease;
  box-sizing: border-box;
}

.modal-card.hidden {
  display: none !important;
}

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 10px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 3px;
}

.modal-close {
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-dark);
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0,0,0,0.15);
}

.modal-exercises {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-exercise-item {
  background: rgba(255,255,255,0.8);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-exercise-icon {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: #e2e6eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.modal-exercise-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.modal-exercise-details {
  color: var(--text-light);
  font-size: 0.78rem;
}

.modal-empty {
  text-align: center;
  color: var(--text-light);
  font-style: italic;
  opacity: 0.6;
  padding: 10px 0;
}

#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff4d4f;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: none;
  font-weight: 500;
}

/* Create Training Subview Styles */
.create-training-card {
  background: rgba(40, 43, 48, 0.45) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(138, 85, 78, 0.6) !important;
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
  width: 100%;
  max-width: 650px;
  box-sizing: border-box;
}

.create-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: 15px;
}

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

.form-group-inline label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.difficulty-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.difficulty-wrapper label {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.star-rating {
  display: flex;
  gap: 8px;
  font-size: 1.8rem;
  line-height: 1;
  user-select: none;
}

.star {
  opacity: 0.3;
  cursor: pointer;
  transition: all 0.2s ease;
}

.star.active {
  opacity: 1;
  transform: scale(1.1);
}

.date-input-wrapper {
  position: relative;
  width: 100%;
}

.date-input-wrapper input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(138, 85, 78, 0.4);
  border-radius: 16px;
  font-size: 0.95rem;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  color: #ffffff;
  color-scheme: dark;
}

.date-input-wrapper input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.focus-selector {
  display: flex;
  gap: 15px;
  margin: 25px 0;
  width: 100%;
}

.focus-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(138, 85, 78, 0.6);
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.focus-pill.active {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.focus-pill:hover {
  transform: translateY(-2px);
}

/* Custom Dropdown Styles */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(138, 85, 78, 0.4);
  border-radius: 16px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  color: #ffffff;
}

.dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.dropdown-selected-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  background: rgba(26, 28, 32, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(138, 85, 78, 0.4);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  z-index: 100;
  max-height: 250px;
  overflow-y: auto;
  animation: fadeInDropdown 0.15s ease;
}

.dropdown-options.hidden {
  display: none !important;
}

@keyframes fadeInDropdown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #ffffff;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.back-link {
  display: inline-block;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 20px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.back-link:hover {
  transform: translateX(-4px);
}

.muscle-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e6eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ==========================================================================
   MOCKUP DASHBOARD REDESIGN OVERRIDES
   ========================================================================= */

#profile-view {
  background-color: #22252a !important;
  background-image: 
    linear-gradient(to bottom, rgba(34, 37, 42, 0.45) 0%, rgba(34, 37, 42, 0) 300px, rgba(34, 37, 42, 0) 450px, #22252a 750px),
    linear-gradient(to right, #22252a 0%, rgba(34, 37, 42, 0) 15%, rgba(34, 37, 42, 0) 85%, #22252a 100%),
    url('../images/strivio_banner.jpg') !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-size: 100% auto !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100vw;
  max-width: 100%;
}

#profile-view .mobile-container {
  max-width: 100% !important;
  width: 100% !important;
  min-height: unset !important;
  padding: 0 !important;
  overflow: visible !important;
  box-sizing: border-box;
}

#profile-view .dashboard-grid {
  max-width: 100% !important;
  width: 100% !important;
  gap: 40px !important;
}

#profile-view .grid-left-col {
  flex: 2 !important;
  width: calc(65% - 20px) !important;
  max-width: none !important;
}

#profile-view .grid-right-col {
  flex: 1 !important;
  width: calc(35% - 20px) !important;
  max-width: none !important;
}

#profile-view .top-nav {
  background: rgba(26, 28, 32, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(138, 85, 78, 0.3);
}

#profile-view .top-nav .nav-brand {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

#profile-view .top-nav #user-fullname {
  color: rgba(255, 255, 255, 0.9) !important;
}

#profile-view .top-nav .logout-btn {
  color: rgba(255, 255, 255, 0.8) !important;
}
#profile-view .top-nav .logout-btn:hover {
  color: #ffffff !important;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)) !important;
}

#profile-view .top-nav .user-avatar {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
}

/* Grid Layout */
.dashboard-grid {
  display: flex;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  padding-right: 70px; /* Space for the floating sidebar */
  box-sizing: border-box;
}

.grid-left-col {
  flex: 2 1 65%;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.grid-right-col {
  flex: 1 1 35%;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 380px;
  width: 100%;
}

/* Translucent Blue Glass Cards */
.training-history-card, 
.records-glass-card,
.motivation-glass-card,
.next-workout-glass-card {
  background: rgba(40, 43, 48, 0.45) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(138, 85, 78, 0.6) !important;
  border-radius: 28px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
  padding: 25px 24px !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
}

/* Training History Header Row */
.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.history-card-header h2.history-title {
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-size: 1.35rem;
}

.total-trainings-count {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
}

/* History List Item Redesign */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 22px;
}

.history-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(138, 85, 78, 0.2) !important;
  border-radius: 18px !important;
  padding: 14px 18px !important;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.25s ease !important;
  color: white !important;
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: translateX(4px);
}

.history-item.active-item {
  background: #3e2726 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 15px rgba(24, 51, 117, 0.4);
}

.history-item-thumb {
  width: 50px;
  height: 38px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.history-info {
  flex: 1;
}

.history-category {
  font-weight: 600;
  font-size: 1.05rem;
  color: #ffffff !important;
  margin-bottom: 2px;
}

.history-date {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5) !important;
}

.history-arrow {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 1.2rem;
}

/* Gradient Glowing Button */
.btn-create-glow {
  background: #543734 !important;
  border: none !important;
  border-radius: 20px;
  padding: 14px 20px;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-create-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.1);
  background: linear-gradient(#11255e, #11255e) padding-box, linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%) border-box;
}

.btn-create-glow:active {
  transform: scale(0.98);
}

/* Personal Records Card styling */
.records-glass-card h2.history-title {
  margin: 0 0 20px 0 !important;
  color: white !important;
  font-size: 1.35rem;
}

.medals-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

.medal-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(138, 85, 78, 0.2);
  border-radius: 20px;
  padding: 12px 16px;
}

.medal-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.medal-circle.gold {
  background: linear-gradient(135deg, #ffe066 0%, #f5b041 100%);
  box-shadow: 0 0 10px rgba(245, 176, 65, 0.3);
}

.medal-circle.silver {
  background: linear-gradient(135deg, #f2f4f4 0%, #bdc3c7 100%);
  box-shadow: 0 0 10px rgba(189, 195, 199, 0.3);
}

.medal-circle.bronze {
  background: linear-gradient(135deg, #f5b041 0%, #ca6f1e 100%);
  box-shadow: 0 0 10px rgba(202, 111, 30, 0.3);
}

.medal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.medal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.medal-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #ffffff;
}

.medal-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.sparkline-wrapper {
  width: 100px;
  height: 16px;
  display: flex;
  align-items: center;
}

.sparkline {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sparkline path {
  filter: drop-shadow(0 1px 2px rgba(255,255,255,0.1));
}

.btn-add-record {
  background: #543734 !important;
  border: none !important;
  border-radius: 20px;
  padding: 14px 20px;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-add-record:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(84, 55, 52, 0.35);
}

.plus-icon {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Motivation Card styling */
.motivation-glass-card {
  padding: 16px !important;
}

.motivation-img-container {
  width: 100%;
  height: 200px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: url('../images/motivation_barbell.jpg') no-repeat center center;
  background-size: cover;
  margin-bottom: 16px;
}

.motivation-crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(84, 55, 52, 0) 60%, rgba(84, 55, 52, 0.4) 100%);
}

.motivation-quote {
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.45;
  font-style: italic;
  margin: 0;
  text-align: left;
  padding: 0 5px;
}

/* Next Workout Card */
.next-workout-glass-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.next-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.next-details {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

/* Floating Sidebar Menu styling */
.floating-sidebar-menu {
  position: fixed;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(84, 55, 52, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px 10px;
  z-index: 99;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.sidebar-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.25s ease;
}

.sidebar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-icon-btn.active {
  background: #3e2726 !important;
  color: #22252a !important;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.45) !important;
}

.sidebar-icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Responsive Dashboard Adaptability */
@media (max-width: 1024px) {
  .dashboard-grid {
    flex-direction: column;
    padding-right: 0;
    align-items: center;
    gap: 30px;
  }
  
  .grid-left-col,
  .grid-right-col {
    max-width: 650px;
    width: 100%;
  }
  
  .floating-sidebar-menu {
    position: fixed;
    bottom: 20px;
    top: auto;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
    padding: 10px 14px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  }
}

/* Training & Record Detail Glass Cards Overrides when rendered in the Dashboard grid */
#profile-view #training-modal.modal-card,
#profile-view #record-modal.modal-card {
  background: rgba(40, 43, 48, 0.45) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(138, 85, 78, 0.6) !important;
  border-radius: 28px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
  padding: 25px 24px !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  margin: 0 !important;
  z-index: 1 !important;
  animation: slideDownIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#profile-view #training-modal .modal-title,
#profile-view #record-modal .modal-title {
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 700;
}

#profile-view #training-modal .modal-subtitle,
#profile-view #record-modal .modal-subtitle {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.85rem;
  margin-top: 4px;
}

#profile-view #training-modal .modal-close,
#profile-view #record-modal .modal-close {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#profile-view #training-modal .modal-close:hover,
#profile-view #record-modal .modal-close:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: rotate(90deg) !important;
}

#profile-view #training-modal .modal-exercise-item,
#profile-view #record-modal .modal-exercise-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(138, 85, 78, 0.2) !important;
  border-radius: 16px !important;
  padding: 12px 16px !important;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}

#profile-view #training-modal .modal-exercise-item:hover,
#profile-view #record-modal .modal-exercise-item:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  transform: translateX(3px);
}

#profile-view #training-modal .modal-exercise-icon,
#profile-view #record-modal .modal-exercise-icon {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#profile-view #training-modal .modal-exercise-name,
#profile-view #record-modal .modal-exercise-name {
  font-weight: 600;
  color: #ffffff !important;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

#profile-view #training-modal .modal-exercise-details,
#profile-view #record-modal .modal-exercise-details {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.8rem;
}

/* Slide Down In entrance animation for details card */
@keyframes slideDownIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    margin-bottom: -20px;
    overflow: hidden;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
  }
}

/* Stretches the body and outer #app-container to occupy 100% of the screen width and height when dashboard is active */
body:not(.landing-bg) {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100vh !important;
  background-color: #22252a !important;
  background: #22252a !important;
}

#profile-view {
  width: 100% !important;
  min-height: 100vh !important;
  box-sizing: border-box;
  overflow-x: hidden;
}

#profile-view .dashboard-content {
  padding: 550px 60px 40px 60px !important;
  box-sizing: border-box;
  width: 100% !important;
  max-width: 1280px !important;
  margin: 0 auto !important;
  position: relative;
  z-index: 10;
}

/* Modal Overlay Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 16, 18, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInDropdown 0.2s ease;
}

.modal-overlay.hidden {
  display: none !important;
}

.create-record-card {
  background: rgba(30, 32, 36, 0.75) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(138, 85, 78, 0.6) !important;
  border-radius: 28px !important;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
  padding: 30px !important;
  width: 90%;
  max-width: 450px;
  animation: slideDownIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Premium Redesign: Dynamic Rows and Side-by-Side Sliding Panels */
.dashboard-section-row {
  display: flex;
  width: 100%;
  gap: 30px;
  margin-bottom: 30px;
  box-sizing: border-box;
}

/* Default state: cards are 100% wide matching the bottom motivation banner */
.dashboard-section-row .training-history-card,
.dashboard-section-row .records-glass-card {
  flex: 1 1 100%;
  width: 100%;
  margin: 0 !important;
  max-width: none !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Side-by-Side: when details modal is open next to history card */
.dashboard-section-row:has(.modal-card:not(.hidden)) .training-history-card,
.dashboard-section-row:has(.modal-card:not(.hidden)) .records-glass-card {
  flex: 0 0 calc(65% - 15px);
  width: calc(65% - 15px);
}

.dashboard-section-row .modal-card {
  flex: 0 0 calc(35% - 15px);
  width: calc(35% - 15px);
  box-sizing: border-box;
  animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Premium Redesign: Bottom Horizontal Motivation Card */
.bottom-motivation-glass-card {
  background: rgba(40, 43, 48, 0.45);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(138, 85, 78, 0.6);
  border-radius: 28px;
  padding: 35px 40px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-sizing: border-box;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.motivation-left-content {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.motivation-accent-tag {
  color: #c77963;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.motivation-banner-title {
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0 0 14px 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.motivation-banner-quote {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.btn-see-progress {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(138, 85, 78, 0.4) !important;
  border-radius: 20px;
  padding: 12px 24px;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.btn-see-progress:hover {
  background: #543734 !important;
  border-color: transparent !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(84, 55, 52, 0.5);
}

.progress-btn-icon {
  width: 18px;
  height: 18px;
  margin-left: 8px;
  stroke: currentColor;
}

.motivation-right-image {
  flex: 1 1 45%;
  height: 250px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

.motivation-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.95) contrast(1.05);
}

/* Premium Redesign: Footer */
.dashboard-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  padding: 40px 0 20px 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 40px;
}

@media (max-width: 768px) {
  #profile-view .dashboard-content {
    padding-top: 220px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .dashboard-section-row {
    flex-direction: column;
    gap: 20px;
  }
  .dashboard-section-row:has(.modal-card:not(.hidden)) .training-history-card,
  .dashboard-section-row:has(.modal-card:not(.hidden)) .records-glass-card {
    flex: 1 1 100%;
    width: 100%;
  }
  .dashboard-section-row .modal-card {
    flex: 1 1 100%;
    width: 100%;
  }
  .bottom-motivation-glass-card {
    flex-direction: column-reverse;
    padding: 25px;
    gap: 25px;
  }
  .motivation-right-image {
    width: 100%;
    height: 180px;
  }
  .motivation-banner-title {
    font-size: 1.6rem;
  }
  
  /* 1) Stack Create Training subview elements vertically for phone width compatibility */
  .create-header-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 15px !important;
  }
  .form-group-inline, .difficulty-wrapper {
    width: 100% !important;
    flex: unset !important;
  }
  .focus-selector {
    flex-direction: column !important;
    gap: 10px !important;
    margin: 15px 0 !important;
  }
  .focus-pill {
    flex: unset !important;
    width: 100% !important;
    padding: 12px 15px !important;
    justify-content: flex-start !important;
  }

  /* 2) Shift barbell higher up, make it very visible (45% opacity), lighten the gradient overlay significantly to cool slate grey */
  body.landing-bg {
    background: linear-gradient(to bottom, #4c515c 0%, rgba(76, 81, 92, 0.4) 40%, rgba(76, 81, 92, 0.8) 100%) !important;
    position: relative !important;
  }
  body.landing-bg::before {
    content: "" !important;
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    z-index: -1 !important;
    background: url('../images/landing_bg_mobile.jpg') no-repeat center 10% !important;
    background-size: cover !important;
    opacity: 0.45 !important; /* Extremely bright and visible barbell image */
    pointer-events: none !important;
  }

  /* Shimmering bronze 3D logo effect matching the coppery button color */
  .logo {
    font-weight: 800 !important;
    background: linear-gradient(135deg, #b56b62 0%, #5a2d27 50%, #b56b62 100%) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 
      0px 1px 1px rgba(255, 255, 255, 0.2),
      0px 4px 6px rgba(0,0,0,0.5) !important;
    animation: shine 4s linear infinite !important;
  }
  .logo::after {
    display: none !important;
  }
  .subtitle {
    color: rgba(255, 255, 255, 0.55) !important; /* Soft, less saturated translucent white */
    font-size: 0.88rem !important; /* Elegant smaller size on phone */
    margin-bottom: 25px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
  }

  /* 3) Push main page header banner down so it is not cropped by the header navigation bar on mobile */
  #profile-view {
    background-position: center 60px !important;
  }

  /* Minimise avatar, logout button and user fullname for mobile */
  #profile-view .top-nav {
    padding: 12px 15px !important;
  }
  #profile-view .top-nav .nav-user {
    gap: 8px !important;
  }
  #profile-view .top-nav #user-fullname {
    font-size: 0.78rem !important;
    max-width: 95px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-right: 2px !important;
  }
  #profile-view .top-nav .user-avatar {
    width: 26px !important;
    height: 26px !important;
    border-radius: 13px !important;
  }
  #profile-view .top-nav .user-avatar svg {
    width: 14px !important;
    height: 14px !important;
  }
  #profile-view .top-nav .logout-btn svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Prevent date inputs and other form elements from overflowing on mobile */
  input[type="date"], .date-input-wrapper, .date-input-wrapper input, .input-glass {
    max-width: 100% !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  /* Prevent date inputs from being too wide and center them horizontally on mobile */
  .date-input-wrapper, #record-date-input {
    max-width: 250px !important;
    width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* Fallback safety bottom margin to avoid overlapping with any floating bottom nav bars (for standard overlays) */
  #profile-view #training-modal.modal-card, #profile-view #record-modal.modal-card {
    margin-bottom: 95px !important;
  }

  /* Style the date input wrapper in the create training modal on mobile to be elegantly short and left-aligned */
  #create-training-subview .date-input-wrapper,
  .create-training-card .date-input-wrapper {
    max-width: 280px !important; /* Shorter, elegant width that never overflows */
    width: 100% !important;
    margin: 0 !important; /* Left-aligned, matching the labels perfectly */
    display: block !important;
  }

  /* Guarantee 100% full-screen modal overlay blur on mobile, covering the dynamic bottom bar safe area */
  .modal-overlay {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important; /* Dynamic viewport height for modern browsers */
    min-height: -webkit-fill-available !important; /* iOS Safari fill viewport fix */
    backdrop-filter: blur(12px) !important; /* Slightly richer premium blur */
    -webkit-backdrop-filter: blur(12px) !important;
  }

  /* Center the card perfectly inside the fixed flex overlay container on mobile */
  #create-training-subview .create-training-card {
    margin: auto !important;
    width: 90% !important; /* Beautiful margins on left and right */
    max-width: 360px !important; /* Slightly narrower to fit perfectly */
    padding: 20px !important; /* Tighter padding to fit the height of the phone */
    border-radius: 28px !important; /* Keeps the gorgeous rounded corners visible */
    box-sizing: border-box !important;
  }

  /* Tighter internal elements inside the training modal on mobile to prevent overflow */
  #create-training-subview .focus-pill {
    padding: 10px 14px !important;
    font-size: 0.88rem !important;
  }

  #create-training-subview .star-rating {
    font-size: 1.35rem !important;
  }

  #create-training-subview .btn-glossy {
    margin-top: 15px !important;
    padding: 12px !important;
    font-size: 0.95rem !important;
  }

  /* Dynamic CSS block to freeze body scroll automatically when any overlay modal or training creation is open */
  body:has(#create-record-overlay:not(.hidden)),
  body:has(#settings-overlay:not(.hidden)),
  body:has(#create-training-subview:not(.hidden)) {
    overflow: hidden !important;
  }

  /* Hide floating sidebar menu when any edit, settings, or training modal is open */
  body:has(#create-record-overlay:not(.hidden)) .floating-sidebar-menu,
  body:has(#settings-overlay:not(.hidden)) .floating-sidebar-menu,
  body:has(#create-training-subview:not(.hidden)) .floating-sidebar-menu {
    display: none !important;
  }
}

/* ============================================================
   SETTINGS PANEL
   ============================================================ */

.settings-panel {
  background: rgba(28, 30, 35, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(138, 85, 78, 0.4);
  border-radius: 28px;
  padding: 30px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  animation: slideDownIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.settings-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.settings-close-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 1.2rem !important;
}

.settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
}

.settings-section {
  padding: 6px 0;
}

.settings-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.settings-input-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  display: block;
  margin-bottom: 8px;
}

.settings-input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.settings-input:focus {
  border-color: rgba(138, 85, 78, 0.8) !important;
  background: rgba(255, 255, 255, 0.09) !important;
}

.settings-input::placeholder {
  color: rgba(255, 255, 255, 0.25) !important;
}

.settings-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 20px 0;
}

.settings-action-btn {
  width: 100%;
  padding: 13px 18px;
  border-radius: 14px;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.settings-btn-primary {
  background: linear-gradient(135deg, #543734 0%, #7a4f4b 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(84, 55, 52, 0.4);
}

.settings-btn-primary:hover {
  background: linear-gradient(135deg, #6a4441 0%, #8a5f5b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(84, 55, 52, 0.5);
}

.settings-btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.settings-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.settings-btn-danger {
  background: rgba(220, 38, 38, 0.12);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

.settings-btn-danger:hover {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.5) !important;
}

.settings-danger-text {
  font-size: 0.78rem;
  color: rgba(248, 113, 113, 0.65);
  line-height: 1.5;
  margin-bottom: 4px;
}

/* Keyframes for shimmering mobile logo effect */
@keyframes shine {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

/* Premium input error styling (glow border) */
.input-error {
  border: 1px solid rgba(239, 68, 68, 0.7) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  transition: all 0.3s ease !important;
}
