/* Basic Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
    color: #333;
    /* Layout for sticky footer/full height */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    /* Gradient is on the hero section */
    background-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ====================================
   HEADER STYLING
   ==================================== */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px; /* Standard Header Height */
}

/* Logo */
.logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #28a745; /* Green for main text */
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 8px;
    color: #007bff; /* Blue accent for icon */
}

/* Navigation Menu */
.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li a {
    display: block;
    padding: 10px 15px;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: #0056b3;
}

/* CTA Button */
.cta-button {
    background-color: #28a745;
    color: white !important;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.2s ease-out;
}

.cta-button:hover {
    background-color: #1e7e34;
}

/* Hamburger & Mobile Button Hiding (Desktop View) */
.hamburger, .cta-button-mobile {
    display: none;
}

/* ====================================
   HERO SECTION STYLING (INDEX CONTENT)
   ==================================== */
.hero-section {
    /* Gradient Background */
    background: linear-gradient(135deg, #e9f7ff 0%, #d0efff 100%);
    min-height: calc(100vh - 80px); /* Full height below header */
    padding: 0;
    display: flex;
    align-items: center; /* Vertically center content */
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* LEFT ALIGNED content */
    width: 100%;
    max-width: 800px; /* Constrain width of hero text for readability */
    padding: 40px 0;
    margin: 0 auto; /* Center the overall content block on the page */
}

.hero-text {
    flex: none;
    max-width: 100%;
    text-align: left; /* Ensure text is left aligned */
}

.hero-text h1 {
    font-size: 3.8em;
    line-height: 1.1;
    font-weight: 800; /* Heavier weight for contrast */
    color: #0056b3; /* Darker blue */
    margin-bottom: 30px;
}

.tagline {
    font-size: 1.5em;
    color: #222;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: 0;
    margin-right: auto;
}

/* CTA Buttons Group */
.hero-cta-group {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
}

.hero-cta-main {
    font-size: 1.2em;
    padding: 14px 30px;
    background-color: #007bff;
    color: white !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4); /* Stronger blue shadow */
    transition: all 0.2s ease-out;
}

.hero-cta-main:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6); /* Increased lift */
}

.hero-cta-secondary {
    background-color: transparent;
    border: 2px solid #007bff;
    color: #007bff !important;
    font-size: 1.2em;
    padding: 12px 30px;
    font-weight: normal;
    border-radius: 8px;
}

.hero-cta-secondary:hover {
    background-color: #007bff;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Trust Signal */
.trust-signal {
    font-size: 1em;
    color: #28a745;
    font-weight: bold;
    margin-top: 15px;
}

/* ====================================
   STATISTICS AND IMPACT SECTION STYLING
   ==================================== */
.stats-section {
    padding: 40px 0; /* Less padding, designed to sit close to the Hero */
    background-color: #ffffff; /* White background */
    border-bottom: 1px solid #e0e0e0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 15px 0;
}

.stat-number {
    font-size: 3em;
    font-weight: 800;
    color: #007bff; /* Brand Blue */
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1.1em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ====================================
   BENEFITS SECTION STYLING
   ==================================== */
.benefits-section {
    padding: 70px 0;
    background-color: #f4f7f6; /* Light gray background to separate it from the gradient hero */
    text-align: center;
}

.benefits-grid {
    display: grid;
    /* Create three equal columns */
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.benefit-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%; /* Ensure all cards have the same height */
}

.benefit-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    font-size: 2.5em;
    color: #007bff; /* Brand blue icon color */
    margin-bottom: 20px;
}

.benefit-card h3 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
}

.benefit-card p {
    color: #666;
    line-height: 1.6;
}


/* ====================================
   TRUST AND SOCIAL PROOF SECTION (PREMIUM STYLE)
   ==================================== */
.trust-section {
    padding: 90px 0; /* More vertical space for premium feel */
    background-color: #f7f9fc; /* Very light background for contrast */
    text-align: center;
}

.trust-section .section-title {
    font-size: 2.5em; /* Larger, more authoritative title */
    color: #003366; /* Deep blue/navy title color */
    margin-bottom: 10px;
    font-weight: 700;
}

.trust-section .section-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 60px; /* More space before testimonials */
}

/* --- Review Badges Block --- */
.review-badges {
    display: flex;
    justify-content: center;
    gap: 50px; /* Increased gap */
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    border: none;
    background-color: white;
    border-radius: 12px; /* Smoother border radius */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Stronger, professional shadow */
    transition: transform 0.3s;
}

.trust-badge:hover {
    transform: translateY(-4px); /* Subtle lift */
}

.trust-badge i {
    font-size: 2.5em; /* Larger icons */
    margin-right: 18px;
}

.google-icon {
    color: #4285f4; /* Official Google blue */
}

.trustpilot-icon {
    color: #00b67a; /* Trustpilot green */
}

.badge-text {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.badge-text span {
    font-size: 1em;
    color: #444;
    font-weight: 500;
    margin-top: 2px;
}

/* --- Star Rating Styling --- */
.star-rating {
    margin-bottom: 5px; /* Less margin */
}
.star-rating i {
    font-size: 1.1em;
}
.yellow-stars i {
    color: #fbbc05; /* Deeper yellow/gold */
}
.green-stars i {
    color: #00b67a;
}


/* --- Testimonial Grid --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px; /* More gap */
}

.testimonial-card {
    background-color: white; /* High contrast white background */
    padding: 40px; /* Increased padding */
    border-radius: 12px;
    text-align: left;
    /* Elevated Shadow Effect */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee; /* Subtle light border */
    transition: box-shadow 0.3s, border-color 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column; /* For push-to-bottom footer */
}

.testimonial-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); /* Shadow darkens on hover */
    border-color: #007bff; /* Subtle brand color highlight on hover */
}

.testimonial-card p {
    font-style: italic;
    color: #333; /* Darker text for better contrast */
    line-height: 1.7; /* Increased line height for readability */
    font-size: 1.05em;
    margin-bottom: 25px;
    flex-grow: 1;
}

.testimonial-author {
    border-top: 1px solid #ddd;
    padding-top: 18px;
    margin-top: auto; /* Push author block to the bottom of the card */
}

.author-name {
    display: block;
    font-weight: 600; /* Semi-bold */
    color: #007bff; /* Brand color for name */
}

.author-title {
    display: block;
    font-size: 0.9em;
    color: #777;
    margin-top: 4px;
}

/* ====================================
   PRICING PLANS SECTION STYLING
   ==================================== */
.pricing-plans-section {
    padding: 70px 0 90px;
    background-color: #f7f9fc;
    text-align: center;
}

.pricing-plans-section .section-title {
    font-size: 2.5em;
    color: #003366;
    margin-bottom: 10px;
    font-weight: 700;
}

.pricing-plans-section .section-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
}

.pricing-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.plan-card {
    background-color: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    border: 1px solid #eee;
    height: 100%; /* Ensure consistent height */
    display: flex;
    flex-direction: column; /* Use flex for internal layout */
}

.plan-card h3 {
    font-size: 1.8em;
    margin-bottom: 5px;
    color: #007bff;
}

.plan-card .desc {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 25px;
}

/* Price Display */
.price-container {
    min-height: 80px;
}
.price-tag {
    display: block;
    font-size: 3.5em;
    font-weight: 800;
    color: #333;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
.price-tag span {
    font-size: 0.35em;
    font-weight: 400;
    color: #666;
    margin-left: 5px;
}
.annual-price {
    color: #28a745;
}

/* FIX: The hidden class must use display: none; */
.price-tag.hidden {
    display: none !important; /* CRITICAL FIX: Ensures toggle works */
    opacity: 0;
}

/* Featured Card Highlight */
.premium-plan.highlight {
    border-color: #ffc107;
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.4);
    transform: translateY(-10px);
}
.premium-plan.highlight:hover {
    transform: translateY(-12px);
}
.recommended-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ffc107;
    color: #333;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 0 12px 0 12px;
    font-size: 0.85em;
}

/* Features Block */
.features-block {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-grow: 1; /* Allow features block to expand, pushing CTA down */
    text-align: left;
}
.features-block h4 {
    font-size: 1em;
    text-transform: uppercase;
    color: #007bff;
    margin-bottom: 15px;
}
.features-list {
    list-style: none;
    padding: 0;
}
.features-list li {
    margin-bottom: 10px;
    font-size: 0.95em;
    color: #555;
    display: flex;
    align-items: center;
}
.features-list i {
    margin-right: 8px;
}
.features-list .check-icon {
    color: #28a745;
}
.features-list .cross-icon {
    color: #dc3545;
}
.features-list .fa-file-image {
    color: #007bff;
}


/* CTA Button */
.plan-cta {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.2s;
    margin-top: auto; /* Stick button to the bottom of the card */
}

.free-cta-button {
    background-color: #eee;
    color: #333 !important;
    border: 1px solid #ccc;
}
.free-cta-button:hover {
    background-color: #ddd;
}

.premium-cta-button, .business-cta-button {
    background-color: #007bff;
    color: white !important;
}
.premium-cta-button:hover, .business-cta-button:hover {
    background-color: #0056b3;
}

/* --- Pricing Toggle Switch --- */
.pricing-toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    gap: 15px;
    position: relative;
}

.toggle-label {
    font-weight: bold;
    color: #888;
    transition: color 0.3s;
}
.toggle-label.active {
    color: #333;
}

.annual-badge {
    position: absolute;
    right: 25%;
    transform: translateX(100px);
    background-color: #28a745;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
}

/* Switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #007bff;
}
input:checked + .slider:before {
    transform: translateX(26px);
}


/* ====================================
   FINAL PUSH CTA SECTION
   ==================================== */
.final-push-cta-section {
    padding: 80px 0;
    background-color: #e9f7ff; /* Light blue background for visual punch */
    text-align: center;
}

.final-push-cta-section .container {
    max-width: 900px;
}

.final-stat {
    font-size: 1.2em;
    color: #007bff;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.final-stat strong {
    font-weight: 800;
    font-size: 1.5em;
    color: #0056b3;
}

.final-push-cta-section h2 {
    font-size: 3em;
    color: #333;
    margin-bottom: 40px;
    font-weight: 800;
}

/* Massive CTA Button */
.massive-cta-button {
    background-color: #28a745; /* Brand Green */
    color: white !important;
    padding: 20px 40px;
    font-size: 1.6em; /* Large size */
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.4); /* Green Shadow */
    display: inline-block;
    transition: all 0.2s;
    font-weight: 700;
}

.massive-cta-button:hover {
    background-color: #1e7e34;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.6);
}

.final-trust-text {
    margin-top: 35px;
    font-size: 0.95em;
    color: #666;
}

.final-trust-text i {
    color: #007bff;
    margin: 0 5px;
}

/* ====================================
   AUTH PAGE STYLING (REGISTER/LOGIN - PREMIUM LOOK)
   ==================================== */
.auth-section {
    padding: 60px 0;
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px - 100px);
    background-color: #f7f9fc;
}

.auth-container {
    max-width: 550px;
    width: 100%;
}

.auth-form-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15); /* Deep, high-end shadow */
    border-top: 6px solid #007bff;
}

.auth-form-card h2 {
    font-size: 2.2em;
    color: #003366;
    margin-bottom: 5px;
    font-weight: 700;
}

.auth-form-card .subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Field Hiding Utility */
.hidden {
    display: none !important;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group-row {
    display: flex;
    gap: 20px;
}
.form-group-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

/* Styling for standard inputs and select */
input:not([type="radio"]):not([type="checkbox"]), select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.2s;
    background-color: #f9f9f9;
}

input:focus, select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
    background-color: white;
}

/* Account Type Toggle (Radio buttons styled like a segmented control) */
.account-type-toggle {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 5px;
    margin-top: 10px;
}
.account-type-toggle input[type="radio"] {
    display: none;
}
.account-type-toggle label {
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
    margin: 0;
    color: #666;
}
.account-type-toggle label i {
    margin-right: 5px;
}
.account-type-toggle input[type="radio"]:checked + label {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    color: #007bff;
}

/* API-specific styling fix for Intl-Tel-Input */
.iti {
    width: 100%;
}
.iti__flag-container {
    border-radius: 8px 0 0 8px;
    padding: 0;
}
.iti__selected-flag {
    height: 100%;
    background-color: #f0f0f0;
}
#phone {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.submit-button:hover {
    background-color: #1e7e34;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 1em;
}

.form-footer a {
    color: #007bff;
    font-weight: 600;
}

/* Alert Messages (For Success/Error) */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 0.9em;
    text-align: left;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* --- Added style for visual input error --- */
.input-error {
    border-color: #dc3545 !important; /* Red border */
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important; /* Red glow */
}

/* LOGIN SPECIFIC STYLES */
.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px; /* Space between link and login button */
    font-size: 0.95em;
}

.forgot-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* ====================================
   DASHBOARD – MODERN TWO-COLUMN LAYOUT
   ==================================== */

.dashboard-section {
    padding: 40px 0 80px;
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 35%, #f9fafb 100%);
    min-height: calc(100vh - 80px - 100px);
}

.dashboard-section .container {
    max-width: 1120px;
}

/* ---------- Header ---------- */

.dashboard-header {
    margin-bottom: 26px;
}

.dashboard-header-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}

.dashboard-header h2 {
    font-size: 2.1rem;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dashboard-header h2 span.wave {
    font-size: 1.7rem;
}

.dashboard-plan-chip {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.22);
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1d4ed8;
}

.dashboard-plan-chip i {
    font-size: 0.85rem;
    color: #22c55e;
}

.dashboard-header p {
    font-size: 0.96rem;
    color: #6b7280;
}

/* ---------- Grid ---------- */

.dashboard-grid.asymmetrical-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 24px;
}

.main-column,
.side-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---------- Card Base ---------- */

.dashboard-card {
    background: white;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dashboard-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #2563eb, #22c55e) 1;
    opacity: 0.65;
    pointer-events: none;
}

.dashboard-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

.card-title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf2f7;
}

.card-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card h3 {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
    margin: 0;
}

.card-icon {
    font-size: 1.2rem;
    padding: 9px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.06);
    color: #2563eb;
}

.card-label-pill {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.card-label-pill-pro {
    background: #e0f2fe;
    color: #0369a1;
}
.card-label-pill-locked {
    background: #fee2e2;
    color: #b91c1c;
}

/* ---------- Quick Start Card & CTAs ---------- */

.quick-start-card {
    background: linear-gradient(135deg, #eff6ff, #ecfdf5);
    border: 1px solid rgba(191, 219, 254, 0.9);
}

.quick-start-card::before {
    border-image: linear-gradient(90deg, #2563eb, #22c55e) 1;
}

.action-desc {
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 18px;
}

.dashboard-cta {
    padding: 12px 16px;
    background-image: linear-gradient(135deg, #2563eb, #22c55e);
    color: #ffffff !important;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.4);
    font-size: 0.96rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.dashboard-cta i {
    font-size: 0.95rem;
}

.dashboard-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.5);
}

.dashboard-cta:active {
    transform: translateY(0);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.4);
}
.dashboard-cta.dashboard-cta-disabled {
    background-image: none;
    background-color: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.75;
}

.dashboard-cta.dashboard-cta-disabled i {
    color: #f9fafb;
}

.dashboard-cta-secondary {
    background: #f3f4ff;
    color: #1d4ed8 !important;
    background-image: none;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}
.dashboard-cta-secondary:hover {
    filter: brightness(0.95);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.45);
}

.dashboard-cta-warning {
    background: #ffedd5;
    color: #b45309 !important;
    background-image: none;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}
.dashboard-cta-warning:hover {
    filter: brightness(0.95);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.45);
}


.card-footer-links {
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
    text-align: right;
}

.card-footer-links a {
    color: #2563eb;
    font-size: 0.86rem;
    font-weight: 500;
    text-decoration: none;
}

.card-footer-links a i {
    margin-left: 4px;
    font-size: 0.8rem;
}

.card-footer-links a:hover {
    text-decoration: underline;
}

/* ---------- Account & Plan Card ---------- */

.info-details-list {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.info-item:last-of-type {
    border-bottom: none;
}

.info-item strong {
    font-weight: 600;
    color: #6b7280;
}

.info-item span {
    font-weight: 600;
    color: #111827;
}

.plan-name-badge {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    background-color: #e5e7eb;
    color: #374151;
}

.free-badge {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.pro-badge {
    background-color: #e0f2fe;
    color: #0369a1;
}

.business-badge {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge {
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 700;
}

.active-status {
    background: #dcfce7;
    color: #166534;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

.account-actions a {
    color: #2563eb;
    font-weight: 500;
    font-size: 0.86rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.account-actions a i {
    font-size: 0.86rem;
    color: #9ca3af;
}

.account-actions a:hover {
    text-decoration: underline;
}

.account-actions a[href="logout.php"] {
    color: #dc2626;
}

.account-actions a[href="logout.php"] i {
    color: #dc2626;
}

/* ---------- Usage Card ---------- */

.stat-card {
    min-height: 190px;
}

.stat-main-figure {
    margin: 4px 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.stat-current {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
}

.stat-total {
    font-size: 0.98rem;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 6px;
}

.text-primary {
    color: #2563eb;
}

.text-danger {
    color: #dc2626;
}

.usage-progress-wrapper {
    margin-bottom: 10px;
}

.usage-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.usage-progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.usage-progress-bar {
    height: 100%;
    border-radius: inherit;
    background-image: linear-gradient(90deg, #2563eb, #22c55e);
    width: 0;
    transition: width 0.25s ease-out;
}

.stat-footer {
    color: #4b5563;
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: 500;
}

.limit-warning {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.84rem;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #fecaca;
    display: flex;
    align-items: center;
    gap: 6px;
}

.limit-warning i {
    font-size: 0.9rem;
}

/* ---------- Features Card ---------- */

.features-card-list {
    margin-top: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px 14px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    padding: 6px 8px;
    border-radius: 10px;
    background: #f9fafb;
}

.feature-row.highlight-feature {
    background: #eff6ff;
    border-radius: 10px;
    padding: 10px 12px;
}

.feature-chip-active {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #22c55e1a;
    color: #16a34a;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
}

.feature-link-inline a {
    margin-left: 6px;
    font-size: 0.8rem;
    text-decoration: underline;
    color: #2563eb;
}

.feature-row-icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.feature-row-icon.unlocked {
    background: #dcfce7;
    color: #15803d;
}

.feature-row-icon.locked {
    background: #fee2e2;
    color: #b91c1c;
}

.feature-row-title {
    font-weight: 600;
    color: #111827;
}

.feature-row-meta {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Plan benefits card */
.benefits-card .benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.benefits-card .benefits-list li {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 6px;
}
.benefits-card .benefits-list li i {
    margin-right: 8px;
    color: #22c55e;
}

/* ---------- Tips Card (Optional extra info) ---------- */

.tips-card-list {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: #4b5563;
}

.tips-card-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.tips-card-list li i {
    margin-top: 2px;
    color: #22c55e;
}

/* ---------- Upgrade Banner ---------- */

.upgrade-banner.full-width-banner {
    background: linear-gradient(135deg, #fef3c7, #ffedd5);
    border: 1px solid #facc15;
    padding: 22px 22px;
    border-radius: 18px;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.upgrade-banner::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.18), transparent 70%);
    top: -60px;
    right: -30px;
    pointer-events: none;
}

.upgrade-banner .upgrade-content {
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 1.4rem;
    color: #92400e;
    margin-bottom: 6px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-title i {
    font-size: 1rem;
    color: #fbbf24;
}

.banner-description {
    font-size: 0.92rem;
    color: #78350f;
    margin-bottom: 10px;
}

.upgrade-banner .feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 6px 12px;
    font-size: 0.86rem;
}

.upgrade-banner .feature-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #7c2d12;
}

.upgrade-banner .feature-list li i {
    color: #16a34a;
}

.upgrade-cta-banner {
    position: relative;
    z-index: 1;
    background-color: #facc15;
    color: #92400e !important;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 26px rgba(250, 204, 21, 0.45);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
}

.upgrade-cta-banner i {
    font-size: 0.9rem;
}

.upgrade-cta-banner:hover {
    background-color: #eab308;
    transform: translateY(-1px);
}

.upgrade-cta-banner:active {
    transform: translateY(0);
}

/* ====== CLIENT SHORTCUT CARD ====== */
.client-db-card .card-desc {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 10px;
}

.client-shortcut-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.client-shortcut-text {
    font-size: 0.9rem;
    color: #4b5563;
}

.client-shortcut-cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #0ea5e9;
    color: #ffffff !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(56, 189, 248, .45);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.client-shortcut-cta:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(56, 189, 248, .55);
}

.client-shortcut-cta-locked {
    background: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, .45);
}
.client-shortcut-cta-locked:hover {
    background: #ea580c;
}

.client-shortcut-card-locked {
    opacity: 0.95;
}


/* ====================================
   INVOICE CREATION – MODERN UI/UX
   ==================================== */

.invoice-section {
    padding: 40px 0 80px;
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 35%, #f9fafb 100%);
}

.invoice-container {
    max-width: 1120px;
    width: 100%;
}

/* Page Title */
.invoice-section h2 {
    font-size: 2.1rem;
    color: #0f172a;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.invoice-section h2 i {
    color: #2563eb;
}

/* Alerts (basic if you don’t have global alert styles) */
.invoice-section .alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.invoice-section .alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* ====================================
   CARDS & GRID (Invoice Creation)
   ==================================== */

.invoice-grid-container {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 22px;
    margin-bottom: 20px;
}

.left-col,
.right-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.invoice-section .card {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.invoice-section .card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #2563eb, #22c55e) 1;
    opacity: 0.6;
    pointer-events: none;
}

.invoice-section .card:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

.invoice-section .card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
}

.invoice-section .card h3 i {
    font-size: 1.05rem;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 999px;
    padding: 7px;
}

/* ====================================
   FORM FIELDS (Invoice Creation)
   ==================================== */

.invoice-section .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.form-group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.invoice-section .form-group label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 4px;
}

.invoice-section .form-group input,
.invoice-section .form-group select,
.invoice-section .form-group textarea {
    border-radius: 10px;
    padding: 8px 10px;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    width: 100%;
    font-size: 0.9rem;
    color: #111827;
}

.invoice-section .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.invoice-section .form-group input:focus,
.invoice-section .form-group select:focus,
.invoice-section .form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background-color: #ffffff;
}

/* Select2 alignment fix (if used) */
.select2-container--default .select2-selection--single {
    height: 38px;
    border-radius: 10px !important;
    border: 1px solid #d1d5db !important;
    background-color: #f9fafb !important;
    padding: 4px 8px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    font-size: 0.9rem;
}

.currency-custom-wrapper {
    display: none;
}

.saved-client-picker,
.saved-picker-hint {
    margin-bottom: 14px;
}
.saved-client-picker label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}
.saved-client-picker select {
    width: 100%;
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
}
.saved-picker-hint {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ====================================
   SUMMARY CARD & CTA (Invoice Creation)
   ==================================== */

.totals-submit-card {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 90px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #374151;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.tax-line {
    font-size: 0.9rem;
    color: #6b7280;
}

.grand-total-line {
    margin-top: 6px;
    padding-top: 10px;
    padding-bottom: 12px;
    border-top: 2px solid #2563eb;
    border-bottom: none;
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
}

.total-value {
    font-weight: 700;
}

/* Primary CTA button */
.primary-cta {
    width: 100%;
    margin-top: 14px;
    padding: 11px 16px;
    border-radius: 999px;
    border: none;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff !important;
    background-image: linear-gradient(135deg, #2563eb, #22c55e);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.4);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.primary-cta i {
    font-size: 0.95rem;
}

.primary-cta:hover:not([disabled]) {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.5);
}

.primary-cta:active:not([disabled]) {
    transform: translateY(0);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.4);
}

.primary-cta[disabled] {
    background-image: none;
    background-color: #9ca3af;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.8;
}

/* ====================================
   LINE ITEMS TABLE (Invoice Creation)
   ==================================== */

.item-list-card h3 {
    margin-bottom: 10px;
}

.item-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
    font-size: 0.9rem;
}

.item-table thead th {
    background-color: #eff6ff;
    padding: 9px 10px;
    text-align: left;
    font-weight: 700;
    color: #4b5563;
    border-bottom: 1px solid #d1d5db;
}

.item-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.item-table tbody tr:nth-child(even) td {
    background-color: #f9fafb;
}

/* Column widths & alignment */
.item-table .col-qty,
.item-table .col-price,
.item-table .col-tax-display,
.item-table .col-action {
    width: 10%;
    text-align: center;
}

.item-table .col-total {
    width: 14%;
    text-align: right;
}

.item-row-total {
    font-weight: 600;
    color: #111827;
    text-align: right;
}

.item-table input.item-qty,
.item-table input.item-price {
    text-align: right;
    max-width: 90px;
}
.item-table input {
    padding: 6px 8px;
    border-radius: 8px;
}

/* Small trash button (secondary-btn) */
.secondary-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background-color: #2563eb;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.12s ease, transform 0.08s ease;
}

.secondary-btn i {
    font-size: 0.85rem;
}

.secondary-btn:hover:not(.disabled-btn) {
    background-color: #1d4ed8;
    transform: translateY(-0.5px);
}

.secondary-btn.disabled-btn {
    background-color: #d1d5db;
    color: #6b7280 !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* Smaller variant for remove row */
.secondary-btn-small {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
}

/* Item actions row */
.item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px dashed #e5e7eb;
    margin-top: 6px;
}

.limit-note {
    font-size: 0.82rem;
    color: #b91c1c;
}

/* Premium branding info in create_invoice (for logo/footer) */
.premium-branding-info {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    background: #eff6ff;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    font-size: 0.9rem;
    margin-bottom: 12px;
    color: #2563eb;
}

.premium-branding-info i {
    color: #2563eb;
    font-size: 1.1rem;
    margin-top: 2px;
}

/* Premium lock container (for unlimited lines/products) */
.premium-inline-lock-container {
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    padding: 14px 16px;
    background: #f9fafb;
    margin-top: 12px;
}

.premium-inline-lock-container .lock-content {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.9rem;
    color: #4b5563;
}

.premium-inline-lock-container .lock-icon {
    color: #f97316;
    margin-top: 2px;
}

.premium-inline-lock-container .upgrade-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background-color: #2563eb;
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.4);
    gap: 6px;
    margin-top: 8px;
}

/* ====================================
   INVOICE LIST (view_invoices.php)
   ==================================== */

.invoice-list-section {
    padding: 2.5rem 0;
    background: #f3f4f6;
    min-height: calc(100vh - 80px - 100px);
}

.invoice-list-container {
    max-width: 1100px;
    margin: 0 auto;
}

.invoice-list-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.invoice-list-header-row h2 {
    font-size: 2.2em;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: left;
    font-weight: 700;
}
.invoice-list-header-row .subtitle-text {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.invoice-list-header-row .header-actions .primary-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    white-space: nowrap;
}

.invoice-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.stat-pill {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: #e5e7eb;
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.8rem;
}
.status-draft-pill { background: #eef2ff; }
.status-sent-pill { background: #e0f2fe; }
.status-paid-pill { background: #dcfce7; }
.status-overdue-pill { background: #fee2e2; }


/* Filters */
.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.filter-controls select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
}

/* Table */
.invoice-table-wrapper {
    padding: 0;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.invoice-list-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    font-size: 0.9rem;
}
.invoice-list-table thead th {
    background-color: #f0f3f7;
    padding: 12px 20px;
    text-align: left;
    font-weight: 700;
    color: #444;
    border-bottom: 2px solid #ddd;
}
.invoice-list-table tbody td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    font-size: 0.95em;
    color: #111827;
}
.invoice-list-table tbody tr:hover {
    background-color: #fafafa;
}

.due-date {
    display: block;
    font-size: 0.9em;
    color: #888;
    margin-top: 2px;
}
.total-amount {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1.1em;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.status-draft { background-color: #e0f7fa; color: #00bcd4; }
.status-sent { background-color: #e0f2fe; color: #0369a1; }
.status-paid { background-color: #dcfce7; color: #15803d; }
.status-overdue { background-color: #ffcdd2; color: #f44336; }

/* Actions */
.actions-cell a {
    margin: 0 8px;
    font-size: 1.1em;
    color: #007bff;
    transition: color 0.2s;
}
.status-paid-btn {
    color: #4caf50;
}
.status-unpaid-btn {
    color: #dc3545;
}
.delete-btn {
    color: #6c757d;
}

/* ====================================
   INVOICE DETAIL PAGE
   ==================================== */

.invoice-detail-section {
    padding: 2.5rem 0;
    background: #f3f4f6;
}

.invoice-detail-container {
    max-width: 960px;
    margin: 0 auto;
}

.invoice-detail-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.invoice-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transition: all 0.15s ease;
}

.header-cta:hover {
    transform: translateY(-1px);
}

.header-cta.ghost-cta {
    background: #e5e7eb;
    color: #111827 !important;
    box-shadow: none;
}

.header-cta.outline-cta {
    background: #ffffff;
    color: #2563eb !important;
    border: 1px solid #bfdbfe;
    box-shadow: none;
}

/* Document Body */
.invoice-document {
    position: relative;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem 1.75rem 1.75rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    min-height: 800px;
}

/* Watermark */
.invoice-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.18);
    pointer-events: none;
    z-index: 1;
}

/* Top Row: Seller/Buyer/Logo */
.invoice-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.invoice-logo-wrapper {
    text-align: right;
}
.invoice-logo-wrapper img {
    max-height: 70px;
    max-width: 220px;
    object-fit: contain;
}

.invoice-header-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
    position: relative;
    z-index: 2;
}

.party-block {
    flex: 1;
    font-size: 0.92rem;
    color: #374151;
}

.section-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.party-block .name {
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.1rem;
}

/* Items table */
.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.items-table thead th {
    text-align: left;
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.items-table tbody td {
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.items-table .col-qty,
.items-table .col-price,
.items-table .col-total {
    text-align: right;
    font-variant-numeric: tabular-nums;
}


/* Totals / Notes area */
.invoice-footer-summary {
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.invoice-totals {
    margin-left: auto;
    min-width: 220px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.3rem 0;
    font-size: 0.95rem;
    color: #111827;
}

.total-row span:last-child {
    font-variant-numeric: tabular-nums;
}

.grand-total-row {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.3rem;
    padding-top: 0.4rem;
    font-weight: 700;
    font-size: 1rem;
}

/* ====================================
   FOOTER STYLING
   ==================================== */
.site-footer {
    background-color: #2c3e50;
    color: #f8f9fa;
    padding: 50px 0;
    font-size: 0.9em;
    margin-top: auto; /* Push to the bottom */
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
}

/* Footer Logo/Info Column */
.footer-logo {
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: 10px;
    display: block;
}

.footer-info .description {
    line-height: 1.5;
    margin-bottom: 15px;
    color: #adb5bd;
}

.footer-info .copyright {
    color: #6c757d;
}

/* Link Columns */
.footer-links h4, .footer-contact h4 {
    font-size: 1.1em;
    color: #28a745;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links ul li {
    margin-bottom: 8px;
}

.footer-links ul li a {
    color: #adb5bd;
    font-weight: 400;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-contact p a {
    color: #adb5bd;
}

/* ====================================
   RESPONSIVENESS (Media Queries)
   ==================================== */

/* --- Mobile Menu & Header --- */
@media (max-width: 768px) {
    /* Header Mobile Menu - CRITICAL FIXES */
    .header-actions {
        display: none;
    }

    .hamburger {
        display: block;
        background: none;
        border: none;
        font-size: 1.8em;
        cursor: pointer;
        color: #333;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background-color: #ffffff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        padding: 10px 0;
    }

    .main-nav ul li {
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-nav ul li a {
        padding: 15px;
        color: #333;
    }

    .cta-button-mobile {
        display: block;
        padding: 10px 0;
        text-align: center;
    }

    /* Hero Responsiveness (Mobile) */
    .hero-section {
        min-height: auto;
        padding: 60px 0;
    }

    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        margin: 0; /* Remove margin auto on mobile */
    }

    .hero-text {
        max-width: 100%;
        text-align: left;
    }

    .hero-text h1 {
        font-size: 2.8em;
        margin-bottom: 20px;
    }
    .tagline {
        font-size: 1.2em;
        margin-bottom: 30px;
        max-width: 100%;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }
    .hero-cta-main, .hero-cta-secondary {
        width: 100%;
        max-width: 300px;
        text-align: center;
        font-size: 1.1em;
        padding: 12px 20px;
    }
}

/* --- Stats Responsiveness --- */
@media (max-width: 650px) {
    .stats-grid {
        /* Stack stats on top of each other on mobile */
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .stat-number {
        font-size: 2.5em;
    }
}

/* --- Benefits Responsiveness --- */
@media (max-width: 992px) {
    .benefits-grid {
        /* Switch to two columns on smaller tablets */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .benefits-grid {
        /* Stack vertically on mobile */
        grid-template-columns: 1fr;
    }
    .benefits-section {
        padding: 50px 0;
    }
}

/* --- Trust Section Responsiveness --- */
@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 600px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    .review-badges {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }
    .trust-badge {
        width: 100%;
        max-width: 300px;
        justify-content: flex-start;
    }
}

/* --- Pricing Responsiveness --- */
@media (max-width: 992px) {
    .pricing-cards-grid {
        /* Switch to two columns on medium screens */
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .free-plan {
        /* Center the Free Plan if it sits alone on a row */
        grid-column: span 2;
        max-width: 450px;
        margin: 0 auto;
    }
    .premium-plan, .business-plan {
        /* Ensure these take up their designated 1 column span */
        grid-column: span 1;
    }
    .annual-badge {
        display: none;
    }
}

@media (max-width: 600px) {
    .pricing-cards-grid {
        /* Stack vertically on mobile */
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .plan-card {
        max-width: 100%;
        margin: 0; /* Remove margin auto */
    }
    .free-plan {
        grid-column: span 1; /* Reset span */
        max-width: 100%;
        margin: 0;
    }
}

/* --- Final CTA Responsiveness --- */
@media (max-width: 768px) {
    .final-push-cta-section {
        padding: 60px 20px;
    }
    .final-push-cta-section h2 {
        font-size: 2.2em;
    }
    .massive-cta-button {
        font-size: 1.2em;
        padding: 15px 30px;
        display: block; /* Full width on mobile */
    }
}

/* --- Footer Responsiveness --- */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    .footer-info {
        grid-column: span 2;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-info {
        grid-column: span 1;
    }

    .footer-col {
        margin-bottom: 25px;
    }
}

/* --- Auth Forms Responsiveness --- */
@media (max-width: 600px) {
    .auth-container {
        max-width: 100%;
        padding: 0 15px;
    }
    .auth-form-card {
        padding: 25px;
    }
    .form-group-row {
        flex-direction: column;
        gap: 0;
    }
    .form-group-row .form-group {
        width: 100%;
    }
    .account-type-toggle {
        flex-direction: row;
    }
}

/* --- Invoice Creation Responsiveness --- */
@media (max-width: 992px) {
    .invoice-grid-container {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .totals-submit-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .invoice-section h2 {
        font-size: 1.7rem;
    }

    .form-group-grid {
        grid-template-columns: 1fr;
    }

    .invoice-section .card {
        padding: 16px 16px;
    }

    .item-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* --- Invoice List Responsiveness --- */
@media (max-width: 768px) {
    .invoice-list-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .invoice-list-table thead {
        display: none;
    }
    .invoice-list-table, .invoice-list-table tbody, .invoice-list-table tr, .invoice-list-table td {
        display: block;
        width: 100%;
    }
    .invoice-list-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }
    .invoice-list-table td {
        text-align: right !important;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px solid #eee;
    }
    .invoice-list-table td[data-label]::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        text-align: left;
        font-weight: 600;
        color: #555;
    }
    .filter-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .new-invoice-btn {
        width: 100%;
        text-align: center;
    }
}

/* --- Invoice Detail Responsiveness --- */
@media (max-width: 768px) {
    .invoice-detail-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .invoice-header-actions {
        justify-content: flex-start;
    }

    .invoice-document {
        padding: 1.1rem 1.1rem 1.35rem;
    }

    .invoice-top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .invoice-meta-block {
        text-align: left;
        margin-top: 0.4rem;
    }

    .invoice-header-details {
        flex-direction: column;
    }
    .invoice-footer-summary {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .invoice-totals {
        margin-left: 0;
    }
}

/* --- Print Styles (for invoice detail) --- */
@media print {
    /* Hide non-essential elements for clean printing */
    .main-header, .site-footer, .invoice-detail-header-row {
        display: none !important;
    }
    .invoice-document {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        position: relative !important; /* Critical for pseudo-element print */
        overflow: visible !important;
    }
    .invoice-detail-section {
        padding: 0 !important;
    }
    /* Watermark for Drafts/Free Plans on Print */
    .invoice-document::before {
        content: "DRAFT / BILLOFSALEPDF.NET"; /* Static text here */
        position: fixed !important;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 4em !important;
        font-weight: 900 !important;
        color: rgba(0, 0, 0, 0.15) !important;
        text-transform: uppercase !important;
        z-index: 9999 !important;
    }
    /* Hide the watermark element if it's visible in the browser */
    .invoice-watermark {
        display: none !important;
    }
}

/* ====================================
   RESPONSIVENESS (Media Queries)
   ==================================== */

/* ... (other media queries go here) ... */

/* --- Print Styles (for invoice detail) --- */
@media print {
    /* Ensure all structural elements are hidden for a clean print */
    .main-header, .site-footer, .invoice-detail-header-row {
        display: none !important;
    }
    
    .invoice-document {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        position: relative !important;
        overflow: visible !important;
    }
    .invoice-detail-section {
        padding: 0 !important;
    }

    /* *** CRITICAL FIX: Only show the Print Watermark (::before) 
    *** IF the 'watermark-required' class is present.
    */
    .invoice-document.watermark-required::before {
        content: "DRAFT / BILLOFSALEPDF.NET"; /* Static text here */
        position: fixed !important;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 4em !important;
        font-weight: 900 !important;
        color: rgba(0, 0, 0, 0.15) !important;
        text-transform: uppercase !important;
        z-index: 9999 !important;
        /* Ensure it covers the whole document */
        width: 100vw; 
        height: 100vh;
    }
    
    /* Hide the original HTML watermark element if it was rendered for browser view */
    .invoice-watermark {
        display: none !important;
    }
}

/* ====================================
   FINAL & DEFINITIVE PRINT WATERMARK FIX
   (REPLACE ALL EXISTING @media print BLOCKS WITH THIS)
   ==================================== */

@media print {
    /* --- 1. General Structural Hiding --- */
    .main-header, .site-footer, .invoice-detail-header-row {
        display: none !important;
    }
    
    .invoice-document {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        position: relative !important;
        overflow: visible !important;
    }
    .invoice-detail-section {
        padding: 0 !important;
    }
    .invoice-watermark {
        display: none !important; /* Always hide the HTML watermark during print */
    }
    
    /* --- 2. AGGRESSIVE DEFAULT REMOVAL (Catches any general, lingering rules) --- */
    .invoice-document::before {
        content: none !important; /* Kills the print watermark by default for all documents */
    }

    /* --- 3. CONDITIONAL RE-ENABLEMENT (Only for Free Plans where PHP adds the class) --- */
    .invoice-document.watermark-required::before {
        content: "DRAFT / BILLOFSALEPDF.NET" !important;
        position: fixed !important;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        
        /* Watermark Appearance */
        font-size: 4em !important;
        font-weight: 900 !important;
        color: rgba(0, 0, 0, 0.15) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.2em; /* Added for better visibility */
        z-index: 9999 !important;
        width: 100vw; 
        height: 100vh;
    }
}

/* ====================================
   UPGRADE / PLAN MANAGEMENT (upgrade.php)
   ==================================== */

.upgrade-section {
    padding: 48px 0 80px;
    /* Uses the dashboard gradient background for visual consistency */
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 40%, #f9fafb 100%);
}

.upgrade-container {
    max-width: 1040px;
}

/* Header */
.upgrade-header {
    margin-bottom: 26px;
}

.upgrade-header h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.upgrade-header h2 i {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    padding: 8px;
}

.upgrade-header p {
    font-size: 0.98rem;
    color: #4b5563;
}

/* Plan grid */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 20px;
}

/* Plan card - Base structure is often shared with pricing, reinforcing colors here */
.plan-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    padding: 20px 18px 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 480px; /* Ensures vertical alignment when comparing features */
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    border-color: #2563eb;
}

/* Highlight for currently selected plan */
.plan-card-current {
    border: 2px solid #22c55e; /* Green border for active plan */
    box-shadow: 0 14px 40px rgba(34, 197, 94, 0.2);
}
.plan-card-current:hover {
    border-color: #15803d;
}

/* Highlight for featured plan (Premium) */
.plan-card-featured {
    border: 1px solid #2563eb;
}

.plan-featured-label {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #2563eb;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Plan header */
.plan-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    transition: color 0.15s;
}

.plan-card-current .plan-name {
    color: #16a34a; /* Green name for current plan */
}

/* Plan badge style */
.plan-badge {
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* Shared colors from dashboard.php logic */
}
.free-badge { background-color: #dbeafe; color: #1d4ed8; }
.pro-badge { background-color: #e0f2fe; color: #0369a1; } /* Premium */
.business-badge { background-color: #fef3c7; color: #92400e; } /* Business */


.plan-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
}

.plan-tagline {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 10px;
}

/* Feature list */
.plan-features {
    list-style: none;
    margin: 10px 0 16px;
    padding: 0;
    flex-grow: 1; /* Pushes button to bottom */
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    color: #4b5563;
    margin-bottom: 8px;
}

.plan-features li i {
    font-size: 0.9rem;
    margin-top: 3px;
    min-width: 14px; /* Fixes alignment */
}

.fa-check-circle { color: #22c55e; }
.fa-minus-circle { color: #9ca3af; }


/* Card footer */
.plan-card-footer {
    margin-top: 4px;
    padding-top: 15px;
    border-top: 1px dashed #e5e7eb;
    display: flex;
    justify-content: flex-start;
}

.plan-action-form {
    width: 100%;
}

/* Plan action button */
.plan-action-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.4);
    transition: background-color 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.plan-action-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.5);
}

/* Current plan button style */
.current-plan-btn {
    background: #e5e7eb;
    color: #4b5563 !important;
    box-shadow: none;
    cursor: default;
}

/* Bottom note */
.upgrade-footer-note {
    margin-top: 4px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    font-size: 0.85rem;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.upgrade-footer-note i {
    color: #856404;
    margin-top: 2px;
}

/* --- Responsive adjustments for plan cards --- */

@media (max-width: 992px) {
    .plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .plan-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        padding: 18px 16px;
    }
}

@media (max-width: 480px) {
    .upgrade-header h2 {
        font-size: 1.8rem;
    }
}



/* ====================================
   SUPPORT PAGE STYLING (support.php)
   ==================================== */

.support-section {
    padding: 48px 0 80px;
    /* Uses the dashboard gradient background for visual consistency */
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 40%, #f9fafb 100%);
    min-height: calc(100vh - 80px - 100px);
}

.support-container {
    max-width: 980px;
}

/* Header */
.support-header {
    margin-bottom: 30px;
}

.support-header h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.support-header h2 i {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    padding: 8px;
}

.support-header .subtitle {
    font-size: 0.98rem;
    color: #6b7280;
}

/* Grid Layout */
.support-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 25px;
}

/* Card Base */
.support-card h3, .support-meta-card h3, .tips-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.support-card h3 i, .support-meta-card h3 i, .tips-card h3 i {
    color: #2563eb;
}

.support-card .card-desc {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 20px;
}

/* --- CRITICAL FORM STYLING FOR SUPPORT PAGE --- */
.support-form-col .form-group {
    margin-bottom: 15px;
}

.support-form-col label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.support-form-col input:not([type="submit"]),
.support-form-col textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: #f9fafb;
    transition: all 0.2s;
}

.support-form-col input:focus,
.support-form-col textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background-color: #ffffff;
    outline: none;
}

.support-form-col textarea {
    resize: vertical;
    min-height: 100px;
}
/* --- END CRITICAL FORM STYLING --- */


/* Custom styles for the submit button */
.support-submit-btn {
    /* Uses .primary-cta global style */
    margin-top: 20px;
}
.support-submit-btn[disabled] {
    background: #ccc;
    background-image: none;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.8;
}

.support-card .limit-status-note {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #0369a1; 
    font-weight: 600;
}

/* Support Meta Card */
.support-meta-card {
    position: sticky;
    top: 90px;
}
.support-current-plan {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e5e7eb;
    margin-bottom: 15px;
}
.support-current-plan strong {
    font-weight: 700;
    margin-left: 5px;
}
.support-current-plan .plan-label {
    color: #6b7280;
}

/* Support Level Badges (Mapping to PHP $support_level values) */
.support-current-plan .level-label strong {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}
.support-level-dedicated { 
    background: #fef3c7;
    color: #92400e;
}
.support-level-priority-email { 
    background: #e0f2fe;
    color: #0369a1;
}
/* FIX: Corrected the CSS class name to match PHP output */
.support-level-standard-email-48h-response { 
    background: #e5e7eb;
    color: #4b5563;
}

.support-contact-meta .priority-note {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 15px;
}
.support-contact-meta .priority-note i {
    color: #2563eb;
    margin-right: 5px;
}

.support-contact-meta .contact-title {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.support-contact-list {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 20px;
}
.support-contact-list li {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.support-contact-list li i {
    color: #2563eb;
}

.support-upgrade-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 10px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.support-upgrade-link:hover {
    background: #e0f2fe;
}
.support-upgrade-link i {
    font-size: 0.9rem;
}

/* Quick Resources (Tips Card) */
.support-perks-list {
    list-style: none;
    padding: 0;
}
.support-perks-list li {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.support-perks-list li i {
    color: #22c55e;
    margin-top: 3px;
    min-width: 14px;
}


/* --- Responsiveness --- */
@media (max-width: 900px) {
    .support-grid {
        grid-template-columns: 1fr;
    }
    .support-meta-card {
        position: static;
    }
}
@media (max-width: 640px) {
    .support-header h2 {
        font-size: 1.8rem;
    }
}
/* =======================================
   INVOICE LIST STYLING (UX/UI Enhancements)
   ======================================= */

/* Actions Cell Rework */
.actions-cell {
    /* Ensures the column content is visually centered on desktop */
    vertical-align: middle !important;
}

.actions-cell .action-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px; /* Tiny gap for secondary actions */
    align-items: center;
    justify-content: center; /* Center the whole group */
    min-width: 140px; /* Gives the column space to breathe */
}

/* Base Action Button (Secondary Look) */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Standard small button size */
    height: 32px;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    font-size: 0.95rem;
    background: #f3f4f6; /* Light gray base */
    color: #4b5563;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.06s ease, color 0.15s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.secondary-actions-group {
    display: flex;
    gap: 3px;
    margin-left: 10px; /* Separates the toggle from secondary actions */
}

/* --- PRIMARY STATUS TOGGLE (Mark Paid/Unpaid) --- */

.status-cta-primary {
    /* Visually dominant styling for the status toggle */
    width: 100px !important; 
    height: 38px !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 700;
    margin-right: 15px; /* Push it away from the secondary group */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.status-cta-primary i {
    font-size: 0.9rem;
    margin-right: 5px;
}

/* Mark as PAID (Green/Success look) */
.status-paid-btn.status-cta-primary {
    background-color: #28a745;
    color: white !important;
}
.status-paid-btn.status-cta-primary:hover {
    background-color: #1e7e34;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Mark as UNPAID (Blue/Action look) */
.status-unpaid-btn.status-cta-primary {
    background-color: #007bff;
    color: white !important;
}
.status-unpaid-btn.status-cta-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Hide mobile label on desktop */
.mobile-label {
    display: none;
}

/* Icon Color Overrides (Standard small action buttons) */
.view-btn:hover { background: #e0f2fe; color: #0369a1; }
.download-btn:hover { background: #e0f2fe; color: #0369a1; }
.edit-btn:hover { background: #e0f2fe; color: #0369a1; }
.delete-btn { background: #fee2e2; color: #b91c1c; }
.delete-btn:hover { background: #fecaca; }


/* --- Mobile Responsiveness Adjustments --- */
@media (max-width: 768px) {
    /* Stack primary action above secondary action group */
    .actions-cell .action-buttons-group {
        flex-direction: column;
        align-items: flex-start; /* Aligns buttons to the left */
        justify-content: flex-start;
        gap: 10px;
        min-width: 100%;
        padding-top: 5px;
    }

    .secondary-actions-group {
        margin-left: 0;
        /* Ensures the small action buttons stay together */
    }

    .status-cta-primary {
        width: 100% !important; 
        margin-right: 0;
    }
    
    .status-cta-primary i {
        display: none; /* Hide icon on mobile for maximum text space */
    }
    .mobile-label {
        display: inline; /* Show descriptive text on mobile */
    }
}

/* ====================================
   PRODUCT MANAGEMENT STYLING
   ==================================== */

.product-management-section {
    padding: 48px 0 80px;
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 40%, #f9fafb 100%);
    min-height: calc(100vh - 80px - 100px);
}

.product-management-section .container {
    max-width: 980px;
}

/* Page title (reusing client management style) */
.product-management-section h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.product-management-section h2 i {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    padding: 8px;
}

/* Card base styles (reusing general client management/auth styles) */
.product-form-card, .product-list-card {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    margin-bottom: 20px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.product-form-card h3, .product-list-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-form-card h3 i, .product-list-card h3 i {
    font-size: 0.98rem;
    color: #2563eb;
}

/* Form Group Layout (two-col grid) */
.form-group-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.product-form-card .form-group {
    margin-bottom: 15px;
}
.product-form-card textarea {
    min-height: 60px;
}

/* --- Product List Table --- */
.product-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.product-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 700px; /* Ensures horizontal scroll on small screens */
}

.product-list-table thead th {
    background-color: #eff6ff;
    padding: 9px 10px;
    text-align: left;
    font-weight: 700;
    color: #4b5563;
    border-bottom: 1px solid #d1d5db;
    white-space: nowrap;
}

.product-list-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
    color: #374151;
}

.product-list-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Table Column Widths/Alignment */
.product-list-table .col-price,
.product-list-table .col-tax {
    width: 100px;
    text-align: right;
}
.product-list-table .col-actions {
    width: 80px;
    text-align: right;
    white-space: nowrap;
}
.product-list-table .col-desc {
    max-width: 250px;
    color: #6b7280;
}
.product-list-table td strong {
    font-weight: 700;
    color: #111827;
}

/* Action Buttons (Reusing generic .action-btn styles) */
/* Edit & Delete buttons already styled globally (delete-btn, edit-btn) */
.product-list-table .action-btn {
    margin-left: 4px;
}

/* Lock Message (Reusing premium-lock-message style) */
.premium-lock-message {
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    border: 1px dashed #f59e0b;
    background: #fffdf7;
}

.premium-lock-message h3 {
    border-bottom: none;
    font-size: 1.4rem;
    color: #92400e;
    margin-bottom: 15px;
}
.premium-lock-message p {
    font-size: 1rem;
    color: #78350f;
    margin-bottom: 20px;
}
.premium-lock-message .upgrade-link {
    display: inline-flex;
    padding: 10px 20px;
    background: #facc15;
    color: #92400e !important;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.45);
}

/* --- Responsive Table (Mobile) --- */
@media (max-width: 768px) {
    .product-management-section h2 {
        font-size: 1.8rem;
    }
    .product-management-section .card {
        padding: 16px;
    }
    .product-form-card .form-group-grid.two-col {
        grid-template-columns: 1fr;
    }

    /* Stack rows into cards */
    .product-list-table thead {
        display: none;
    }
    .product-list-table,
    .product-list-table tbody,
    .product-list-table tr,
    .product-list-table td {
        display: block;
        width: 100%;
    }
    .product-list-table tr {
        margin-bottom: 12px;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        padding: 8px 10px;
        background-color: #ffffff;
    }
    .product-list-table td {
        border-bottom: none;
        padding: 4px 0;
    }
    .product-list-table td::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6b7280;
        display: inline-block;
        min-width: 110px;
    }
    .product-list-table .col-actions {
        text-align: left;
        margin-top: 6px;
    }
}
/* ====================================
   CLIENT MANAGEMENT STYLING (client_management.php)
   ==================================== */

.client-management-section {
    padding: 48px 0 80px;
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 40%, #f9fafb 100%);
    min-height: calc(100vh - 80px - 100px);
}

.client-management-section .container {
    max-width: 980px;
}

/* Page title */
.client-management-section h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.client-management-section h2 i {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    padding: 8px;
}

/* Card base */
.client-form-card, .client-list-card {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    margin-bottom: 20px;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.client-form-card h3, .client-list-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-form-card h3 i, .client-list-card h3 i {
    font-size: 0.98rem;
    color: #2563eb;
}

/* --- Client Form Layout --- */
.client-management-section .form-group-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.client-management-section .form-group {
    margin-bottom: 15px;
}
.client-management-section .form-group label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 4px;
}
.client-management-section input {
    /* Inherits standard input styles, ensures consistency */
    padding: 8px 10px;
    border-radius: 8px;
}
.client-save-btn {
    margin-top: 10px;
}

/* --- Client List Table --- */
.client-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.client-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 700px;
}

.client-list-table thead th {
    background-color: #eff6ff;
    padding: 9px 10px;
    text-align: left;
    font-weight: 700;
    color: #4b5563;
    border-bottom: 1px solid #d1d5db;
    white-space: nowrap;
}

.client-list-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
    color: #374151;
}

.client-list-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Column formatting */
.client-list-table td strong {
    font-weight: 700;
    color: #111827;
}

.client-list-table td small {
    color: #6b7280;
    display: block;
    margin-top: 2px;
}

.client-list-table .col-address {
    max-width: 280px;
    font-size: 0.85rem;
}
.client-list-table .col-actions {
    width: 80px;
    text-align: right;
    white-space: nowrap;
}

/* Action Button Styles (reusing global styles) */
.client-list-table .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    margin-left: 4px;
    font-size: 0.82rem;
    cursor: pointer;
}

/* Delete button styles are global (.delete-btn) */
.edit-btn {
    background-color: #e0f2fe;
    color: #1d4ed8;
}

/* --- Premium Lock Message --- */
.premium-lock-message {
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    border: 1px dashed #f59e0b;
    background: #fffdf7;
    margin-bottom: 30px;
}
.premium-lock-message h3 {
    border-bottom: none;
    font-size: 1.4rem;
    color: #92400e;
    margin-bottom: 15px;
}
.premium-lock-message p {
    font-size: 1rem;
    color: #78350f;
    margin-bottom: 20px;
}
.premium-lock-message .upgrade-link {
    display: inline-flex;
    padding: 10px 20px;
    background: #facc15;
    color: #92400e !important;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
}

/* --- Responsive Table --- */
@media (max-width: 768px) {
    .client-management-section .form-group-grid.two-col {
        grid-template-columns: 1fr;
    }

    .client-list-table thead {
        display: none;
    }
    .client-list-table,
    .client-list-table tbody,
    .client-list-table tr,
    .client-list-table td {
        display: block;
        width: 100%;
    }
    .client-list-table tr {
        margin-bottom: 12px;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        padding: 8px 10px;
        background-color: #ffffff;
    }
    .client-list-table td {
        border-bottom: none;
        padding: 4px 0;
    }
    .client-list-table td[data-label]::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6b7280;
        display: inline-block;
        min-width: 110px;
    }
    .client-list-table .col-actions {
        text-align: left;
        margin-top: 6px;
    }
}
/* ====================================
   REPORTING & EXPORT STYLING (reporting.php)
   ==================================== */

.reporting-section {
    padding: 48px 0 80px;
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 40%, #f9fafb 100%);
    min-height: calc(100vh - 80px - 100px);
}

.reporting-section h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.reporting-section h2 i {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    padding: 8px;
}

/* Filters Card */
.reporting-filters-card {
    margin-bottom: 30px;
    padding: 25px;
}

.report-filters-form .form-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.report-filters-form .form-group label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #4b5563;
}

.report-filters-form input,
.report-filters-form select {
    /* Uses standard form input styles */
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    background-color: #f9fafb;
}

.filters-actions-row {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

/* --- Report Layout Grid (Summary + Table) --- */
.report-grid {
    display: grid;
    /* Summary takes 1.2 units, Detail takes 2 units */
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
    gap: 24px;
}

.report-summary-card h3,
.report-table-card h3 {
    font-size: 1.05rem;
    margin-bottom: 15px;
}

/* --- Summary Metrics Tiles --- */
.summary-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.summary-metric {
    padding: 15px;
    border-radius: 12px;
    background: #f8faff; /* Very light background for metrics */
    border: 1px solid #e5e7eb;
}

.summary-metric .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 5px;
    font-weight: 600;
}

.summary-metric .value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
}

.small-help-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

/* --- Detailed Report Table --- */
.report-table-wrapper {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 850px; /* Ensures all columns show on large screens */
}

.report-table thead th {
    background: #eff6ff;
    padding: 10px 12px;
    font-weight: 700;
    color: #4b5563;
    border-bottom: 1px solid #d1d5db;
    white-space: nowrap;
}

.report-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

/* Table Text helpers for currencies/totals */
.report-table .text-right {
    font-variant-numeric: tabular-nums; /* Align numbers in columns */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .report-grid {
        grid-template-columns: 1fr;
    }
    .report-filters-form .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .reporting-section h2 {
        font-size: 1.8rem;
    }
    .report-filters-form .form-row {
        grid-template-columns: 1fr;
    }
    .filters-actions-row {
        flex-direction: column;
    }
}
/* ====================================
   ACCOUNT SETTINGS STYLING (settings.php)
   ==================================== */

.settings-section {
    padding: 48px 0 80px;
    background: radial-gradient(circle at top left, #e0f2fe 0, #eff6ff 40%, #f9fafb 100%);
    min-height: calc(100vh - 80px - 100px);
}

.settings-container {
    max-width: 880px;
}

/* Page header */
.settings-section h2 {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.settings-section h2 i {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 999px;
    padding: 8px;
}

/* Card base */
.settings-section .card {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
    margin-bottom: 20px;
}

.settings-section .card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-section .card h3 i {
    color: #2563eb;
}

/* --- General Info Card --- */
.account-info-card p {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 6px 0;
}
.account-info-card strong {
    color: #111827;
}

/* --- Branding & Logo Card --- */
.logo-preview-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e5e7eb;
}
.logo-preview-area label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    min-width: 100px;
}
.current-logo-img {
    max-height: 50px;
    max-width: 200px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 5px;
    object-fit: contain;
}
.branding-card .form-group {
    margin-bottom: 15px;
}

/* Theme Selection Card */
.theme-selection-card select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    font-size: 0.95rem;
}
.theme-selection-card button {
    margin-top: 15px;
}
.small-help-text {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 10px;
}


/* --- Lock Overlay --- */
.premium-lock-overlay-small {
    border-radius: 12px;
    padding: 15px;
    border: 1px dashed #f59e0b;
    background: #fffdf7;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
.premium-lock-overlay-small .lock-icon {
    font-size: 1.8rem;
    color: #f59e0b;
    margin-top: 2px;
    flex-shrink: 0;
}
.premium-lock-overlay-small p {
    font-size: 0.95rem;
    color: #78350f;
    margin: 0;
}
.premium-lock-overlay-small .upgrade-link {
    display: inline-block;
    padding: 6px 12px;
    background: #facc15;
    color: #92400e !important;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .settings-container {
        padding: 0 15px;
    }
    .logo-preview-area {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* --- THEME SELECTOR CARD STYLING (For create_invoice.php) --- */

.theme-selector-card .form-group {
    margin-bottom: 10px;
}
.theme-selector-card select {
    /* Uses general form input styling */
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
    max-width: 300px;
}
.theme-live-preview-container {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}
.theme-live-preview-container .preview-text {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    transition: all 0.2s;
}

/* Style for the footer elements preview */
.preview-divider {
    border: none;
    border-top: 1px dashed #e5e7eb;
    margin: 15px 0;
}
.footer-element-previews h4 {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 10px;
}
.preview-signature, .preview-stamp {
    max-height: 50px;
    border: 1px dashed #ccc;
    padding: 3px;
    border-radius: 4px;
    margin: 5px 0;
}

/* ======================================= */
/* 2. PAYMENT SUCCESS PAGE STYLES */
/* ======================================= */

.payment-success-section {
    min-height: 80vh; /* Ensures the content is centered vertically */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa; /* Light background for contrast */
}

.success-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 450px;
    width: 90%;
    margin: 0 auto;
    border-top: 5px solid #28a745; /* Green color accent */
}

.success-icon-wrapper {
    margin-bottom: 20px;
}

.success-icon {
    font-size: 60px;
    color: #28a745; /* Green checkmark */
}

.success-card h2 {
    color: #343a40;
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.success-card p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

.small-text-note {
    font-size: 0.9rem;
    color: #007bff; /* Blue for attention */
    font-weight: 500;
}

.dashboard-link {
    font-size: 1rem;
    padding: 10px 25px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

.support-conversation-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.ticket-list-column,
.ticket-chat-column {
    padding: 1rem;
}

.ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ticket-list-item {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.ticket-list-item.active,
.ticket-list-item:hover {
    background: #f5f7fb;
}

.ticket-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ticket-chat-body {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.chat-message {
    margin-bottom: 0.75rem;
}

.chat-message.user .chat-bubble {
    background: #e9f3ff;
    align-self: flex-start;
}

.chat-message.admin .chat-bubble {
    background: #e8fff1;
    align-self: flex-end;
}

.chat-bubble {
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    display: inline-block;
}

.ticket-chat-reply {
    border-top: 1px solid #e2e5ec;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}
/* ============================
   SUPPORT PAGE LAYOUT & CHAT
   ============================ */

/* Overall section */
.support-section {
    background: radial-gradient(circle at top left, #e0f1ff 0, #f4f7ff 40%, #f7fbff 100%);
    padding: 40px 0 80px;
}

.support-container {
    max-width: 1100px;
}

/* Header */
.support-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.support-header .subtitle {
    margin: 0;
    color: #64748b;
}

/* Top grid: form + info cards */
.support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 1.75rem;
    align-items: flex-start;
    margin-top: 1.75rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 991px) {
    .support-grid {
        grid-template-columns: 1fr;
    }
}

/* Generic cards on support page */
.support-card,
.support-meta-card,
.tips-card,
.ticket-list-column,
.ticket-chat-column {
    background: #ffffff;
    border-radius: 18px;
    border: none;
    padding: 18px 20px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.support-card h3,
.support-meta-card h3,
.tips-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Form elements */
.support-card .form-group {
    margin-bottom: 0.8rem;
}

.support-card label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1f2933;
    margin-bottom: 0.25rem;
}

.support-card input[type="text"],
.support-card input[type="email"],
.support-card textarea {
    font-size: 0.9rem;
    border-radius: 10px;
    border: 1px solid #d0d7e2;
    padding: 0.5rem 0.65rem;
}

.support-card textarea {
    resize: vertical;
}

/* Submit button */
.support-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 600;
    border-radius: 999px;
    border: none;
    padding: 0.55rem 1.8rem;
    background: linear-gradient(90deg, #2563eb, #22c55e);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.support-submit-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
}

/* Limit / usage text */
.limit-status-note {
    font-size: 0.8rem;
    color: #0f172a;
    font-weight: 500;
    margin-left: 0.35rem;
}

/* Right column info cards */
.support-current-plan {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.support-current-plan .plan-label strong {
    color: #2563eb;
}

.support-current-plan .level-label strong {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #f97316;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.support-contact-meta .contact-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
}

.support-contact-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.85rem;
}

.support-contact-list li {
    margin-bottom: 0.25rem;
    color: #475569;
}

.support-contact-list i {
    width: 16px;
    text-align: center;
    margin-right: 0.35rem;
}

/* Upgrade link */
.support-upgrade-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    color: #2563eb;
    text-decoration: none;
}

.support-upgrade-link:hover {
    text-decoration: underline;
}

/* Tips card */
.tips-card .support-perks-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.tips-card .support-perks-list li {
    margin-bottom: 0.35rem;
    color: #475569;
}

/* ============================
   TICKET LIST + CHAT
   ============================ */
.support-conversation-wrapper {
    margin-top: 0.5rem;
}

.support-conversation-grid {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 991px) {
    .support-conversation-grid {
        grid-template-columns: 1fr;
    }
}

.ticket-list-column {
    padding: 16px 16px 18px;
}

.ticket-list-column h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.ticket-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ticket-list-item {
    border-radius: 12px;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.35rem;
    transition: background-color 0.15s ease, transform 0.08s ease;
}

.ticket-list-item.active,
.ticket-list-item:hover {
    background: #eff4ff;
    transform: translateY(-1px);
}

.ticket-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ticket-subject {
    font-size: 0.86rem;
    font-weight: 500;
}

.ticket-meta {
    font-size: 0.78rem;
}

/* Chat column */
.ticket-chat-column {
    display: flex;
    flex-direction: column;
    padding: 16px 18px 14px;
}

.ticket-chat-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.ticket-chat-header p {
    font-size: 0.8rem;
}

.ticket-chat-body {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
    padding-right: 0.25rem;
    max-height: 340px;
    overflow-y: auto;
}

/* Chat bubbles */
.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
}

.chat-message .chat-meta {
    font-size: 0.74rem;
    margin-bottom: 0.15rem;
}

.chat-message.user {
    align-items: flex-start;
}

.chat-message.admin {
    align-items: flex-end;
}

.chat-bubble {
    max-width: 80%;
    border-radius: 14px;
    padding: 0.45rem 0.7rem;
    font-size: 0.88rem;
    line-height: 1.4;
}

/* User bubble in blue, admin in green */
.chat-message.user .chat-bubble {
    background: #e4f0ff;
    color: #0f172a;
}

.chat-message.admin .chat-bubble {
    background: #dcfce7;
    color: #064e3b;
}

/* Reply box */
.ticket-chat-reply {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.6rem;
    margin-top: auto;
}

.ticket-chat-reply textarea {
    font-size: 0.88rem;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
}

.ticket-chat-reply button {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
}
