@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

/* ============================================
   Account Module Stylesheet (index.php & home.php)
   ============================================ */

:root {
  --ff: "Roboto", sans-serif;
}

/* Signin & Auth Page Layout */
body {
  font-family: "Roboto", sans-serif;
}

body.signin-page {
  background-color: var(--bg-1);
  color: var(--text-1);
  font-family: "Roboto", sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
body.home-page {
  min-height: auto !important;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem;
  box-sizing: border-box;
}

.signin-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1100px;
  align-items: center;
  justify-content: space-between;
  margin: auto 0;
  gap: 4rem;
  margin-bottom: 2rem;
}

.signin-container.no-left {
  justify-content: center;
}

.signin-container.signup-mode .right-panel,
#signup-tab,
#signup-form {
  max-width: 600px;
  width: 100%;
}

.signin-container.signup-mode .right-panel {
  flex: 0 1 600px;
}

.left-panel {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.top-nav {
  position: absolute;
  top: -6rem;
  left: 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content h1 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content h1 svg {
  max-width: 100%;
  height: auto;
  width: clamp(250px, 40vw, 520px);
}

.hero-content h1 svg path,
.hero-content h1 svg rect {
  fill: var(--text-1);
  transition: fill 0.3s ease;
}

.hero-content .subtitle {
  font-size: 1.8rem;
  color: var(--text-1);
  opacity: 0.5;
  margin-top: 1.5rem;
  font-weight: 400;
}

.right-panel {
  flex: 0 1 420px;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.right-panel .logo {
  width: 100%;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  justify-content: center;
}
.right-panel .logo svg {
  width: 50px;
}

.tabs-header {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
  opacity: 0.4;
  cursor: pointer;
  padding: 0.4rem 0;
  transition:
    color 0.2s,
    opacity 0.2s,
    border-color 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -0.6rem;
}

.tab-btn:hover {
  opacity: 0.7;
}

.tab-btn.active {
  color: var(--text-1);
  opacity: 1;
  border-bottom: 2px solid var(--text-1);
}

.form-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--text-1);
  margin-top: 0;
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
  text-align: center;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"] {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 50px;
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

/* Remove number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder {
  color: var(--text-1);
  opacity: 0.4;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus {
  background: var(--bg-2);
  border-color: var(--bg-0);
}

/* Prevent browser autofill/suggestions from altering text or background color */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text-1) !important;
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-2) inset !important;
  transition: background-color 5000s ease-in-out 0s !important;
  caret-color: var(--text-1) !important;
}

.form-actions-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.form-actions-links a {
  color: var(--text-1);
  text-decoration: none;
  transition: opacity 0.2s;
}

/* Input with send OTP button inside */
.input-with-button {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-button input {
  padding-right: 8.5rem;
}

.btn-otp {
  position: absolute;
  right: 2px;
  background: var(--bg-1);
  color: var(--text-1);
  border: 1px solid var(--bg-2);
  border-radius: 50px;
  padding: 0.7rem 1.2rem;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.form-msg {
  font-size: 13px;
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
  line-height: 1.4;
  display: none;
}

.form-msg:not(:empty) {
  display: block;
}

.form-msg.error {
  color: #ff4d4f;
}

.form-msg.success {
  color: #52c41a;
}

.form-msg.warning {
  color: #ffd600;
  font-weight: 500;
}

.form-group-row {
  display: flex;
  gap: 0.8rem;
  width: 100%;
}

.form-group-row .form-group {
  flex: 1;
  width: 50%;
}

.form-select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 50px;
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.9em;
}

.terms-text {
  font-size: 12px;
  color: var(--text-1);
  opacity: 0.7;
  line-height: 1.4;
  text-align: center;
}

.terms-text a {
  color: var(--text-1);
  text-decoration: underline;
  opacity: 0.9;
}

.terms-text a:hover {
  opacity: 1;
}

.btn-submit {
  width: 100%;
  background: var(--bg-0);
  color: var(--text-0);
  border: 1px solid var(--bg-0);
  border-radius: 50px;
  padding: 0.7rem 1rem;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.1s;
  margin-top: 0.5rem;
}

.btn-explore {
  display: block;
  text-align: center;
  width: 100%;
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--bg-0);
  border-radius: 50px;
  padding: 0.7rem 1rem;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-sizing: border-box;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  opacity: 0.6;
  margin-bottom: 0.4rem;
  margin-left: 0.8rem;
}

.birthday-form-group {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  align-items: center;
}

.birthday-form-group select {
  flex: 1;
  width: 33.33%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--bg-2);
  border-radius: 50px;
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.9em;
  padding-right: 1.8rem;
}

.birthday-form-group select option {
  background: var(--bg-1);
  color: var(--text-1);
}

.birthday-form-group select:focus {
  background-color: var(--bg-2);
  border-color: var(--bg-0);
}

.form-msg {
  font-size: 0.9rem;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
  word-break: break-word;
}

.form-msg:empty {
  display: none;
  margin: 0;
}

.form-msg.error {
  color: #ff4d4d;
}

.form-msg.success {
  color: #2ed573;
}

/* Home Page Styles */
body.home-page {
  background-color: var(--bg-1);
  color: var(--text-1);
  font-family: var(--ff);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.home-container {
  max-width: 700px;
  margin: 4rem auto 2rem auto;
  padding: 2.5rem;
  background: var(--bg-2, rgba(255, 255, 255, 0.05));
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.home-container h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.user-card {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(0, 132, 255, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(0, 132, 255, 0.2);
  display: inline-block;
  text-align: left;
  min-width: 280px;
}

.user-card p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.btn-logout {
  background: #ff4d4d;
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 1.5rem;
  transition: opacity 0.2s;
}

.btn-logout:hover {
  opacity: 0.9;
}

.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0084ff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 132, 255, 0.3);
  flex-shrink: 0;
}

.user-avatar-btn:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.logo svg {
  width: 140px;
  height: auto;
}

.logo svg path,
.logo svg rect {
  fill: var(--text-1);
}

/* Responsive styles */
@media (max-width: 900px) {
  .page-wrapper {
    padding: 2rem 1rem;
  }

  .signin-container {
    flex-direction: column;
    gap: 3rem;
    align-items: center;
    margin: 4rem 0;
  }

  .left-panel {
    align-items: center;
    text-align: center;
    display: none;
  }

  .top-nav {
    position: static;
    margin-bottom: 2rem;
  }

  .hero-content {
    align-items: center;
  }

  .right-panel {
    width: 100%;
    max-width: 420px;
  }
}

/* Dashboard Main Wrapper */
.dashboard-wrapper {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 60px);
  width: 100%;
}

/* Sidebar Styling */
.sidebar {
  width: 240px;
  background: var(--bg-1);
  padding: 0.5rem 0.8rem 1.5rem 0.8rem;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar.collapsed {
  display: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: 100%;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1.2rem 0.8rem 0.5rem 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  margin-bottom: 0.6rem;
}

.sidebar-footer-links a {
  color: var(--text-1);
  opacity: 0.6;
  font-size: 12px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.sidebar-footer-links a:hover {
  opacity: 1;
}

.sidebar-copyright {
  font-size: 11px;
  color: var(--text-1);
  opacity: 0.4;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 1.2rem;
  color: var(--text-1);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  opacity: 0.7;
  transition:
    background-color 0.2s,
    opacity 0.2s,
    color 0.2s;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  opacity: 1;
}

.sidebar-link.active {
  background: var(--bg-0);
  color: var(--text-0);
  opacity: 1;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-link.active .sidebar-icon {
  stroke: var(--text-0);
}

/* Top Line Loader directly under header */
.top-line-loader {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 19999;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.top-line-loader.active {
  opacity: 1;
}

.line-loader-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #0084ff 0%, #00c6ff 50%, #0072ff 100%);
  transform-origin: left;
  animation: line-loading-anim 1.2s infinite ease-in-out;
}

@keyframes line-loading-anim {
  0% {
    transform: translateX(-100%) scaleX(0.2);
  }
  50% {
    transform: translateX(0%) scaleX(0.6);
  }
  100% {
    transform: translateX(100%) scaleX(0.2);
  }
}

/* Dashboard Content Area & Loading Overlay */
.dashboard-content {
  flex: 1;
  padding: 1rem;
  overflow-y: visible;
  min-width: 0;
  position: relative;
  transition: opacity 0.3s ease;
}

.dashboard-content.loading-state {
  opacity: 0.75;
}

.content-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(1.5px);
  background: rgba(0, 0, 0, 0.35); /* Darker overlay for dark mode */
}

@media (prefers-color-scheme: light) {
  .content-loading-overlay {
    background: rgba(255, 255, 255, 0.45); /* Lighter overlay for light mode */
  }
}

.content-loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.home-tab-content {
  display: none;
}

.home-tab-content.active {
  display: block;
}

/* Sidebar Responsive Styles */
@media (max-width: 768px) {
  .dashboard-wrapper {
    position: relative;
  }

  .sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 240px;
    height: calc(100vh - 65px);
    z-index: 999;
    background: var(--bg-1);
    transform: translateX(0);
    overflow-y: auto;
    padding: 0 0.8rem;
  }

  .sidebar.collapsed {
    display: block !important;
    transform: translateX(-100%);
  }

  .sidebar-nav {
    flex-direction: column;
    gap: 0.3rem;
    min-height: auto;
  }

  .sidebar-link {
    padding: 0.75rem 1.2rem;
    font-size: 15px;
    white-space: nowrap;
  }

  .dashboard-content {
    padding: 1rem;
    width: 100%;
  }
}

/* Profile Page Header & Cover Card */
.profile-page-container {
  max-width: 850px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-header-card {
  background: var(--bg-1);
  border-radius: 20px;
  overflow: hidden;
}

.cover-image-box {
  width: 100%;
  aspect-ratio: 850 / 320;
  background: linear-gradient(135deg, #0084ff 0%, #00c6ff 50%, #0072ff 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.btn-change-cover {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: var(--bg-2);
  color: var(--text-1);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    background-color 0.2s,
    color 0.2s,
    transform 0.1s;
}

.btn-change-cover:hover {
  background: var(--bg-0);
  color: var(--text-0);
  transform: translateY(-1px);
}

.profile-header-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 2rem 2rem 2rem;
  gap: 1rem;
  position: relative;
}

.profile-avatar-box {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

#profile-avatar-display {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--bg-1);
  overflow: hidden;
  background: #0084ff;
}

#profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-change-avatar {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.15s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.btn-change-avatar:hover {
  background: var(--bg-0);
  color: var(--text-0);
  transform: scale(1.08);
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.profile-user-info h2 {
  font-size: 1.8rem;
  margin: 0 0 0.2rem 0;
  color: var(--text-1);
}

.user-handle {
  font-size: 1rem;
  color: var(--text-1);
  opacity: 0.6;
  margin: 0 0 0.2rem 0;
}

.user-email-text {
  font-size: 0.9rem;
  color: var(--text-1);
  opacity: 0.4;
  margin: 0;
}

.user-bio-text {
  font-size: 0.95rem;
  color: var(--text-1);
  opacity: 0.8;
  margin-top: 0.4rem;
  max-width: 600px;
  line-height: 1.5;
}

.form-textarea {
  width: 100%;
  padding: 0.8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  resize: none;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.form-textarea:focus {
  background: var(--bg-2);
  border-color: var(--bg-0);
}

/* Invalid Field Red Border Highlight */
input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.input-with-suffix input.is-invalid,
.input-with-suffix.is-invalid input,
.form-group input.is-invalid,
.form-group select.is-invalid,
.form-group textarea.is-invalid {
  border: 1px solid #ff4d4f !important;
  border-color: #ff4d4f !important;
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.35) !important;
}

/* Height & Weight Input Suffix styling */
.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-suffix input {
  padding-right: 3rem !important;
  width: 100%;
}

.input-suffix {
  position: absolute;
  right: 1.1rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  opacity: 0.55;
  pointer-events: none;
}

/* Suggestion Chips styling */
.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.suggestion-chips .chip {
  background: var(--bg-2);
  color: var(--text-1);
  opacity: 0.8;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s,
    opacity 0.2s,
    transform 0.1s;
  user-select: none;
}

.suggestion-chips .chip:hover {
  opacity: 1;
  background: var(--bg-0);
  color: var(--text-0);
  transform: translateY(-1px);
}

/* Edit Profile Form Card */
.profile-form-card {
  background: var(--bg-1);
  border-radius: 20px;
  padding: 0;
}

.profile-form-card h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-1);
  padding-bottom: 0.8rem;
}

/* Cropper Modal Overlay */
.cropper-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.cropper-modal-content {
  background: var(--bg-1, #1a1a1a);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 100%;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cropper-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cropper-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text-1);
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-1);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-close-modal:hover {
  opacity: 1;
}

.cropper-image-wrapper {
  max-height: 420px;
  padding: 1.5rem;
  background: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cropper-image-wrapper img {
  max-width: 100%;
  max-height: 380px;
  display: block;
}

.cropper-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-modal-cancel {
  background: transparent;
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-modal-crop {
  background: var(--bg-0, #0084ff);
  color: var(--text-0, #ffffff);
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.5rem;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-modal-crop:hover {
  opacity: 0.9;
}

/* Image Upload Preloader Spinner */
.image-upload-preloader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: inherit;
}

.spinner-icon {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: preloader-spin 0.75s linear infinite;
  flex-shrink: 0;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  display: inline-block;
  vertical-align: middle;
}

@keyframes preloader-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast Notification System */
#toast-container {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.6rem;
  align-items: center;
  max-width: 440px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.4rem;
  color: #ffffff;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.toast.toast-show {
  opacity: 1;
}

.toast.toast-hide {
  opacity: 0;
}

.toast.toast-success {
  background: #0f7439;
}

.toast.toast-error {
  background: #9c0d19;
}

.toast.toast-warning {
  background: #b97900;
}

.toast .toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #ffffff;
}

.toast .toast-msg {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

.toast .toast-close {
  background: none;
  border: none;
  color: #ffffff;
  opacity: 0.75;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: opacity 0.2s;
}

.toast .toast-close:hover {
  opacity: 1;
}

/* Content Section Headers & Toolbars */
.content-dashboard-card {
  background: var(--bg-1);
  border-radius: 16px;
  max-width: 850px;
  margin: 0 auto;
}

.content-page-header {
  margin-bottom: 1.5rem;
}

.content-page-header h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.3rem;
  text-align: center;
}

.content-page-header p {
  text-align: center;
  font-size: 14px;
  color: var(--text-1);
  opacity: 0.65;
}

/* Search Bar & Action Toolbar */
.content-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.content-search-wrapper {
  position: relative;
  width: 100%;
}

.content-search-wrapper svg.search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-1);
  opacity: 0.5;
  pointer-events: none;
}

.content-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  border: 1px solid var(--bg-2);
  border-radius: 50px;
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.content-search-input:focus {
  border-color: #0084ff;
  box-shadow: 0 0 0 3px rgba(0, 132, 255, 0.2);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.btn-create-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-0);
  color: var(--bg-1);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
  flex-shrink: 0;
}

.btn-create-item:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

/* Single-Column List (One Line per Item) */
.item-list-container {
  display: flex;
  flex-direction: column;
}

.item-row {
  padding: 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--bg-2);
  transition:
    border-color 0.2s,
    background-color 0.2s;
}

.item-row:hover {
  background: var(--bg-2);
}

.item-row-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.item-row-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.item-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.item-row-sub {
  font-size: 12px;
  color: var(--text-1);
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-row-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.item-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.item-badge.badge-active,
.item-badge.badge-published,
.item-badge.badge-online,
.item-badge.badge-ready {
  background: rgba(15, 116, 57, 0.15);
  color: #0f7439;
}

.item-badge.badge-draft,
.item-badge.badge-staging,
.item-badge.badge-paused {
  background: rgba(185, 121, 0, 0.15);
  color: #b97900;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-item-action {
  background: transparent;
  border: none;
  color: var(--text-1);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0.7;
  transition:
    opacity 0.2s,
    background-color 0.2s;
}

.btn-item-action:hover {
  opacity: 1;
  background: var(--bg-1);
}

.empty-state-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-1);
  opacity: 0.6;
}
