@font-face{
  font-family:'Roboto';
  font-style:normal;
  font-weight:400;
  font-display:swap;
  src:url('/fonts/Roboto-Regular.woff2') format('woff2'),
      url('/fonts/Roboto-Regular.woff') format('woff');
}

@font-face{
  font-family:'Roboto';
  font-style:normal;
  font-weight:700;
  font-display:swap;
  src:url('/fonts/Roboto-Bold.woff2') format('woff2'),
      url('/fonts/Roboto-Bold.woff') format('woff');
}

:root{
  color-scheme: light;

  /* LIGHT THEME - Softer, warmer, easier on the eyes */

  /* Base Colors - Warm Gray Palette */
  --bg:#c2c7cf;              /* Darker warm gray background */
  --card:#d6d9de;            /* Soft gray cards (not white) */
  --card-elevated:#cdd1d8;   /* Slightly darker for depth */
  --border:#b3b9c2;          /* Warmer medium gray borders */

  /* Typography - Dark text on light */
  --fg:#1f2937;              /* Darker gray text */
  --text:#1f2937;            /* Alias for --fg */
  --muted:#4b5563;           /* Darker medium gray for secondary text */

  /* Accent Colors - Professional blue */
  --accent:#3b82f6;          /* Bright blue */
  --accent2:#2563eb;         /* Standard blue */
  --primary:#3b82f6;         /* Alias for --accent */

  /* Semantic Colors */
  --ok:#10b981;              /* Green for success */
  --error:#ef4444;           /* Red for errors */
  --warning:#f59e0b;         /* Orange for warnings */

  /* Status Badge Colors */
  --status-verified-border:#10b981;
  --status-verified-bg:#d4edda;
  --status-pending-border:#3b82f6;
  --status-pending-bg:#cce5ff;
  --status-invalid-border:#ef4444;
  --status-invalid-bg:#f8d7da;

  /* Navigation - Warmer with backdrop blur */
  --nav-bg:rgba(214, 217, 222, 0.95);
  --nav-text:#1f2937;
  --nav-muted:#4b5563;
  --nav-hover:rgba(59, 130, 246, 0.08);
  --nav-border:rgba(179, 185, 194, 0.8);

  /* Footer */
  --footer-bg:#cdd1d8;
  --footer-text:#1f2937;
  --footer-muted:#4b5563;
  --footer-border:#b3b9c2;

  /* Input Fields */
  --input-bg-light:#e2e5ea;
  --input-text-light:#1f2937;
  --input-bg-dark:#e2e5ea;
  --input-text-dark:#1f2937;
  --input-border-dark:#9ca3af;
  --btn-text:#ffffff;

  /* Utility Colors */
  --white:#ffffff;
  --black:#000000;
  --overlay-light:rgba(205, 209, 216, 0.9);
  --overlay-lighter:rgba(205, 209, 216, 0.7);

  /* Effects & Shadows - Lighter shadows for light theme */
  --ring:0 0 0 3px rgba(59, 130, 246, 0.3);
  --shadow-sm:0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md:0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg:0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-btn:0 2px 4px rgba(59, 130, 246, 0.3);
  --shadow-badge:0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-notification:0 -2px 8px rgba(0, 0, 0, 0.1);

  /* Interactive States */
  --accent-bg-hover:rgba(59, 130, 246, 0.1);
  --accent-bg-focus:rgba(59, 130, 246, 0.2);

  /* Spacing */
  --space-xs:4px;
  --space-sm:8px;
  --space-md:12px;
  --space-lg:16px;
  --space-xl:24px;
  --space-2xl:32px;
  --space-3xl:48px;

  /* Borders */
  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;

  /* Typography */
  --font-sans:'Roboto',system-ui,-apple-system,Segoe UI,Inter,Arial,sans-serif;

  /* Timing */
  --transition-fast:0.1s;
  --transition-base:0.2s;
  --transition-slow:0.3s;

  /* Breakpoints (for documentation) */
  /* --bp-mobile: 480px */
  /* --bp-tablet: 640px */
  /* --bp-desktop: 1024px */
}



*{box-sizing:border-box}
html,body{height:100%}
html{
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

/* Accessibility - Focus styles */
*:focus{
  outline:none;
}

*:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:var(--radius-sm);
}

@media (prefers-reduced-motion: reduce){
  html{
    scroll-behavior:auto;
  }
  *,*::before,*::after{
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
  }
}

body{
  margin:0;
  color:var(--fg);
  font:16px/1.5 var(--font-sans);
  background:
    radial-gradient(ellipse 1000px 600px at 10% 0%, rgba(107, 114, 128, 0.04), transparent 60%),
    radial-gradient(ellipse 800px 500px at 90% 100%, rgba(107, 114, 128, 0.03), transparent 60%),
    var(--bg);
  display:flex;
  justify-content:center;
  align-items:flex-start;
  min-height:100vh;
  padding:var(--space-xl) var(--space-lg);
}



.page-container{
  width:100%;
  max-width:760px;
  display:flex;
  flex-direction:column;
  border-radius:var(--radius-md);
  overflow:hidden;
  box-shadow:var(--shadow-md);
  margin:0 auto;
}

/* Page-specific styles */
p.lede {
  margin: 0 0 var(--space-xl);
  color: var(--muted);
  line-height: 1.6;
  font-size: clamp(1rem, 2vw, 1.1rem);
}

form.signup {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-items: center;
  justify-content: center;
  margin: var(--space-xl) auto 0;
  max-width: 420px;
}

.signup input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--input-bg-light);
  color: var(--input-text-light);
  font-size: 16px;
  min-height: 48px;
  -webkit-appearance: none;
  -webkit-tap-highlight-color:transparent;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}



.signup input:focus {
  outline: none;
  box-shadow: var(--ring);
}

.features-section {
  margin-top: var(--space-2xl);
  padding: 0 var(--space-sm);
}

.features-section h2 {
  text-align: center;
  margin: 0 0 var(--space-2xl);
  font-size: clamp(1.5rem, 4vw, 1.8rem);
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-btn);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

.feature-card {
  background: var(--card-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

@media (hover: hover) and (pointer: fine) {
  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
  }
}

.feature-card h3 {
  margin: 0 0 var(--space-md);
  color: var(--accent);
  font-size: 1.3rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.benefits-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-2xl);
}

.benefits-section h2 {
  margin: var(--space-2xl) 0 var(--space-lg);
  color: var(--accent2);
  font-size: clamp(1.25rem, 3vw, 1.4rem);
}

.benefits-section p {
  margin: 0 0 var(--space-2xl);
  color: var(--muted);
  line-height: 1.6;
  font-size: clamp(1rem, 2vw, 1.1rem);
}

.signup-link {
  text-align: center;
  margin-top: var(--space-xl);
  color: var(--muted);
}

.signup-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  display: inline-block;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color:transparent;
  transition: background-color var(--transition-base);
}

.signup-link a:hover {
  text-decoration: underline;
  background: var(--accent-bg-hover);
}

.signup-link a:focus-visible{
  background: var(--accent-bg-focus);
}

.text-xs {
  margin-top:0.25rem;
}

main{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg) var(--radius-lg) 0 0;
  padding:var(--space-3xl) var(--space-2xl);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  text-align:center;
  border-bottom:none;
  width:100%;
}

.svg-icon {
  width: 2.5rem;
  height: 2.5rem;
}

.img-thumb {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}

h1{
  margin:0 0 var(--space-lg);
  font-size:clamp(32px,5vw,42px);
  letter-spacing:-.01em;
  font-weight:700;
  color:var(--fg);
}

main p,
main ul {
  text-align: left;
}

main h2{
  color:var(--fg);
  margin:var(--space-2xl) 0 var(--space-lg);
  font-size:clamp(24px,4vw,32px);
}

main h3{
  color:var(--accent);
  margin:var(--space-xl) 0 var(--space-md);
  font-size:1.35rem;
}

main h4{
  color:var(--fg);
  margin:var(--space-lg) 0 var(--space-sm);
  font-size:1.15rem;
}

main p{
  margin:0 0 var(--space-lg);
  color:var(--muted);
  line-height:1.6;
}

.footer{
  background:var(--footer-bg);
  border:1px solid var(--footer-border);
  color:var(--footer-text);
  padding:var(--space-2xl) var(--space-xl) var(--space-xl);
  border-radius:0 0 var(--radius-lg) var(--radius-lg);
  margin-top:0;
  box-shadow:var(--shadow-sm);
}

.footer-content{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:var(--space-xl);
  max-width:1200px;
  margin:0 auto var(--space-xl);
  padding:0 var(--space-xl);
}

@media (min-width: 640px){
  .footer-content{
    grid-template-columns:repeat(3, 1fr);
    gap:var(--space-2xl);
  }
}

.footer-section h3{
  margin:0 0 var(--space-lg);
  color:var(--footer-text);
  font-weight:600;
}

.footer-section p{
  color:var(--footer-muted);
  margin:0 0 var(--space-sm);
}

.footer-section ul{
  list-style:none;
  padding:0;
  margin:0;
}

.footer-section ul li{
  margin-bottom:var(--space-sm);
}

.footer-section ul li a{
  color:var(--footer-muted);
  text-decoration:none;
  transition:color var(--transition-base);
  display:inline-block;
  padding:var(--space-xs) 0;
  -webkit-tap-highlight-color:transparent;
}

.footer-section ul li a:hover{
  color:var(--footer-text);
}

.footer-section ul li a:focus-visible{
  color:var(--accent);
  text-decoration:underline;
}

.footer-bottom{
  text-align:center;
  padding-top:var(--space-xl);
  border-top:1px solid var(--footer-border);
  color:var(--footer-muted);
  font-size:0.9rem;
}

.btn{
  padding:var(--space-md) var(--space-xl);
  border:0;
  border-radius:var(--radius-md);
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  color:var(--btn-text);
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  box-shadow:var(--shadow-btn);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:var(--space-sm);
  min-height:48px;
  min-width:48px;
  transition:transform var(--transition-fast) ease, filter var(--transition-base) ease;
  -webkit-tap-highlight-color:transparent;
  text-decoration:none;
}

.btn:hover{filter:brightness(1.05)}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.6; cursor:not-allowed}
.btn-danger{
  background:var(--error);
  color:var(--white);
}
.btn-danger:hover{
  filter:brightness(0.9);
}
.btn-text{
  background:transparent;
  color:var(--muted);
  box-shadow:none;
}
.btn-text:hover{
  color:var(--fg);
  background:rgba(0,0,0,0.05);
}
.btn:focus-visible{
  outline:3px solid var(--accent);
  outline-offset:2px;
}

.btn-container{
  width:100%;
  display:flex;
  justify-content:center;
}

.spinner{
  width:16px;
  height:16px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  display:none;
  animation:spin .8s linear infinite;
}

.btn[data-loading="1"] .spinner{display:inline-block}

#msg{
  margin:var(--space-sm) 0 0;
  font-size:.95rem;
  color:var(--muted);
}

.vh{
  position:absolute !important;
  height:1px;
  width:1px;
  overflow:hidden;
  clip:rect(1px,1px,1px,1px);
}

/* State classes */
.verified{
  color:var(--ok);
}

.pending{
  color:var(--accent2);
}

.invalid,
.attention{
  color:var(--error);
}

.empty{
  color:var(--muted);
}

.muted{
  color:var(--muted);
}

.error{
  color:var(--error);
}

.success{
  color:var(--ok);
}

/* Utility classes */
.text-center{text-align:center}
.text-left{text-align:left}
.text-right{text-align:right}

.hidden{display:none}
.initially-hidden{display:none}
.inline-flex{display:inline-flex}
.block{display:block}
.inline-block{display:inline-block}
.flex{display:flex}

.container-narrow{
  max-width:600px;
  margin-left:auto;
  margin-right:auto;
}

.mt-0{margin-top:0}
.mt-sm{margin-top:var(--space-sm)}
.mt-md{margin-top:var(--space-md)}
.mt-lg{margin-top:var(--space-lg)}
.mt-xl{margin-top:var(--space-xl)}
.mt-2xl{margin-top:var(--space-2xl)}

.mb-0{margin-bottom:0}
.mb-sm{margin-bottom:var(--space-sm)}
.mb-md{margin-bottom:var(--space-md)}
.mb-lg{margin-bottom:var(--space-lg)}
.mb-xl{margin-bottom:var(--space-xl)}
.mb-2xl{margin-bottom:var(--space-2xl)}

/* Mobile-first responsive styles */
@media (max-width: 480px){
  body{
    padding:var(--space-md) var(--space-sm);
  }
  .page-container{
    border-radius:var(--radius-sm);
  }
  main{
    padding:var(--space-xl) var(--space-lg);
  }
  .features-section{
    padding:0 var(--space-xs);
    margin-top:var(--space-2xl);
  }
  .features-section h2{
    margin:0 0 var(--space-xl);
  }
  .feature-card{
    padding:var(--space-lg);
  }
  .feature-card h3{
    font-size:1.15rem;
  }
  .benefits-section{
    padding:0 var(--space-sm);
  }
  .footer{
    padding:var(--space-xl) var(--space-md) var(--space-lg);
  }
  .footer-content{
    gap:var(--space-lg);
    padding:0;
  }
  .signup-link{
    font-size:0.9rem;
  }
}

@media (min-width: 481px) and (max-width: 639px){
  body{
    padding:var(--space-xl) var(--space-lg);
  }
  .page-container{
    border-radius:var(--radius-md);
  }
  main{
    padding:var(--space-2xl) var(--space-xl);
  }
  .footer{
    padding:var(--space-xl) var(--space-lg) var(--space-lg);
  }
  .footer-content{
    gap:var(--space-xl);
    padding:0;
  }
}

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


/* --- SHARED CSS OVERRIDES --- */

/* Shared styles for all pages */

html{
  overflow-y:scroll;
}

body.app-page{
  display:block;
  padding:60px 0 0;
}

.container{
  max-width:900px;
  margin:0 auto;
  padding:20px;
}

/* Navigation Bar */
.main-navbar{
  position:fixed;
  top:0;
  left:50%;
  transform:translateX(-50%);
  max-width:900px;
  width:100%;
  display:flex;
  justify-content:space-around;
  align-items:stretch;
  background:var(--nav-bg);
  border-bottom:1px solid var(--nav-border);
  height:56px;
  z-index:100;
  box-shadow:var(--shadow-sm);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
}



.nav-tab{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  flex:1;
  min-width:72px;
  padding:4px 8px;
  color:var(--muted);
  text-decoration:none;
  transition:all 0.2s ease;
  position:relative;
}

.nav-tab:hover{
  color:var(--nav-text);
  background:var(--nav-hover);
}

.nav-tab.active{
  color:var(--accent2);
  background:var(--nav-hover);
  box-shadow: inset 0 -4px 6px -2px rgba(59, 130, 246, 0.15);
}

.nav-tab.active::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:var(--accent2);
}

.nav-icon-wrapper{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}

.nav-icon{
  width:32px;
  height:32px;
  stroke-width:2;
}

.nav-badge{
  position:absolute;
  top:0px;
  right:-2px;
  background:var(--error);
  color:var(--white);
  font-size:10px;
  font-weight:700;
  min-width:16px;
  height:16px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 4px;
  line-height:1;
  box-shadow:var(--shadow-badge);
}

.nav-label{
  font-size:12px;
  font-weight:500;
  text-align:center;
  line-height:1;
}

@media (min-width: 768px){
  .nav-label{
    font-size:11px;
  }
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:32px;
  margin-bottom:24px;
  box-shadow:var(--shadow-sm);
}



.card h2{
  margin:0 0 16px;
  font-size:1.5rem;
  color:var(--fg);
}

.card-subtext{
  color:var(--muted);
  margin:0 0 16px;
}

.card p{
  margin:0 0 16px;
  color:var(--muted);
  line-height:1.6;
}

.form-stack{
  display:flex;
  flex-direction:column;
  gap:24px;
}

.form-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:8px;
  max-width:520px;
}

.slot-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.slot-title{
  margin:0;
  font-size:1.1rem;
  color:var(--fg);
}

.phone-status{
  font-size:0.85rem;
  padding:4px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
  background:var(--overlay-light);
  text-transform:uppercase;
  letter-spacing:0.04em;
}

.phone-status.verified{
  border-color:var(--status-verified-border);
  background:var(--status-verified-bg);
  color:var(--ok);
}

.phone-status.pending{
  border-color:var(--status-pending-border);
  background:var(--status-pending-bg);
  color:var(--accent2);
}

.phone-status.invalid{
  border-color:var(--status-invalid-border);
  background:var(--status-invalid-bg);
  color:var(--error);
}

.phone-status.empty{
  color:var(--muted);
  background:var(--overlay-light);
}

.status-badge{
  display:inline-block;
  font-size:0.75rem;
  padding:2px 8px;
  border-radius:999px;
  font-weight:500;
}

.status-badge.verified{
  background:var(--status-verified-bg);
  color:var(--ok);
}

.status-badge.pending{
  background:var(--status-pending-bg);
  color:var(--accent2);
}

.divider{
  border:none;
  border-top:1px solid var(--border);
  margin:var(--space-lg) 0;
}

.form-card label{
  font-weight:600;
  color:var(--fg);
}

.form-row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.form-row input{
  flex:1;
  min-width:220px;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--border);
  background:var(--input-bg-light);
  color:var(--fg);
  font-size:1rem;
  caret-color:var(--accent);
}



.form-row input:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:var(--ring);
}

.form-help{
  margin:0;
  color:var(--muted);
  font-size:0.9rem;
}

.form-feedback{
  min-height:1.2em;
  font-size:0.9rem;
  color:var(--muted);
  margin:0;
}

.form-feedback.error{color:var(--error);}
.form-feedback.success{color:var(--ok);}

.current-phone{
  margin:0;
  font-size:0.95rem;
  color:var(--fg);
}

.current-phone.muted{color:var(--muted);}

.status-indicator{
  font-size:1.2rem;
  color:var(--fg);
  transition:color 0.2s ease;
}

.status-indicator.verified{color:var(--ok);}
.status-indicator.pending{color:var(--accent2);}
.status-indicator.attention{color:var(--error);}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
  gap:20px;
  margin-bottom:40px;
}

.stat-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:12px;
  padding:24px;
  box-shadow:var(--shadow-sm);
  text-align: center;
}



.stat-label{
  color:var(--muted);
  font-size:0.85rem;
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.stat-value{
  color:var(--fg);
  font-size:2rem;
  font-weight:700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:48px;
  padding:8px;
  background:transparent;
  border:none;
  border-radius:8px;
  color:var(--fg);
  cursor:pointer;
  transition:background 0.15s ease, transform 0.1s ease, color 0.15s ease;
}

.stat-icon-btn svg{
  width:2rem;
  height:2rem;
  stroke:var(--fg);
  transition:stroke 0.15s ease, transform 0.15s ease;
}

.stat-icon-btn:hover{
  background:var(--bg);
  transform:scale(1.05);
}

.stat-icon-btn:active{
  transform:scale(0.95);
}

.stat-value-link{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  width:100%;
  height:100%;
  min-height:100px;
  padding:16px;
  background:transparent;
  border:none;
  border-radius:12px;
  color:var(--fg);
  font-size:1.25rem;
  font-weight:600;
  cursor:pointer;
  transition:background 0.15s ease, transform 0.1s ease;
}

.stat-value-link svg{
  width:32px;
  height:32px;
  stroke:var(--muted);
  transition:stroke 0.15s ease;
}

.stat-value-link:hover{
  background:var(--bg);
}

.stat-value-link:hover svg{
  stroke:var(--fg);
}

.stat-value-link:active{
  transform:scale(0.98);
}

.account-settings-card{
  background:var(--card);
  box-shadow:none;
  border:1px solid var(--border);
  text-align:left;
  position:relative;
}

.account-settings-card h2{
  text-align:left;
}

.card-close-btn{
  position:absolute;
  top:16px;
  right:16px;
  width:44px;
  height:44px;
  padding:0;
  background:var(--error);
  border:none;
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  transition:opacity 0.2s ease, transform 0.1s ease;
}

.card-close-btn:hover{
  opacity:0.9;
}

.card-close-btn:active{
  transform:scale(0.95);
}

.card-close-btn svg{
  display:block;
  width:24px;
  height:24px;
}

.btn-logout{
  width:100%;
  max-width:180px;
  margin:0 auto;
  display:block;
}

.account-settings-card .action-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
}

.account-settings-card .form-stack{
  max-width:100%;
  margin:0;
}

.account-settings-card .form-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 0;
  border-bottom:1px solid var(--border);
}

.account-settings-card .form-row:last-child{
  border-bottom:none;
}

.account-settings-card .form-label{
  font-weight:600;
  color:var(--muted);
}

.account-settings-card .form-value{
  color:var(--fg);
}

.action-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:16px;
}

.btn-block{
  width:100%;
}

.btn-sm{
  padding:8px 16px;
  font-size:14px;
  min-width:auto;
}

/* Modal Overlay */
.modal-overlay{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.5);
  backdrop-filter:blur(4px);
  z-index:9998;
  animation:fadeIn 0.2s ease-out;
}

.modal-overlay.active{
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Modal Box */
.modal{
  background:var(--card);
  border-radius:12px;
  padding:32px;
  max-width:450px;
  width:90%;
  box-shadow:0 20px 60px rgba(0,0,0,0.3);
  animation:slideIn 0.3s ease-out;
  z-index:9999;
}

.modal-header{
  margin-bottom:20px;
}

.modal-title{
  margin:0;
  font-size:24px;
  font-weight:700;
  color:var(--fg);
}

.modal-body{
  margin-bottom:24px;
  color:var(--muted);
  font-size:16px;
  line-height:1.6;
}

.modal-footer{
  display:flex;
  gap:12px;
  justify-content:flex-end;
}

.modal-footer .btn{
  min-width:100px;
}

/* Modal Animations */
@keyframes fadeIn{
  from{opacity:0;}
  to{opacity:1;}
}

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



.dashboard-footer{
  margin-top:64px;
  padding:0 20px 40px;
}

/* Dashboard footer layout */
.dashboard-footer .footer-content{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:24px;
  padding:32px 0;
  border-top:1px solid var(--border);
}

.footer-left{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.footer-link{
  color:var(--muted);
  text-decoration:none;
  font-size:0.95rem;
  transition:color 0.2s ease;
  font-weight:500;
}

.footer-link:hover,
.footer-link:focus-visible{
  color:var(--accent2);
}

.footer-divider{
  color:var(--muted);
  font-size:0.9rem;
  user-select:none;
}

.logout-link{
  font-weight:600;
}

@media (max-width: 600px){
  .footer-content{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .footer-left{
    width:auto;
    flex:1;
  }
  
  .logout-link {
    margin-left: auto;
  }
}

.status-check{
  margin-left:auto;
  width:24px;
  height:24px;
  flex-shrink:0;
  opacity:1;
  transition:opacity var(--transition-base);
}

.status-check.is-hidden{
  opacity:0;
  visibility:hidden;
}

.btn-secondary{
  background:transparent;
  border:1px solid var(--border);
  color:var(--fg);
  box-shadow:none;
}

.btn-secondary:hover{
  background:var(--card);
  border-color:var(--accent);
}

.btn-primary{
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:var(--btn-text);
  border:none;
}

.btn-primary:hover{
  filter:brightness(1.05);
}

.btn-appointment{
  background:#f59e0b;
  border-color:#f59e0b;
  color:#fff;
  box-shadow:none;
}

.btn-appointment:hover{
  background:#d97706;
  border-color:#d97706;
}

.btn[disabled]{
  opacity:0.7;
  cursor:not-allowed;
  box-shadow:none;
}

.empty-state{
  text-align:center;
  padding:60px 20px;
  color:var(--muted);
}

.empty-state h3{
  color:var(--fg);
  margin:0 0 16px;
  font-size:1.3rem;
}

/* Notification Banner */
@keyframes notificationFadeIn{
  from{opacity:0;transform:translateX(-50%) translateY(30px);}
  to{opacity:1;transform:translateX(-50%) translateY(0);}
}

@keyframes notificationFadeOut{
  from{opacity:1;transform:translateX(-50%) translateY(0);}
  to{opacity:0;transform:translateX(-50%) translateY(30px);}
}

#notification-banner{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:0;
  width:96vw;
  max-width:900px;
  min-height:48px;
  background:var(--card);
  border-top:1px solid var(--border);
  color:var(--fg);
  text-align:center;
  padding:16px;
  padding-bottom:calc(16px + env(safe-area-inset-bottom, 0));
  padding-left:max(16px, env(safe-area-inset-left, 0));
  padding-right:max(16px, env(safe-area-inset-right, 0));
  border-radius:8px 8px 0 0;
  font-size:1rem;
  box-shadow:var(--shadow-notification);
  z-index:9999;
  line-height:1.4;
  display:none;
  opacity:0;
}

#notification-banner.is-visible{
  display:block;
  animation:notificationFadeIn 0.3s ease forwards;
}

#notification-banner.is-hiding{
  display:block;
  animation:notificationFadeOut 0.4s ease forwards;
}

/* Transaction list styles */
.transaction-item {
  border-bottom: 1px solid var(--border);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: background-color 0.2s ease;
}

.transaction-item:hover {
  background: rgba(59, 130, 246, 0.05);
}

.transaction-item:last-child {
  border-bottom: none;
}

@media (max-width: 768px) {
  .transaction-item {
    flex-direction: column;
    gap: 12px;
  }

  .transaction-item > div:last-child {
    text-align: left;
    min-width: auto;
  }
}

/* Message list styles */
.message-list-simple {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.message-item {
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
  background: var(--bg);
}

.message-item:last-child {
  border-bottom: none;
}

.message-item.expanded {
  background: var(--card);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  margin: 8px 0;
}

.message-item.unread {
  background: var(--card);
}

/* --- MESSAGES PAGE STYLES --- */

.message-row {
  display: grid;
  grid-template-columns: 2fr 3fr 1.2fr;
  gap: 16px;
  padding: 12px 16px;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
  background: inherit;
}

.message-row:hover {
  background: rgba(59, 130, 246, 0.05);
}

.message-item.unread .message-from {
  color: var(--fg);
  font-weight: 700;
}

.message-from {
  font-size: 14px;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.message-subject {
  font-size: 14px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Override generic bold weight for subject in list */
.message-list-simple .message-subject {
  font-weight: normal; 
}
.message-list-simple .message-item.unread .message-subject {
  font-weight: 600;
}

.message-datetime {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.attachment-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  vertical-align: middle;
}

.btn-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

.file-type-icon {
  width: 32px;
  height: 32px;
}

.unread-indicator {
  color: var(--accent);
  font-size: 8px;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.message-body {
  display: none;
  padding: 0 16px 16px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
}

.message-item.expanded .message-body {
  display: block;
}

.message-content {
  background: var(--bg);
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  line-height: 1.5;
  border: 1px solid var(--border);
}

.link-accent {
color: var(--accent);
}

/* Reply Form */
.reply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reply-subject {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
  background: var(--input-bg-light);
  color: var(--input-text-light);
}

.reply-subject:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.reply-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  background: var(--input-bg-light);
  color: var(--input-text-light);
}

.reply-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.reply-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}

.reply-actions-right {
  display: flex;
  gap: 8px;
}

.btn-reply {
  padding: 8px 20px;
  background: var(--accent);
  color: var(--btn-text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

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

.btn-reply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-cancel {
  padding: 8px 20px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s ease;
}

.btn-cancel:hover {
  color: var(--fg);
}

.btn-delete {
  padding: 8px 16px;
  background: var(--error, #ef4444);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

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

.btn-delete:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Compose Card */
.compose-card {
  overflow: hidden;
}

.compose-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--accent);
  color: var(--btn-text);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.compose-header:hover {
  opacity: 0.95;
}

.compose-card .compose-toggle {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.compose-card.expanded .compose-toggle {
  transform: rotate(180deg);
}

.compose-body {
  display: none;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.compose-card.expanded .compose-body {
  display: block;
}

.compose-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compose-form input,
.compose-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
}

.compose-form input:focus,
.compose-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.compose-form textarea {
  min-height: 120px;
  resize: vertical;
}

.compose-form label {
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
  font-size: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

/* Attachments */
.attachment-container {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.attachment-label {
  font-size: 13px;
  color: var(--fg);
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

.attachment-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.attachment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 120px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.attachment-thumb {
  display: block;
  width: 100px;
  height: 80px;
  margin-bottom: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
  text-decoration: none;
}

.attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 32px;
  text-decoration: none;
}

.attachment-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.attachment-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* File Picker */
.file-picker-btn {
  width: 100%;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.file-picker-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.file-picker-toggle-icon {
  font-size: 18px;
  transition: transform 0.2s;
}

.file-picker-toggle-icon.is-open {
  transform: rotate(180deg);
}

.file-picker-grid {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
  max-height: 340px;
  overflow-y: auto;
}

.file-picker-grid.is-open {
  display: grid;
}

.file-picker-btn.is-open {
  border-color: var(--accent);
}

.file-thumbnail {
  cursor: pointer;
  padding: 8px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.file-thumbnail:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-thumbnail:active {
  transform: translateY(0);
}

.file-thumb-container {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
}

.file-thumb-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.file-thumb-text {
  font-size: 48px;
}

.file-info {
  width: 100%;
  text-align: center;
}

.file-name {
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.selected-files-area {
  display: none;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.selected-files-label {
  font-size: 13px;
  color: var(--fg);
  font-weight: bold;
}

.selected-files-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Selected file item in compose form */
.selected-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.selected-file-item-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.selected-file-item-filename {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-file-btn {
  background: transparent;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
}

/* Small icon utility */
.icon-sm {
  width: 16px;
  height: 16px;
}

/* --- DASHBOARD PAGE STYLES --- */

/* Dashboard-specific overrides */
.nav-tab.active::before {
  height: 2px;
}

/* Welcome Card for new users */
.welcome-card {
  background: linear-gradient(135deg, var(--accent, #4f8ff7), var(--accent-light, #7bb4fb) 100%);
  border: 2px solid var(--accent, #4f8ff7);
  color: var(--white, #fff);
  box-shadow: var(--shadow-lg);
}

.welcome-card h2 {
  color: var(--white, #fff);
}

.welcome-card .card-subtext {
  color: rgba(255, 255, 255, 0.95);
}

.welcome-card .form-help {
  color: rgba(255, 255, 255, 0.9);
}

.welcome-card input {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--fg);
}

.welcome-card input:focus {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.welcome-card .btn {
  background: #1e293b;
  color: #fff;
  border: 2px solid #334155;
  font-weight: 600;
}

.welcome-card .btn:hover {
  background: #334155;
  border-color: #475569;
  transform: translateY(-1px);
}

.welcome-card .form-feedback {
  color: #fff;
  font-weight: 500;
}

.welcome-card .form-feedback.error {
  color: #fee;
  background: rgba(220, 38, 38, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
}

.welcome-card .form-feedback.success {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
}

/* Animation classes */
.welcome-card.form-complete h2,
.welcome-card.form-complete .card-subtext,
.welcome-card.form-complete #usernameForm {
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card.highlight {
  animation: highlight 2s ease;
}

@keyframes highlight {
  0%, 100% { box-shadow: var(--shadow-sm); transform: scale(1); }
  50% { box-shadow: 0 0 0 3px var(--accent2); transform: scale(1.02); }
}

/* --- FRIENDS PAGE STYLES --- */

.friends-layout {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.friends-section {
  flex: 1;
  min-width: 300px;
}

.friend-code-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--bg);
}

.friend-code-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-code-text {
  font-family: monospace;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
}

.friend-code-meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.no-uploads {
color: var(--muted);
font-size: 13px;
margin: 8px 0;
}

.btn-copy {
  padding: 8px 16px;
  font-size: 0.875rem;
  line-height: 1.25;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  background-color: var(--accent);
  color: var(--white);
  transition: all 0.2s ease;
  font-weight: 500;
}

.btn-copy:hover {
  background-color: var(--accent2);
  border-color: var(--accent2);
  opacity: 0.95;
}

.add-friend-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--bg);
}

.add-friend-input {
  font-family: monospace;
  font-size: 1.125rem;
  font-weight: 600;
  width: 100%;
  max-width: 12ch;
  padding: 8px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input-bg-light);
  color: var(--fg);
}

.add-friend-input::placeholder {
  color: var(--muted);
  opacity: 0.4;
  font-weight: 400;
}

.add-friend-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg-hover);
}

.btn-add {
  padding: 8px 16px;
  font-size: 0.875rem;
  line-height: 1.25;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  background-color: var(--accent);
  color: var(--white);
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

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

.friend-item {
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.friend-item:last-child {
  border-bottom: none;
}

.friend-item-table {
  width: 100%;
  border-collapse: collapse;
}

.friend-item-cell {
  width: 33%;
  padding: 1rem 0.5rem 1rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  vertical-align: top;
}

.friend-item-cell-name {
  width: 33%;
  padding: 1rem 0.5rem 1rem 0;
  font-weight: 600;
  font-size: 1rem;
  vertical-align: top;
}

.friend-item-row {
  margin-bottom: 0.25rem;
}

.note-chevron {
  margin-left: 0.5rem;
  color: var(--muted);
  transition: transform 0.2s;
}

/* Friend Note Section */
.friend-note-section {
  display: none;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--border);
}

.friend-note-section.is-open {
  display: block;
}

.note-chevron {
  margin-left: 0.5rem;
  color: var(--muted);
  transition: transform 0.2s;
  display: inline-block;
}

.note-chevron.is-open {
  transform: rotate(180deg);
}

.note-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  background: var(--input-bg-light);
  color: var(--fg);
}

.note-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.note-actions {
  margin-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-save-note {
  padding: 0.5rem 1.25rem;
  background: var(--fg);
  color: var(--card);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.btn-save-note:hover {
  opacity: 0.9;
}

.btn-save-note:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.note-status {
  font-size: 0.85rem;
  color: var(--muted);
}

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

.friend-name {
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.expert-badge {
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: normal;
}

.friend-meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
}

.btn-remove {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--error);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background: var(--status-invalid-bg);
  border-color: var(--error);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .friends-layout {
    flex-direction: column;
  }
}

/* Rate Setting Styles */
.rate-setting-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  background: var(--bg);
}

.rate-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rate-currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
}

.rate-input {
  font-size: 1.25rem;
  font-weight: 600;
  width: 80px;
  padding: 8px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input-bg-light);
  color: var(--fg);
}

.rate-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg-hover);
}

.rate-suffix {
  font-size: 1rem;
  color: var(--muted);
}

.btn-save-rate {
  padding: 8px 16px;
  font-size: 0.875rem;
  line-height: 1.25;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  background-color: var(--accent);
  color: var(--white);
  transition: all 0.2s ease;
  font-weight: 500;
}

.btn-save-rate:hover {
  background-color: var(--accent2);
  border-color: var(--accent2);
  opacity: 0.95;
}

.btn-save-rate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- FILES PAGE STYLES --- */

/* Upload Form */
.files-upload-card {
  margin-top: 0;
}

.files-upload-form {
  margin-top: 20px;
}

.form-group-upload {
  margin-bottom: 15px;
}

.form-label-upload {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-input-upload {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg-light);
  color: var(--fg);
}

.upload-help-text {
  margin-bottom: 15px;
  font-size: 0.9em;
  color: var(--muted);
  line-height: 1.5;
}

.btn-upload {
  background: var(--accent2);
  color: var(--white);
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

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

/* Files List */
.files-list-card {
  margin-top: 20px;
}

.files-empty-state {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.files-empty-state p {
  margin: 5px 0;
}

.file-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: var(--card);
  transition: border-color 0.2s ease;
}

.file-item:hover {
  border-color: var(--accent);
}

.file-item-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.file-thumbnail-container {
  margin-right: 15px;
  flex-shrink: 0;
}

.file-thumbnail-img {
  width: 128px;
  height: 96px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg);
}

.file-icon-img {
  width: 128px;
  height: 96px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.video-thumbnail-wrapper {
  position: relative;
  cursor: pointer;
  width: 128px;
  height: 96px;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-play-icon {
  width: 12px;
  height: 12px;
  fill: white;
  margin-left: 2px;
}

.file-info-col {
  flex: 1;
  min-width: 200px;
}

.file-name-text {
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--fg);
  word-break: break-all;
}

.file-meta-text {
  font-size: 0.9em;
  color: var(--muted);
}

.file-date-text {
  font-size: 0.85em;
  color: var(--muted);
  margin-top: 3px;
}

.file-dimensions-text {
  font-size: 0.9em;
  color: var(--muted);
}

.file-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-file-action {
  padding: 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  height: 32px;
  width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.btn-file-action:hover {
  opacity: 0.9;
}

.btn-copy-link {
  background: var(--ok);
  color: white;
}

.btn-open-link {
  background: var(--accent2);
  color: white;
}

.btn-delete-file {
  background: var(--error);
  color: white;
}

/* Media Popup */
.media-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.media-popup-container {
  position: relative;
  display: inline-block;
}

.media-popup-content {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  cursor: default;
}

.media-popup-close {
  position: absolute;
  top: -24px;
  right: -24px;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.5);
  z-index: 10000;
  transition: all 0.2s ease;
}

.media-popup-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  transform: scale(1.05);
}

/* --- EARNINGS PAGE STYLES --- */

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

.month-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--fg);
  font-size: 0.9em;
  cursor: pointer;
}

.earnings-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.earnings-empty-icon {
  font-size: 3em;
  margin-bottom: 16px;
}

.earnings-empty-title {
  margin-bottom: 8px;
  color: var(--fg);
}



.transaction-left {
  display: flex;
  gap: 16px;
  flex: 1;
}

.transaction-icon {
  font-size: 1.5em;
  line-height: 1;
}

.transaction-details {
  flex: 1;
  min-width: 0;
}

.transaction-description {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--fg);
}

.transaction-meta {
  font-size: 0.85em;
  color: var(--muted);
  margin-bottom: 4px;
}

.transaction-meta span {
  margin-right: 12px;
}

.transaction-date {
  font-size: 0.9em;
  color: var(--muted);
}

.transaction-fee {
  margin-left: 12px;
  opacity: 0.7;
}

.transaction-right {
  text-align: right;
  min-width: 100px;
}

.transaction-amount {
  font-weight: 700;
  font-size: 1.1em;
}

.stats-container {
  margin-top: 20px;
}

.stat-icon {
  font-size: 1.5em;
  margin-bottom: 8px;
}

.stat-total {
  font-size: 0.85em;
  color: var(--muted);
}

.inbox-card {
  padding: 16px;
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }
}

/* ==========================================
   Help / Support Form Styles
   ========================================== */

.card-description {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* Form group spacing */
#helpForm .form-group {
  margin-bottom: 20px;
}

#helpForm .form-group:last-child {
  margin-bottom: 0;
  margin-top: 28px;
}

#helpForm label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--fg);
}

#helpForm .form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#helpForm .form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#helpForm select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

#helpForm textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

.form-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Alert styles */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #16a34a;
}

.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
  }
  
  .alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
  }
}
