/* Reset and base styles */

/* Representatives page styles */
.search-group {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.member-counter {
    margin: 0px 0;
    font-weight: bold;
}

.member-counter span {
    color: #0066cc; /* Highlight the count number */
}

/* Password field styles */
.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
}

.password-requirements {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #6b7280;
}

.password-requirements ul {
    margin-top: 5px;
    padding-left: 20px;
    list-style-type: disc;
}

.password-requirements li {
    padding: 0px 0px 0px 0px;
    position: relative;
}

.password-requirements li::after {
    margin-left: 8px;
    font-weight: bold;
    font-size: 16px;
}

.password-requirements li.rule-pending::after {
    content: '';
}

.password-requirements li.rule-valid::after {
    content: '✓';
    color: #2d8f3d;
}

.password-requirements li.rule-invalid::after {
    content: '✗';
    color: #c0392b;
}

.password-requirements li.rule-valid {
    color: #2d8f3d;
}

.password-requirements li.rule-invalid {
    color: #c0392b;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.change-password-page .form-container h2 {
  margin-bottom: 0px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

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

/* Navigation */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Hide mobile elements on desktop and tablets */
@media screen and (min-width: 768px) {
  .nav-toggle,
  .close-menu,
  .backdrop,
  .hamburger {
    display: none !important;
  }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #2563eb;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563eb;
}

/* Buttons */
.btn-primary {
    background: #2563eb;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
}

.navbar .nav-container .nav-links a.btn-primary {
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid #2563eb;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.mockup-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    color: #333;
}

.card-header h3 {
    color: #2563eb;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.trade-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

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

.trade-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.trade-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.trade-type.buy {
    background: #dcfce7;
    color: #166534;
}

.trade-type.sell {
    background: #fee2e2;
    color: #dc2626;
}

.trade-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.ticker {
    font-weight: 600;
    color: #2563eb;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: white;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #1f2937;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: 12px;
    background: #f8fafc;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Target Audience Section */
.target-audience {
    padding: 80px 0;
    background: #f8fafc;
}

.target-audience h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #1f2937;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.audience-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.audience-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1f2937;
}

.audience-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: #f9fafb;
}

.footer-section a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    color: #9ca3af;
}

/* Form Styles */
.form-container {
    max-width: 400px;
    margin: 20px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1f2937;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.form-group.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.form-submit {
    width: 100%;
    margin-top: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}

.form-footer a {
    color: #2563eb;
    text-decoration: none;
}

/* Dashboard Styles */
.dashboard-header {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-header h1 {
    color: #1f2937;
    margin-bottom: 10px;
}

.dashboard-header p {
    color: #6b7280;
}

.dashboard-content {
    padding: 20px 0px 40px 0px;
}

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

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 10px;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
}

.trades-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.trades-header {
    padding: 0px 0px 10px 0px;
    border-bottom: 1px solid #e5e7eb;
}

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

.trades-header h2 {
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info icon styling */
.info-icon-wrapper {
    display: inline-flex;
    align-items: center;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #6b7280;
    cursor: help;
    transition: color 0.2s ease;
    position: relative;
}

.info-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.info-icon:hover {
    color: #3b82f6;
}

/* Custom CSS tooltip */
.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: #1f2937;
    color: white;
    font-size: 13px;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.info-icon::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 6px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.info-icon:hover::after,
.info-icon:hover::before {
    opacity: 1;
}

/* Mobile responsive tooltip */
@media (max-width: 768px) {
    .info-icon::after {
        white-space: normal;
        max-width: 250px;
        left: auto;
        right: 0;
        transform: none;
    }
    
    .info-icon::before {
        left: auto;
        right: 10px;
        transform: none;
    }
}

.trades-list {
    padding: 0;
}

.trade-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    padding: 20px 30px;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.trade-row:last-child {
    border-bottom: none;
}

.trade-row:hover {
    background: #f9fafb;
}

.trade-member {
    font-weight: 600;
    color: #1f2937;
}

.trade-asset {
    font-weight: 500;
}

.trade-ticker {
    color: #2563eb;
    font-weight: 600;
}

.trade-amount {
    color: #6b7280;
}

.trade-date {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Pricing Styles */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    max-width: 800px;      /* ✅ Limit the width to fit ~2 cards */
    margin: 0 auto;        /* ✅ Center the entire grid block */
}

.pricing-page .pricing-card {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  text-align: center;
  position: relative;
  transition: transform 0.3s ease;
}

.change-plans-page .pricing-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  text-align: center;
  position: relative;
  transition: transform 0.3s ease;
}

.home-page .pricing-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.featured {
    border: 2px solid #2563eb;
    transform: scale(1.05);
}

.pricing-card.featured::before {
    content: "Most Popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 20px;
}

.pricing-price .period {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin: 30px 0;
}

.pricing-features li {
    padding: 10px 0;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    margin-right: 10px;
}

/* Admin Styles */
.admin-sidebar {
    background: #1f2937;
    color: white;
    width: 250px;
    min-height: 100vh;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
}

.admin-sidebar h3 {
    padding: 0 20px;
    margin-bottom: 30px;
    color: #f9fafb;
}

.admin-nav {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 5px;
}

.admin-nav a {
    display: block;
    padding: 12px 20px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #374151;
    color: #f9fafb;
}

.admin-content {
    margin-left: 250px;
    padding: 40px;
}

.admin-header {
    margin-bottom: 40px;
}

.admin-header h1 {
    color: #1f2937;
    margin-bottom: 10px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-card h3 {
    color: #1f2937;
    margin-bottom: 20px;
}

/* Representatives Styles */
.representatives-header {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid #e5e7eb;
}

.representatives-header h1 {
    color: #1f2937;
    margin-bottom: 10px;
}

.representatives-header p {
    color: #6b7280;
}

.representatives-content {
    padding: 40px 0;
}

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

.representative-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.representative-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.rep-info h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.rep-party {
    color: #6b7280;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.rep-district {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.rep-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.rep-stats .stat {
    text-align: center;
}

.rep-stats .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

.rep-stats .stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.follow-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid #2563eb;
    background: transparent;
    color: #2563eb;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.follow-btn:hover {
    background: #2563eb;
    color: white;
}

.follow-btn.following {
    background: #2563eb;
    color: white;
}

.follow-btn.following:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Pricing Hero Styles */
.home-page .pricing-hero {
    padding: 80px 0;
    background: white;
}

.pricing-page .pricing-hero {
    padding: 80px 0;
    background: #f8fafc;
}

.pricing-header {
    text-align: center;
    margin-bottom: 60px;
}

.pricing-header h1 {
    font-size: 3rem;
    color: #1f2937;
    margin-bottom: 20px;
}

.pricing-hero h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0px;
    color: #1f2937;
}

.pricing-header p {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-info {
    margin-top: 80px;
    text-align: center;
}

.pricing-info h3 {
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 40px;
}

.pricing-number {
    font-size: 1.3rem;
    color: #2563eb;
}

/* FAQ Section Styles */
.faq-section {
    padding: 80px 0;
    background: #f8fafc;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #1f2937;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    background: white;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    /* font-weight: 600; */
    color: #1f2937;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-item.active .faq-question {
    background: #f8fafc;
    /* color: #2563eb; */
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    /* color: #2563eb; */
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 25px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px 25px;
}

.faq-answer p {
    margin-bottom: 5px;
    color: #6b7280;
    line-height: 1.6;
    font-size: 1rem;
}

.bottom-cta-button {
    text-align: center;
    margin-top: 50px;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    text-align: left;
    gap: 20px;
}

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

/* Center feature items specifically on pricing page */
.pricing-info .feature-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.pricing-info .feature-icon {
    margin-bottom: 8px;
}

.feature-item h4 {
    color: #1f2937;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Trade Filters */
.trade-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Responsive Design */

/* Large Mobile/Small Tablets */
@media screen and (max-width: 1024px) {
    /* Large phone/small tablet styles */
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .nav-links {
        gap: 20px;
    }
    
    .pricing-card.featured {
        transform: scale(1.03);
    }
    
    .admin-sidebar {
        width: 220px;
    }
    
    .admin-content {
        margin-left: 220px;
        padding: 30px;
    }
}

/* Medium Mobile (most modern phones) */
@media screen and (max-width: 767px) {
    /* Medium-sized phone styles */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .features-grid,
    .audience-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .trade-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .representatives-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .pricing-header h1 {
        font-size: 2rem;
    }
}

/* Standard Mobile (smaller phones) */
@media screen and (max-width: 480px) {
    /* Base mobile styles */
    .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 32px; height: 32px; cursor: pointer; z-index: 10002; margin-left: auto; }
    .hamburger span { display: block; height: 2px; width: 100%; background: #374151; transition: 0.2s ease; }
    .nav-toggle { display: none; }
    .nav-links { position: fixed; top: 0; right: 0; height: 100vh; width: 80%; max-width: 320px; background: #fff; box-shadow: -2px 0 10px rgba(0,0,0,0.1); padding: 80px 24px 24px; transform: translateX(100%); transition: transform 0.25s ease; display: flex; flex-direction: column; gap: 16px; z-index: 10001; }
    .close-menu { position: absolute; top: 16px; right: 16px; font-size: 28px; line-height: 1; cursor: pointer; color: #374151; }
    .backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 10000; }
    #nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    #nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
    #nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
    #nav-toggle:checked ~ .nav-links { transform: translateX(0); }
    #nav-toggle:checked ~ .backdrop { opacity: 1; pointer-events: auto; }
    #nav-toggle:checked ~ .hamburger { display: none; }

    /* Dashboard mobile tweaks */
    .dashboard-page { font-size: 18px; }
    .dashboard-page .dashboard-header h1 { font-size: 1.8rem; }
    .dashboard-page .dashboard-header p { font-size: 1rem; }

    .dashboard-page .nav-container,
    .dashboard-page .container { padding-left: 10px; padding-right: 10px; }
    .dashboard-page .dashboard-header { border-bottom: none; margin: 10px; }

    .dashboard-page .stats-grid { gap: 12px; }
    .dashboard-page .stat-card { border-radius: 0; box-shadow: none; }
    .dashboard-page .stat-number { font-size: 2rem; }
    .dashboard-page .stat-label { font-size: 0.95rem; }

    .dashboard-page .trades-section { border-radius: 0; box-shadow: none; }
    .dashboard-page .trade-row { padding-left: 16px; padding-right: 16px; }
    .dashboard-page .trade-member { font-size: 1rem; }
    .dashboard-page .trade-asset,
    .dashboard-page .trade-amount,
    .dashboard-page .trade-date { font-size: 0.95rem; }
    .dashboard-page .trade-ticker { font-size: 1rem; }

    .dashboard-page .upgrade-banner { border-radius: 0 !important; margin-left: 0; margin-right: 0; }
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}
  
.trades-table th, .trades-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap; /* prevent wrapping */
}
  
.trades-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Asset column - allow smart wrapping for long names */
.trades-table td:nth-child(4),
.trades-table th:nth-child(4) {
    max-width: 450px;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

/* Transaction type styling */
.transaction-type-purchase {
    color: #10b981;
}

.transaction-type-sale {
    color: #ef4444;
}
  
.table-responsive {
    width: 100%;
    overflow-x: auto; /* enable horizontal scroll on small screens */
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
}

/* Admin Dashboard Specific Styles */
/* Admin mobile responsiveness */
@media (max-width: 900px) {
    .admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #ffffff; box-shadow: 0 1px 4px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 10002; }
    .admin-topbar h2 { font-size: 1.1rem; margin: 0; color: #1f2937; }

    /* Off-canvas sidebar */
    .admin-sidebar { position: fixed; top: 0; right: 0; left: auto; height: 100vh; width: 280px; transform: translateX(100%); transition: transform 0.25s ease; z-index: 10003; background: #1f2937; }
    /* bring sidebar into view when checkbox is checked from right */
    #admin-nav-toggle:checked ~ .admin-sidebar { transform: translateX(0); }
    #admin-nav-toggle:checked ~ .admin-topbar .hamburger { display: none; }
    #admin-nav-toggle:checked ~ .backdrop { opacity: 1; pointer-events: auto; }

    /* Use the global hamburger/backdrop styles */
    .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 32px; height: 32px; cursor: pointer; }
    .hamburger span { display: block; height: 2px; width: 100%; background: #374151; transition: 0.2s ease; }
    .nav-toggle { display: none; }
    .backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 10000; }
    .close-menu { position: absolute; top: 12px; right: 12px; font-size: 28px; line-height: 1; color: #e5e7eb; cursor: pointer; }

    /* Stack admin content below topbar */
    .admin-content { margin-left: 0; padding: 16px; }
}

@media (min-width: 901px) {
    .admin-topbar { display: none; }
}

/* Activity list styles */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.activity-time {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 5px;
}

.activity-text {
    color: #374151;
    font-weight: 500;
}

/* Health indicators styles */
.health-indicators {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.health-label {
    font-weight: 500;
    color: #374151;
}

.health-status {
    font-weight: 600;
    font-size: 0.9rem;
}

.health-status.good {
    color: #10b981;
}

.health-status.warning {
    color: #f59e0b;
}

.health-status.error {
    color: #ef4444;
}

/* Toggle switch styles */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { display: none; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #e5e7eb; transition: .2s; border-radius: 9999px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; top: 3px; background-color: white; transition: .2s; border-radius: 9999px; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
input:checked + .slider { background-color: #2563eb; }
input:checked + .slider:before { transform: translateX(20px); }
.form-group.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-group.toggle .toggle-text { margin-bottom: 0; font-weight: 500; color: #374151; }

/* Alert messages */
.alert {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-weight: 500;
}

.alert-error {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #ef4444;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #10b981;
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

/* Pagination Styles */
.pagination-controls {
  display: flex;
  align-items: center;
}

.pagination-controls form {
  display: flex;
  align-items: center;
}

.pagination-controls label {
  margin-right: 8px;
}

.pagination-controls select {
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.pagination-controls span {
  margin-left: 8px;
}

.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background-color: transparent;
  max-width: 100%;
}

.pagination-info {
  color: #6b7280;
  font-size: 0.875rem;
  order: -1;
}

.pagination-link {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-decoration: none;
  color: #374151;
  background: white;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pagination-link:hover:not(.disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.pagination-link.disabled {
  color: #9ca3af;
  background: #f9fafb;
  cursor: not-allowed;
  pointer-events: none;
  border: 1px solid #e5e7eb;
}

.pagination-current {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px;
  border: 1px solid #3b82f6;
  border-radius: 6px;
  color: white;
  background: #3b82f6;
  font-weight: 600;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
}

.pagination-ellipsis {
  display: inline-block;
  padding: 8px 4px;
  color: #6b7280;
  user-select: none;
}

/* Mobile responsive pagination */
@media (max-width: 768px) {
  .pagination-link,
  .pagination-current {
    padding: 6px 10px;
    margin: 0;
    font-size: 0.875rem;
    min-width: 36px;
    text-align: center;
  }
  
  .pagination-ellipsis {
    padding: 6px 2px;
    font-size: 0.875rem;
  }
  
  .pagination-info {
    font-size: 0.8125rem;
    margin-bottom: 8px;
  }
  
  .pagination-container {
    padding: 15px 10px;
  }
  
  .pagination-buttons {
    gap: 2px;
  }
}

/* Reduce width of the page size selector on the dashboard */
#page_size {
    width: 55px;
    min-width: 55px;
}

/* Alert Styles */
.alert {
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 8px;
}

.alert-error {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #b91c1c;
}

.alert-success {
  background-color: #dcfce7;
  border: 1px solid #10b981;
  color: #047857;
}

.alert-warning {
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  color: #b45309;
  text-align: center;
  padding: 30px;
}

.alert h3 {
  margin-top: 0;
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.subscription-expired-message {
  margin: 20px 0 40px;
}

.subscription-expired-message .btn-primary {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
}

/* Change Plans Page Styles */

.current-plan-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  border: 2px solid #e5e7eb;
}

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

/* Ensure text in the CURRENT plan card's header is left-aligned */
.current-plan-card .plan-header > div {
    text-align: left;
}

.plan-title {
  margin: 0;
  font-size: 1.5rem;
  color: #1f2937;
}

.plan-detail {
  margin: 8px 0 0 0;
  color: #6b7280;
}

.status-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
}

.status-active {
  background: #10b981;
}

.status-on-hold {
  background: #ef4444;
}

.status-expired {
  background: #ef4444;
}

.status-failed {
  background: #ef4444;
}

.status-cancelled {
  background: #ef4444;
}

.cancel-button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid #ef4444;
  color: #ef4444;
  background: white;
}

.resume-button {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
}

.plans-section-header {
  text-align: center;
  margin: 40px 0;
}

/* Upgrade Banner Styles */
.upgrade-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-top: 40px;
  text-align: center;
}

.upgrade-banner h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.upgrade-banner p {
  margin-bottom: 20px;
}

.upgrade-banner .btn-primary {
  display: inline-block;
  margin-top: 20px;
}

/* Representatives Page Styles */
.search-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrapper input[type="text"] {
  width: 100%;
  padding: 10px 40px 10px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: 4px;
}

.clear-search-btn:hover {
  color: #ef4444;
  background: #f3f4f6;
}

.clear-search-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

input[type="text"],
select {
  padding: 10px;
  flex: 1;
  min-width: 200px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.actions {
  margin-bottom: 15px;
}

.actions button {
  padding: 8px 12px;
  margin-right: 10px;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
}

.actions button:hover {
  background-color: #e5e7eb;
}

.member-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: #fafafa;
  margin-bottom: 20px;
}

.member {
  padding: 8px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.member:last-child {
  border-bottom: none;
}

.member.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

.member-checkbox {
  margin-right: 12px;
}

.member label {
  flex-grow: 1;
  margin-left: 10px;
  cursor: pointer;
}

.member-info {
  flex: 1;
}

.member-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.member-details {
  font-size: 0.875rem;
  color: #6b7280;
}

.no-results {
  padding: 10px;
  text-align: center;
  color: #888;
}

/* Party indicators */
.party-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  margin-left: 8px;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.party-indicator.d {
  background-color: #3b82f6; /* Democratic blue */
}

.party-indicator.r {
  background-color: #ef4444; /* Republican red */
}

.party-indicator.i {
  background-color: #10b981; /* Independent green */
}

/* Message styling */
.messages {
  margin-bottom: 20px;
}

.message {
  padding: 12px 15px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.message.success {
  background-color: #d1fae5;
  border: 1px solid #10b981;
  color: #065f46;
}

.message.error {
  background-color: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.message.info {
  background-color: #dbeafe;
  border: 1px solid #3b82f6;
  color: #1e40af;
}

.message.warning {
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.registration-success-hero {
  padding: 80px 0;
  background: white;
}

.registration-success-content {
  text-align: center;
  padding: 80px 0;
}

.registration-success-content .success-icon {
  font-size: 4rem;
  margin-bottom: 30px;
}

.registration-success-content h1 {
  font-size: 2.5rem;
  color: #1f2937;
  margin-bottom: 20px;
}

.registration-success-content > p {
  font-size: 1.2rem;
  color: #6b7280;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.registration-success-content .next-steps {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  max-width: 500px;
  margin: 0 auto;
}

.registration-success-content .next-steps h3 {
  margin-bottom: 20px;
  color: #1f2937;
}

.registration-success-content .step-list {
  text-align: left;
}

.registration-success-content .step-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.registration-success-content .step-item span:first-child {
  background: #2563eb;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  margin-right: 15px;
  flex-shrink: 0;
}

.registration-success-content .action-buttons {
  margin-top: 40px;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive adjustments for registration success page */
@media screen and (max-width: 767px) {
  .registration-success-content {
    padding: 40px 20px;
  }

  .registration-success-content h1 {
    font-size: 2rem;
  }

  .registration-success-content > p {
    font-size: 1rem;
  }

  .registration-success-content .next-steps {
    padding: 30px 20px;
  }

  .registration-success-content .action-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .registration-success-content .action-buttons a {
    width: 100%;
    text-align: center;
  }
}

/* Registration Success - Loading State */
.loading-spinner {
  font-size: 48px;
  margin-bottom: 20px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.loading-subtext {
  color: #666;
  font-size: 14px;
  margin-top: 10px;
}

.loading-dots {
  margin-top: 20px;
  font-size: 24px;
  letter-spacing: 4px;
}

.loading-dots span {
  animation: blink 1.4s infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Registration Success - Timeout State */
.warning-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

/* ==========================================
   Change Plans - Subscription Messages
   ========================================== */

/* Pending Plan Change Box (in error alert) */
.pending-plan-change-box {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #fff3cd;
  border-radius: 4px;
}

.pending-plan-change-box p {
  margin: 0 0 0.5rem 0;
}

.pending-plan-change-box p:first-child {
  font-weight: 500;
}

.pending-plan-change-box p:last-of-type {
  margin-bottom: 1rem;
}

/* Subscription Status Messages */
.subscription-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
}

.subscription-message p {
  margin: 0;
}

.subscription-message p:not(:last-child) {
  margin-bottom: 0.5rem;
}

.subscription-message p:last-of-type:not(.btn-primary) {
  margin-bottom: 1rem;
}

/* On Hold Message (Payment Failed) */
.on-hold-message {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
}

.on-hold-message p {
  color: #856404;
}

.on-hold-message p:first-child {
  font-weight: 500;
}

/* Expired Message */
.expired-message {
  background-color: #f8f9fa;
  border-left: 4px solid #6c757d;
}

.expired-message p:first-child {
  color: #495057;
  font-weight: 500;
}

.expired-message p:not(:first-child) {
  color: #6c757d;
}

/* Failed Message */
.failed-message {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
}

.failed-message p {
  color: #721c24;
}

.failed-message p:first-child {
  font-weight: 500;
}

/* Cancelled Message */
.cancelled-message {
  background-color: #f8f9fa;
  border-left: 4px solid #dc3545;
}

.cancelled-message p:first-child {
  color: #495057;
  font-weight: 500;
}

.cancelled-message p:not(:first-child) {
  color: #6c757d;
}