/* Mobile Menu Slide-down Animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}
#mobile-menu.open {
  max-height: 500px;
}

/* Explicitly hide mobile elements on desktop */
@media (min-width: 1024px) {
  #mobile-menu-btn,
  #mobile-menu {
    display: none !important;
  }
}

/* Hamburger Icon Animation */
.hamburger-line {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  transform-origin: center;
}
.hamburger-open .line-1 {
  transform: translateY(6px) rotate(45deg);
}
.hamburger-open .line-2 {
  opacity: 0;
}
.hamburger-open .line-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* Fix for x-overflow globally */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Pricing Card Mobile Text Minimization */
@media (max-width: 767px) {
  .pricing-card h3.text-2xl {
    font-size: 1.125rem !important; /* text-lg */
  }
  .pricing-card .text-right .text-sm {
    font-size: 0.75rem !important; /* text-xs */
  }
  .pricing-card .text-right .text-\[0\.75rem\] {
    font-size: 0.65rem !important;
  }
  .pricing-card h2 {
    font-size: 2rem !important; /* text-3xl */
  }
  .pricing-card .text-\[1\.2rem\] {
    font-size: 1rem !important; /* text-base */
  }
  .pricing-card ul li {
    font-size: 0.95rem !important;
  }
  .pricing-card .text-\[1\.3rem\] {
    font-size: 1rem !important; /* text-base */
  }
  .pricing-card .text-\[0\.9rem\] {
    font-size: 0.8rem !important;
  }
  .pricing-card button {
    font-size: 1.125rem !important; /* text-lg */
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
}

/* =============================================
   SIGNUP PAGE
   ============================================= */

/* ---- Outer wrapper â€” full-viewport, positioned context ---- */
.signup-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

/* ---- Full-page background image ---- */
.signup-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.signup-bg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 25% center;
  display: block;
}

/* ---- Form panel â€” right-side overlay ---- */
.signup-panel {
  position: relative;
  z-index: 10;
  margin-left: auto;               /* push to the right */
  width: 48%;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6.5rem 3rem 3rem;
  overflow-y: auto;
  /* subtle dark backdrop so form is readable over the image */
  background-color: rgba(13, 17, 23, 0.55);
  backdrop-filter: blur(0px);
}

.signup-form-wrap {
  width: 100%;
  max-width: 370px;
}

/* ---------- Heading ---------- */
.signup-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.signup-heading__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
}

.signup-heading__sub {
  font-size: 0.83rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ---------- Form ---------- */
.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.signup-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.signup-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #e5e7eb;
}

.signup-required {
  color: #f87171;
  margin-left: 1px;
}

.signup-optional {
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 400;
  margin-left: 4px;
}

.signup-input {
  width: 100%;
  height: 2.6rem;
  background-color: #3a3d4a;
  border: none;
  border-radius: 8px;
  padding: 0 1rem;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.signup-input:focus {
  background-color: #42455a;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.5);
}

.signup-input::placeholder {
  color: #6b7280;
}

/* ---------- Password wrapper ---------- */
.signup-input-wrap {
  position: relative;
}

.signup-input--pass {
  padding-right: 2.75rem;
}

.signup-eye-btn {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.signup-eye-btn:hover {
  opacity: 1;
}

.signup-eye-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  display: block;
}

/* ---------- Phone number ---------- */
.signup-phone-wrap {
  display: flex;
  align-items: stretch;
  position: relative;
}

.signup-phone-country {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: #3a3d4a;
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 0 0.55rem;
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  height: 2.6rem;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.signup-phone-country:hover {
  background-color: #42455a;
}

.phone-flag-emoji {
  font-size: 1.1rem;
  line-height: 1;
}

.phone-chevron {
  width: 13px;
  height: 13px;
  opacity: 0.6;
  flex-shrink: 0;
}

.signup-phone-input {
  border-radius: 0 8px 8px 0 !important;
  flex: 1;
}

/* Country dropdown */
.phone-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 260px;
  background-color: #1e2030;
  border: 1px solid #3a3d4a;
  border-radius: 10px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  overflow: hidden;
}

.phone-dropdown-search {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #3a3d4a;
}

.phone-search-input {
  width: 100%;
  background: #2a2d3a;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  color: #ffffff;
  font-size: 0.82rem;
  outline: none;
}

.phone-search-input::placeholder {
  color: #6b7280;
}

.phone-country-list {
  max-height: 200px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  scrollbar-width: thin;
  scrollbar-color: #3a3d4a transparent;
}

.phone-country-item {
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  color: #d1d5db;
  cursor: pointer;
  transition: background-color 0.15s;
}

.phone-country-item:hover {
  background-color: #2a2d3a;
  color: #ffffff;
}

.phone-country-item.hidden-item {
  display: none;
}

/* ---------- Terms checkbox ---------- */
.signup-terms {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.1rem;
}

.signup-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: #06b6d4;
  flex-shrink: 0;
}

.signup-terms-label {
  font-size: 0.85rem;
  color: #d1d5db;
  cursor: pointer;
}

/* ---------- Submit button ---------- */
.signup-submit {
  width: 100%;
  height: 3rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  margin-top: 0.3rem;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease, transform 0.15s ease;
  background-image: linear-gradient(90deg, #1a7a6e, #06b6d4) !important;
}

.signup-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.signup-submit:active {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Already have account ---------- */
.signup-signin-link {
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

.signup-signin-anchor {
  color: #06b6d4;
  font-weight: 500;
  text-decoration: none;
  margin-left: 4px;
  transition: opacity 0.2s;
}

.signup-signin-anchor:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ---------- Divider ---------- */
.signup-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.signup-divider__line {
  flex: 1;
  height: 1px;
  background-color: #374151;
}

.signup-divider__text {
  font-size: 0.78rem;
  color: #9ca3af;
  white-space: nowrap;
}

/* ---------- Social icons ---------- */
.signup-social {
  display: flex;
  justify-content: center;
  margin-top: 0.2rem;
  padding-bottom: 1.5rem;
}

.signup-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  height: 48px;
  border-radius: 6px;
  background-color: #ffffff;
  border: 1px solid #4b5563;
  transition: background-color 0.2s, transform 0.15s, border-color 0.2s;
  text-decoration: none;
  margin: 0 auto;
}

.signup-social__btn:hover {
  background-color: #f9fafb;
  border-color: #374151;
  transform: translateY(-2px);
}

.signup-social__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.signup-social__text {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  margin: 0;
  padding: 0;
  line-height: 1;
}

/* =============================================
   SIGNUP RESPONSIVE BREAKPOINTS
   ============================================= */

/* Tablet (768â€“1023px): panel expands to ~55%, less padding */
@media (max-width: 1023px) {
  .signup-page {
    min-height: 100vh;
  }

  .signup-panel {
    width: 58%;
    padding: 6rem 2rem 3rem;
  }
}

/* Small tablet / large mobile: panel takes full width with dark overlay bg */
@media (max-width: 767px) {
  .signup-panel {
    width: 100%;
    background-color: rgba(13, 17, 23, 0.82);
    backdrop-filter: blur(2px);
    padding: 6rem 1.5rem 3rem;
    margin-left: 0;
  }

  .signup-form-wrap {
    max-width: 440px;
    margin: 0 auto;
  }
}

/* Mobile: compact padding, full-width form */
@media (max-width: 480px) {
  .signup-panel {
    padding: 5.5rem 1rem 2.5rem;
  }

  .signup-heading__title {
    font-size: 1.45rem;
  }

  .signup-heading__sub {
    font-size: 0.79rem;
  }

  .signup-form-wrap {
    max-width: 100%;
  }

  .signup-input,
  .signup-phone-country,
  .signup-submit {
    font-size: 0.875rem;
  }

  .signup-social__btn {
    max-width: 100%;
    height: 44px;
  }

  .signup-social__icon {
    width: 20px;
    height: 20px;
  }
}

/* ---------- Signup Alerts ---------- */
.signup-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
  animation: signupFadeIn 0.3s ease-out;
}

@keyframes signupFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.signup-alert--success {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.signup-alert--error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.signup-alert--info {
  background-color: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #22d3ee;
}

.signup-alert__icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.signup-alert-svg {
  width: 1.25rem;
  height: 1.25rem;
}

.signup-alert__content {
  flex: 1;
}

.signup-alert__msg {
  margin: 0;
  font-weight: 500;
}

.signup-alert__list {
  margin: 0;
  padding-left: 1.25rem;
}

.signup-alert__list li {
  margin-bottom: 0.25rem;
}

.signup-alert__list li:last-child {
  margin-bottom: 0;
}

/* =============================================
   LOGIN PAGE
   ============================================= */

.login-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.login-bg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 25% center;
  display: block;
}

.login-panel {
  position: relative;
  z-index: 10;
  margin-left: auto;               /* push to the right */
  width: 50%;
  min-height: 100vh;
  display: flex;
  align-items: center;             /* center form vertically unlike signup */
  justify-content: center;
  padding: 6.5rem 3rem 3rem;
  overflow-y: auto;
  background-color: rgba(13, 17, 23, 0.45); /* subtle dark overlay */
  backdrop-filter: blur(0px);
}

.login-form-wrap {
  width: 100%;
  max-width: 440px; /* slightly wider form for elegant spacing */
}

/* ---------- Heading ---------- */
.login-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}

.login-heading__title {
  font-size: 2.2rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

/* ---------- Form ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.login-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-label {
  font-size: 1.05rem;
  font-weight: 500;
  color: #ffffff;
}

.login-forgot-link {
  font-size: 0.8rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

.login-forgot-link:hover {
  color: #06b6d4;
  text-decoration: underline;
}

.login-input {
  width: 100%;
  height: 3.2rem;
  background-color: rgba(60, 62, 73, 0.6); /* translucent dark fill */
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px; /* pill shape */
  padding: 0 1.5rem;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.login-input:focus {
  background-color: rgba(66, 69, 90, 0.8);
  border-color: rgba(6, 182, 212, 0.8);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.3);
}

/* ---------- Password wrapper ---------- */
.login-input-wrap {
  position: relative;
}

.login-input--pass {
  padding-right: 3.2rem;
}

.login-input-wrap .signup-eye-btn {
  right: 1.25rem;
}

/* ---------- Submit button ---------- */
.login-submit {
  width: 100%;
  height: 3.2rem;
  border: none;
  border-radius: 9999px; /* pill shape */
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  margin-top: 1rem;
  letter-spacing: 0.02em;
  transition: opacity 0.2s, transform 0.15s;
  background-image: linear-gradient(90deg, #1a7a6e, #06b6d4) !important;
}

.login-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Are you new link ---------- */
.login-signup-text {
  text-align: center;
  font-size: 0.92rem;
  color: #cbd5e1;
  margin-top: 0.8rem;
}

.login-signup-anchor {
  color: #06b6d4;
  font-weight: 500;
  text-decoration: underline;
  transition: opacity 0.2s;
}

.login-signup-anchor:hover {
  opacity: 0.8;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1023px) {
  .login-panel {
    width: 60%;
    padding: 6rem 2rem 3rem;
  }
}

@media (max-width: 767px) {
  .login-panel {
    width: 100%;
    background-color: rgba(13, 17, 23, 0.82);
    backdrop-filter: blur(2px);
    padding: 6rem 1.5rem 3rem;
    margin-left: 0;
  }
  .login-form-wrap {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .login-panel {
    padding: 5.5rem 1rem 2.5rem;
  }
  .login-heading__title {
    font-size: 1.8rem;
  }
  .login-input, .login-submit {
    font-size: 0.92rem;
    height: 3rem;
  }
}

/* =============================================
   USER DASHBOARD PAGE
   ============================================= */

.glassmorphism-panel {
  background: rgba(30, 32, 48, 0.45) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.dashboard-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.3) !important;
}

.dashboard-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  border-radius: 9999px;
  padding: 0.6rem 1.35rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-logout-btn:hover {
  background-color: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.02);
}

.dashboard-action-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.dashboard-action-card:hover {
  transform: translateY(-3px);
  background-color: #1A1C23 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* =============================================
   MOBILE RESPONSIVENESS REFINEMENTS
   ============================================= */

@media (max-width: 1023px) {
  /* Dashboard layout columns fallbacks */
  .grid-cols-5 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  /* Dashboard card spacing tweaks */
  .dashboard-card {
    padding: 1.5rem !important;
  }
  .dashboard-action-card {
    padding: 1.25rem !important;
  }
  
  /* Responsive background image alignment */
  .login-bg__img {
    object-position: 25% center !important; /* Keep Synology NAS device in view */
  }
  .signup-bg__img {
    object-position: 25% center !important; /* Keep Synology NAS device in view */
  }
}

@media (max-width: 480px) {
  /* Dashboard small mobile optimizations */
  .dashboard-card {
    padding: 1.25rem !important;
  }
  .dashboard-logout-btn {
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
  }
  
  /* Text and title size adaptations */
  .text-3xl {
    font-size: 1.65rem !important;
  }
  .text-2xl {
    font-size: 1.35rem !important;
  }
  .text-lg {
    font-size: 0.95rem !important;
  }
}

/* =============================================
   BROWSER AUTOFILL STYLING OVERRIDES
   ============================================= */

/* Prevent Chrome/Edge/Safari autofill from overriding input styles */
.signup-input:-webkit-autofill,
.signup-input:-webkit-autofill:hover, 
.signup-input:-webkit-autofill:focus, 
.signup-input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: inset 0 0 0px 1000px #3a3d4a !important;
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover, 
.login-input:-webkit-autofill:focus, 
.login-input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  transition: background-color 5000s ease-in-out 0s;
  box-shadow: inset 0 0 0px 1000px #3c3e49 !important; /* matches the custom translucent aesthetic */
}