/*
 * style-body.css
 * This stylesheet consolidates all global, page-level, and common component styles.
 * It replaces Tailwind CSS utility classes with semantic custom classes for easier maintenance.
 */

/* ------------------------------------------- */
/* Base Styles */
/* ------------------------------------------- */

/* Styles for the entire body of the application */
body {
    font-family: "Inter", sans-serif; /* Uses the Inter font */
    line-height: 1.5; /* Default line height */
    background-color: #f3f4f6; /* Light gray background (equivalent to bg-gray-100) */
    color: #1f2937; /* Dark gray text (equivalent to text-gray-900) */
    margin: 0; /* Remove default body margin */
    display: flex; /* Flex container for overall page layout */
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center content horizontally */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    padding-top: 26px; /* Padding for fixed top bar */
    padding-bottom: 60px; /* Add padding for fixed bottom footer (adjust if footer height changes) */
}

/* Page wrapper to control max width of content and allow main content to grow */
.page-wrapper {
    width: 100%; /* Full width by default */
    max-width: 1280px; /* Max width for content */
    flex-grow: 1; /* Allows the content wrapper to take up available space, pushing footer to bottom */
    display: flex; /* Make it a flex container */
    flex-direction: column; /* Stack children vertically */
    justify-content: flex-start; /* Align content at the start */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}


/* ------------------------------------------- */
/* Top Bar Styles */
/* ------------------------------------------- */
.top-bar {
    background-color: #333; /* Dark background */
    color: #fff; /* White text */
    padding: 3px 9px; /* Padding */
    font-family: "Inter", sans-serif; /* Consistent font */
    font-size: 0.9em;
    display: flex;
    justify-content: flex-end; /* Align content to the right */
    align-items: center;
    width: 100%;
    box-sizing: border-box; /* Include padding in width */
    position: fixed; /* Fixed positioning */
    top: 0;
    left: 0;
    right: 0;
    border: none; /* Remove borders */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Subtle shadow */
    z-index: 1000; /* Ensure it stays on top */
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.top-bar a:hover {
    background-color: #555;
}

.top-bar .welcome-message {
    margin-right: auto; /* Push other items to the right */
    font-weight: bold;
    padding: 5px 0; /* Add padding for consistency */
}


/* ------------------------------------------- */
/* Layout & Container Styles */
/* ------------------------------------------- */

/* Main content area for pages */
.main-content-area {
    background-color: #ffffff;
    padding: 16px; /* Updated from 32px */
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    margin: 32px auto 0 auto;
    box-sizing: border-box;
}

/* Smaller content area for forms/promotional banner on root index.php, login, register, add_transaction, edit_account */
.form-content-area {
    max-width: 448px; /* Equivalent to max-w-md */
}


/* Specific layout for the unauthenticated view in root index.php */
.unauthenticated-layout {
    display: flex;
    flex-direction: column; /* Default to column for portrait/small screens */
    gap: 24px; /* Space between sections */
    width: 100%;
    max-width: 900px; /* Adjust max-width for landscape if needed, or keep it responsive */
    margin: 32px auto; /* Center the layout */
    padding: 0 16px; /* Add some horizontal padding */
    box-sizing: border-box;
}

/* For landscape/larger screens, switch to row layout */
@media (min-width: 768px) { /* md breakpoint */
    .unauthenticated-layout {
        flex-direction: row; /* Row for landscape */
        align-items: flex-start; /* Align items to the top in a row */
    }
    .unauthenticated-left,
    .unauthenticated-right {
        flex: 1; /* Distribute space equally */
        /* background-color: #ffffff; /* Keep main content background on these sections */
        padding: 16px; /* Padding for individual sections */
        border-radius: 12px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    .unauthenticated-left {
        max-width: 50%; /* Allow left section to take up to 50% */
    }
    .unauthenticated-right {
        max-width: 50%; /* Allow right section to take up to 50% */
    }
}


/* ------------------------------------------- */
/* Typography */
/* ------------------------------------------- */

h1, h2, h3, h4 {
    color: #1f2937;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.25rem; }

p {
    font-size: 1rem;
    color: #4b5563; /* Default paragraph color is text-gray-600 */
    margin-bottom: 16px;
    word-wrap: break-word; /* Ensure text breaks in smaller containers */
    overflow-wrap: break-word;
    white-space: normal; /* Ensure text wraps */
}

.text-sm { font-size: 0.875rem; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.italic { font-style: italic; }

/* Display specific values (e.g., LKR amounts) */
.display-value-lg {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700; /* font-bold */
}

.display-value-xl {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
}

/* Specific class for small, descriptive notes */
.text-note {
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* A slightly lighter gray for notes, similar to text-gray-500/600 */
}


/* ------------------------------------------- */
/* Buttons */
/* ------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap; /* Prevent text wrapping unless explicitly overridden by a child */
    border: none;
    box-sizing: border-box; /* Ensure padding and border are included in button's total width */
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.75rem;
    border-radius: 9999px;
}

/* Full width button */
.btn-full-width {
    width: 100%;
}


/* Primary Button (Blue) */
.btn-primary { background-color: #3b82f6; color: #ffffff; }
.btn-primary:hover { background-color: #2563eb; transform: translateY(-2px); box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08); }

/* Action Button (Blue-600 for forms) */
.btn-action { background-color: #2563eb; color: #ffffff; }
.btn-action:hover { background-color: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08); }

/* Success Button (Green) */
.btn-success { background-color: #10b981; color: #ffffff; }
.btn-success:hover { background-color: #059669; transform: translateY(-2px); box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08); }

/* Warning/Add Button (Yellow) */
.btn-warning { background-color: #f59e0b; color: #ffffff; }
.btn-warning:hover { background-color: #d97706; transform: translateY(-2px); box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08); }

/* Danger Button (Red) */
.btn-danger { background-color: #ef4444; color: #ffffff; }
.btn-danger:hover { background-color: #dc2626; transform: translateY(-2px); box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08); }

/* Secondary/Gray Button */
.btn-secondary { background-color: #6b7280; color: #ffffff; }
.btn-secondary:hover { background-color: #4b5563; transform: translateY(-2px); box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08); }

/* Info Button (Indigo) */
.btn-info {
    background-color: #4f46e5; /* Indigo-600 */
    color: #ffffff;
}

.btn-info:hover {
    background-color: #4338ca; /* Indigo-700 on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
}


/* Inline action links (e.g., Edit/Delete) */
.action-link {
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}
.action-link.blue { color: #2563eb; }
.action-link.blue:hover { color: #1d4ed8; text-decoration: underline; }
.action-link.red { color: #dc2626; }
.action-link.red:hover { color: #b91c1c; text-decoration: underline; }


/* ------------------------------------------- */
/* Forms */
/* ------------------------------------------- */

.form-container {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 32px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Crucial for preventing horizontal overflow */
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.form-textarea { resize: vertical; }
.form-input.readonly { background-color: #f3f4f6; cursor: not-allowed; }


/* ------------------------------------------- */
/* Messages & Alerts */
/* ------------------------------------------- */

.message-box {
    padding: 12px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid;
    display: block;
}

.message-box.success { background-color: #d1fae5; color: #065f46; border-color: #34d399; }
.message-box.error { background-color: #fee2e2; color: #b91c1c; border-color: #f87171; }
.message-box.info { background-color: #dbeafe; color: #1e40af; border-color: #60a5fa; }


/* ------------------------------------------- */
/* Tables */
/* ------------------------------------------- */

.data-table-container {
    overflow-x: auto; /* Enable horizontal scrolling on small screens */
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
    color: #4b5563;
}

.data-table thead {
    font-size: 0.75rem;
    color: #1f2937;
    text-transform: uppercase;
    background-color: #f9fafb;
}

.data-table th, .data-table td { padding: 16px 24px; }
.data-table tbody tr { background-color: #ffffff; border-bottom: 1px solid #e5e7eb; }
.data-table tbody tr:hover { background-color: #f9fafb; }

/* Specific styling for amount column in transactions table */
.amount-cell { font-weight: 600; }
.amount-income { color: #10b981; }
.amount-expense { color: #ef4444; }
.amount-asset { color: #3b82f6; }
.amount-liability { color: #a855f7; }
.amount-uncategorized { color: #4b5563; }


/* ------------------------------------------- */
/* Cards & Summary Displays (from display_balance.php) */
/* ------------------------------------------- */

.summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .summary-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

.summary-card {
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.summary-card.green-bg { background-color: #ecfdf5; }
.summary-card.red-bg { background-color: #fef2f2; }
.summary-card.blue-bg { background-color: #eff6ff; }
.summary-card.pink-bg { background-color: #fdf2f8; }

.summary-card.net-balance {
    grid-column: span 1;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
    .summary-card.net-balance { grid-column: span 2; }
}

.net-balance.positive { background-color: #dbeafe; color: #1e40af; }
.net-balance.negative { background-color: #fff7ed; color: #9a3412; }

.summary-list {
    list-style: disc;
    list-style-position: inside;
    margin-top: 12px;
    line-height: 1.5;
}
.summary-list li { margin-bottom: 8px; }
.summary-list .float-right { float: right; }

.text-green-strong { color: #065f46; }
.text-green-super-strong { color: #047857; }
.text-red-strong { color: #b91c1c; }
.text-red-super-strong { color: #991b1b; }
.text-blue-strong { color: #1e40af; }
.text-blue-super-strong { color: #2563eb; }
.text-pink-strong { color: #be185d; }
.text-pink-super-strong { color: #a2124f; }


/* ------------------------------------------- */
/* Modals (for add_transaction.php) */
/* ------------------------------------------- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 384px;
}


/* ------------------------------------------- */
/* Account Search Suggestions (add_transaction.php) */
/* ------------------------------------------- */

.suggestions-container {
    position: absolute;
    z-index: 10;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background-color: #dbeafe; }


/* ------------------------------------------- */
/* Tabs (manage_accounts.php) */
/* ------------------------------------------- */

.tabs-navigation {
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    list-style: none;
    padding: 0;
    margin: 0;
    margin-bottom: -1px;
}
.tab-list-item { margin-right: 8px; }
.tab-button {
    display: inline-block;
    padding: 16px;
    border-bottom: 2px solid transparent;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.tab-button:hover { color: #4b5563; border-color: #d1d5db; }
.tab-button.active { color: #2563eb; border-color: #2563eb; font-weight: 600; }
.tab-content-container {
    padding: 16px;
    border-radius: 8px;
    background-color: #f9fafb;
}


/* ------------------------------------------- */
/* Dashboard Grid (for index.php) */
/* ------------------------------------------- */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column for smaller screens */
    gap: 24px;
}

@media (min-width: 768px) { /* md breakpoint */
    .dashboard-grid.cols-2 { grid-template-columns: 1fr 1fr; }
}

/* Force 2 columns for the unauthenticated dashboard grid on small screens */
.unauthenticated-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Always two columns for mobile */
    gap: 16px; /* Smaller gap for mobile */
    padding: 0 8px; /* Add some padding to the sides to ensure items fit */
    box-sizing: border-box; /* Include padding in width calculation */
}

@media (min-width: 768px) { /* md breakpoint */
    .unauthenticated-dashboard-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns on larger screens too */
        gap: 24px; /* Restore larger gap for larger screens */
    }
}


.dashboard-card {
    display: block;
    padding: 24px;
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.dashboard-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dashboard-card .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.dashboard-card p { /* Ensure text wraps within dashboard cards */
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Specific card background colors */
.dashboard-card.blue-bg { background-color: #3b82f6; }
.dashboard-card.blue-bg:hover { background-color: #2563eb; }

.dashboard-card.green-bg { background-color: #10b981; }
.dashboard-card.green-bg:hover { background-color: #059669; }

.dashboard-card.purple-bg { background-color: #a855f7; }
.dashboard-card.purple-bg:hover { background-color: #9333ea; }

.dashboard-card.orange-bg { background-color: #f97316; }
.dashboard-card.orange-bg:hover { background-color: #ea580c; }

.dashboard-card.gray-bg { background-color: #6b7280; }
.dashboard-card.gray-bg:hover { background-color: #4b5563; }


/* ------------------------------------------- */
/* Promotional Banner (for root index.php) */
/* ------------------------------------------- */
.promotional-banner {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 24px; /* Increased padding */
    border-radius: 12px;
    text-align: center;
    margin-bottom: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    box-sizing: border-box; /* Crucial for responsiveness */
}

.promotional-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #1e40af;
}

.promotional-banner p { /* Ensure text wraps within banner */
    font-size: 1.125rem;
    margin-bottom: 24px;
    color: #1e40af;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.banner-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap; /* Ensure buttons wrap if space is constrained */
}

/* ------------------------------------------- */
/* Fixed Footer Navigation */
/* ------------------------------------------- */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1f2937;
    color: #ffffff;
    padding: 12px;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
    box-sizing: border-box;
}

.footer-nav-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 0.75rem; /* text-xs */
}

@media (min-width: 768px) { /* md breakpoint */
    .footer-nav-container {
        font-size: 0.875rem; /* md:text-sm */
    }
}

@media (min-width: 1024px) { /* lg breakpoint */
    .footer-nav-container {
        font-size: 1rem; /* lg:text-base */
    }
}

.footer-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    flex-grow: 1; /* Allow items to grow to fill space */
    flex-basis: 0; /* Important for flex-grow to work evenly */
    min-width: 0; /* Prevents content from pushing item wider */
    text-align: center; /* Center text within item */
}

.footer-nav-item:hover { background-color: #374151; }

.footer-icon {
    font-size: 1.125rem; /* text-lg */
    margin-bottom: 4px;
}

@media (min-width: 768px) { /* md breakpoint */
    .footer-icon { font-size: 1.25rem; } /* md:text-xl */
}

/* Responsive Text for Footer Buttons (long text for desktop, short for mobile) */
.footer-nav-item .text-desktop {
    display: none; /* Hidden by default */
}

@media (min-width: 768px) { /* On medium screens and up */
    .footer-nav-item .text-desktop {
        display: inline; /* Show desktop text */
    }
}

.footer-nav-item .text-mobile {
    display: inline; /* Visible by default */
}

@media (min-width: 768px) { /* On medium screens and up */
    .footer-nav-item .text-mobile {
        display: none; /* Hide mobile text */
    }
}

/* Specific login button in footer for non-logged-in state */
.footer-login-btn {
    background-color: #2563eb;
    color: #ffffff;
    /* This overrides the hover background of the standard footer-nav-item,
       but the general hover transition still applies. */
}

.footer-login-btn:hover {
    background-color: #1d4ed8;
}

/* Specific styling for 'Wealth Manager' span when not logged in */
.footer-brand-text {
    padding: 8px; /* Equivalent to p-2 */
    font-weight: 700; /* Equivalent to font-bold */
    color: #ffffff; /* Equivalent to text-white */
    white-space: nowrap; /* Prevent "Wealth Manage" from wrapping */
    cursor: default; /* Indicate it's not clickable */
}


/* ------------------------------------------- */
/* Utility Classes (Minimal, only for JS toggles) */
/* ------------------------------------------- */
.flex-center { display: flex; justify-content: center; align-items: center; }

/* Custom space utilities to replace Tailwind's */
.space-x-4 > *:not(:first-child) { margin-left: 16px; }
.space-x-2 > *:not(:first-child) { margin-left: 8px; }
.space-y-4 > *:not(:first-child) { margin-top: 16px; }
.space-y-2 > *:not(:first-child) { margin-top: 8px; }

.float-right { float: right; }
.block { display: block; }

/* Full width utility to be applied directly, or via btn-full-width */
.w-full { width: 100%; }

/* Margins */
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }

.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }

.mr-2 { margin-right: 8px; } .ml-2 { margin-left: 8px; }

/* Responsive utility for flex wrap for button groups at the bottom */
.btn-group-responsive {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    justify-content: center;
    gap: 8px; /* Use a small gap between buttons */
}

@media (min-width: 768px) {
    .btn-group-responsive.md\:space-x-4 > *:not(:first-child) {
        margin-left: 16px; /* Revert to larger space on medium screens */
        margin-top: 0; /* Remove top margin on larger screens if wrapped */
    }
    .btn-group-responsive.md\:space-x-4 > * { /* Apply margin-bottom only to elements that wrap */
        margin-bottom: 0;
    }
}


/* General hidden utility for JS toggles */
.hidden {
    display: none !important;
}

/* Relative positioning utility */
.relative {
    position: relative;
}
