body {
    background: var(--theme-body-background);
    background-attachment: fixed; /* Keep gradient fixed during scroll */
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* Global link styling */
a {
    color: var(--theme-link-text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 400px;
    margin: 40px auto;
    background: var(--theme-container-background);
    border-radius: 16px;
    box-shadow: 0 4px 24px var(--theme-container-shadow), 0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 32px 24px;
    backdrop-filter: blur(10px); /* Adds a subtle blur effect */
}

h1 {
    text-align: center;
    color: var(--theme-primary-text);
    margin-bottom: 24px;
}

/* Remove excessive top margin from auth form titles */
#login-form h1,
#register-form h1,
#forgot-password-form h1 {
    margin-top: 0;
}

/* Application Title on Login Page */
.app-title {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--theme-app-title-border);
}

.app-title h1 {
    color: var(--theme-link-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.auth-theme-switcher {
    position: fixed; /* Fixed to viewport instead of absolute */
    left: 20px; /* Distance from left edge of screen */
    top: 20px; /* Distance from top edge of screen */
    z-index: 1000; /* Ensure it's above other content */
}

.auth-theme-switcher .theme-switcher-button {
    font-size: 1.5em; /* Slightly smaller than dashboard version */
}

/* Align specific section headers to the left */
#svazy-section h1,
#kraje-section h1,
#kluby-section h1 {
    text-align: left;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Reduced from 16px for tighter spacing */
}

form label {
    font-size: 1em;
    color: var(--theme-secondary-text);
    margin-bottom: -6px; /* Reduce gap between label and input */
    font-weight: 500;
}

/* Date field container for horizontal layout */
.date-field-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px; /* Extra spacing below date field */
}

.date-field-container label {
    margin-bottom: 0; /* Reset margin for horizontal layout */
    white-space: nowrap;
    flex-shrink: 0;
}

.date-field-container input[type="date"] {
    flex: 1;
    min-width: 0;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"] {
    padding: 12px;
    border: 1px solid var(--theme-input-border);
    border-radius: 6px;
    font-size: 1rem;
    background-color: var(--theme-container-background);
    color: var(--theme-primary-text);
}

/* Make date input more obvious */
input[type="date"] {
    position: relative;
    background-color: var(--theme-date-input-background);
    cursor: pointer;
    color: var(--theme-primary-text);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
    filter: invert(var(--theme-icon-invert, 0));
}

/* Show calendar icon more prominently */
input[type="date"]::-webkit-datetime-edit {
    padding: 0;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

/* File input styling */
input[type="file"] {
    color: var(--theme-primary-text);
}

input[type="file"]::file-selector-button {
    background: var(--theme-primary-button);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 10px;
}

input[type="file"]::file-selector-button:hover {
    background: var(--theme-primary-button-hover);
}

button {
    background: var(--theme-primary-button);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

button:hover {
    background: var(--theme-primary-button-hover);
}

button:disabled {
    background: var(--theme-disabled-button);
    cursor: not-allowed;
    opacity: 0.7;
}

button:disabled:hover {
    background: var(--theme-disabled-button);
}

button.requirements-met {
    background: var(--theme-requirements-met-button);
    opacity: 1;
}

button.requirements-met:hover {
    background: var(--theme-requirements-met-button-hover);
}

.error {
    color: var(--theme-error-text);
    text-align: center;
    margin-bottom: 12px;
}

.success {
    color: var(--theme-success-text);
    text-align: center;
    margin-bottom: 12px;
}

/* Password strength and requirements styles */
.password-requirements {
    margin: 0; /* Remove top/bottom margin, use form gap instead */
    font-size: 0.85em;
    color: var(--theme-tertiary-text);
}

.password-requirements p {
    margin: 0 0 5px 0; /* Small margin only below prompt */
}

/* Style small text elements */
small {
    color: var(--theme-tertiary-text);
}

.password-requirements ul {
    list-style-type: none;
    padding-left: 15px;
    margin: 0;
}

.password-requirements li {
    margin: 2px 0; /* Reduced from 5px for tighter list */
}

.requirement-met {
    color: var(--theme-requirement-met);
}

.requirement-not-met {
    color: var(--theme-requirement-not-met);
}

.password-strength-meter {
    height: 8px;
    width: 100%;
    background-color: var(--theme-password-strength-background);
    margin: 0; /* Remove margin, use form gap instead */
    border-radius: 5px;
}

.password-strength-meter div {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease-in-out;
}

.strength-1 {
    width: 25%;
    background-color: var(--theme-password-strength-1);
}

.strength-2 {
    width: 50%;
    background-color: var(--theme-password-strength-2);
}

.strength-3 {
    width: 75%;
    background-color: var(--theme-password-strength-3);
}

.strength-4 {
    width: 100%;
    background-color: var(--theme-password-strength-4);
}

@media (max-width: 500px) {
    .container {
        padding: 18px 6px;
    }
}

/* Basic styles for showing/hiding sections */
.hidden { display: none !important; }

/* Loader style (keep as is) */
.loader {
    border: 4px solid var(--theme-loader-background); border-top: 4px solid var(--theme-loader-foreground); border-radius: 50%;
    width: 20px; height: 20px; animation: spin 1s linear infinite;
    display: inline-block; margin-left: 10px; vertical-align: middle;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Message area styles */
#general-message {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}
.message-success { color: var(--theme-success-text); }
.message-error { color: var(--theme-error-text); }
.message-info { color: var(--theme-info-text); } /* Style for info messages */
.message-area { margin-bottom: 10px; text-align: center; font-weight: bold; }

/* QR Code Styles */
#my-qr-container {
    padding: 20px;
    background-color: var(--theme-container-background);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--theme-modal-shadow);
}

#my-qr-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#my-qr-view .button-like {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Dashboard specific styles */
/* #dashboard-view { padding-top: 50px; } Removed padding to use flex header */
.header-logout {
    /* Removed absolute positioning, handled by flexbox in .dashboard-header */
    flex-shrink: 0; /* Prevent shrinking */
}
.theme-switcher-button {
    background: none;
    border: none;
    color: var(--theme-logout-button);
    cursor: pointer;
    font-size: 1.8em; /* Adjust icon size */
    padding: 5px;
    transition: all 0.2s ease;
}
.theme-switcher-button:hover {
    color: var(--theme-logout-button-hover);
    background-color: var(--theme-logout-button-hover-background);
    border-radius: 6px;
}
.logout-button {
    background: none;
    border: none;
    color: var(--theme-logout-button);
    cursor: pointer;
    font-size: 1.8em; /* Adjust icon size */
    padding: 5px;
    transition: all 0.2s ease;
}
.logout-button:hover {
    color: var(--theme-logout-button-hover);
    background-color: var(--theme-logout-button-hover-background);
    border-radius: 6px;
}
.verification-status {
    margin: 20px 0; padding: 15px; border-radius: 6px; text-align: center;
}
.verified { background-color: var(--theme-verification-verified-background); color: var(--theme-verification-verified-text); }
.not-verified { background-color: var(--theme-verification-not-verified-background); color: var(--theme-verification-not-verified-text); }
.dashboard-message {
    padding: 10px; margin: 10px 0; border-radius: 6px; text-align: center;
}
.dashboard-message.success { background-color: var(--theme-dashboard-message-success-background); color: var(--theme-dashboard-message-success-text); }
.dashboard-message.error { background-color: var(--theme-dashboard-message-error-background); color: var(--theme-dashboard-message-error-text); }

/* Add styles for the dashboard header */
.dashboard-header {
    position: relative; /* Enable absolute positioning for logout */
    display: flex;
    justify-content: center; /* Center the title */
    align-items: center; /* Vertically aligns items */
    padding: 10px 0; /* Add some vertical padding */
    margin-bottom: 10px; /* Space below header */
}

.dashboard-header h1 {
    margin: 0; /* Remove default h1 margin */
    text-align: center; /* Center align the title */
}

.dashboard-header .header-theme-switcher {
    position: absolute; /* Position theme switcher button absolutely */
    left: 0; /* Align to the left */
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Perfect vertical centering */
}

.dashboard-header .header-logout {
    position: absolute; /* Position logout button absolutely */
    right: 0; /* Align to the right */
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Perfect vertical centering */
}

/* Adjust container if needed */
 .container { position: relative; /* Needed for absolute positioning of logout icon */ }

/* Add styles for the reset password form if needed, but existing form styles should mostly apply */
#reset-password-view { padding-top: 20px; } /* Adjust as needed */
#forgot-password-form { padding-top: 20px; }

/* Password visibility toggle styles */
.password-field-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-field-container input {
    width: 100%;
    flex: 1;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--theme-tertiary-text);
    font-size: 1.2em;
    z-index: 10;
    background: none !important; /* Force no background */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    width: 30px;
    flex-shrink: 0;
    outline: none !important; /* Force remove focus outline */
    -webkit-tap-highlight-color: transparent !important; /* Remove tap highlight on mobile */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    box-shadow: none !important; /* Remove any box shadow */
}

.password-toggle:hover {
    color: var(--theme-link-text);
    background: none !important;
}

.password-toggle:focus {
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

.password-toggle:active {
    background: none !important;
    box-shadow: none !important;
}

.password-toggle:focus-visible {
    outline: none !important;
    background: none !important;
}

/* Adjust input padding to accommodate the toggle icon */
.password-field-container input[type="password"],
.password-field-container input[type="text"] {
    padding-right: 35px;
    box-sizing: border-box;
    min-width: 0; /* Prevents the input from overflowing its container */
}

/* Profile Picture Styles */
.profile-picture-area {
    position: relative;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
}

.profile-pic {
    width: 150px; /* Size of the displayed pic */
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--theme-profile-picture-border);
    background-color: var(--theme-profile-picture-background); /* Background for default */
    display: block; /* Prevents extra space below */
    margin: 0 auto 10px auto; /* Center horizontally */
}

.profile-pic.default-icon {
    /* Use Font Awesome or an SVG background */
    font-family: "Font Awesome 6 Free"; /* Ensure Font Awesome is loaded */
    font-weight: 900;
    font-size: 80px; /* Adjust icon size */
    line-height: 150px; /* Center icon vertically */
    text-align: center;
    color: var(--theme-default-icon);
    content: '\f2bd'; /* Unicode for user-circle */
    background-color: var(--theme-default-icon-background);
    /* Important: Remove src if using content or background-image */
    /* The image element itself might hide if src is invalid, rely on CSS */
    /* This needs JS handling to toggle src attribute properly */
}

.profile-pic-actions {
    text-align: center;
}

.button-like {
    /* Style labels/buttons to look consistent */
    display: inline-block;
    background: var(--theme-primary-button);
    color: var(--theme-status-badge-text);
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0 5px;
}

.button-like:hover {
    background: var(--theme-primary-button-hover);
}

.button-like.danger {
    background-color: var(--theme-danger-button);
}
.button-like.danger:hover {
    background-color: var(--theme-danger-button-hover);
}

.button-like i {
    margin-right: 8px;
}

/* Cropper Modal Styles */
.modal {
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: var(--theme-modal-background); /* Black w/ opacity */
}

.modal-content {
    background-color: var(--theme-modal-content-background);
    margin: 10% auto; /* 10% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px; /* Maximum width */
    border-radius: 8px;
    text-align: center;
    position: relative;
}

/* Cropper container */
.img-container {
    width: 100%;
    max-height: 400px; /* Limit height */
    margin-bottom: 20px;
    background-color: var(--theme-modal-container-background);
    display: flex; /* Use flexbox */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.img-container img {
    display: block;
    /* Cropper.js will override this, but good default */
    max-width: 100%;
    max-height: 400px; /* Match container height */
}

.close-modal-button {
    color: var(--theme-close-modal-button);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-modal-button:hover,
.close-modal-button:focus {
    color: var(--theme-close-modal-button-hover);
    text-decoration: none;
    cursor: pointer;
}

/* Add Cropper.js CSS if not using CDN */
/* If using CDN, ensure it's included in index.php */

/* Document List Styles */
.documents-section label {
    display: block;
    margin-top: 20px;
    margin-bottom: 5px;
    font-weight: bold;
}

.documents-section small {
    display: block;
    font-size: 0.8em;
    color: var(--theme-tertiary-text);
    margin-bottom: 10px;
}

.document-item {
    border: 1px solid var(--theme-data-list-border);
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--theme-document-item-background);
    display: flex;
    flex-direction: column;
}

.document-details p {
    margin: 5px 0;
    word-wrap: break-word; /* Prevent long filenames/descriptions from breaking layout */
    color: var(--theme-primary-text);
}

.document-details p strong {
    color: var(--theme-secondary-text);
}

.document-actions {
    margin-top: 10px;
    text-align: right;
}

.document-actions .button-like, /* Target buttons and links styled as buttons */
.document-actions .download-doc-button {
    margin-left: 10px;
    font-size: 0.9em;
    padding: 6px 12px;
}

.document-actions .button-like i, /* Style icons inside buttons */
.document-actions .download-doc-button i {
    margin-right: 5px;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    color: #fff;
}

.status-in-review {
    background-color: var(--theme-status-in-review);
    color: var(--theme-status-in-review-text);
}

.status-approved {
    background-color: var(--theme-status-approved);
}

.status-denied {
    background-color: var(--theme-status-denied);
}

.denial-reason {
    font-size: 0.9em;
    color: var(--theme-status-denied);
    margin-top: 5px;
    border-left: 3px solid var(--theme-status-denied);
    padding-left: 8px;
}

#document-list {
    margin-top: 20px;
}

/* Added Styles for Structure */
html, body {
    height: 100%;
    overflow: hidden; /* Prevent double scrollbars on body */
}

.main-content {
    max-width: 100%; /* Allow full width */
    margin: 0 auto; /* Center content */
    background: var(--theme-container-background);
    padding: 20px;
    padding-bottom: 80px; /* Add padding to prevent overlap with bottom nav */
    height: 100%;
    overflow-y: auto; /* Enable scrolling for content */
    box-sizing: border-box;
}

/* Center auth view vertically */
#auth-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 120px); /* Full height minus padding */
}

/* .main-section { /*
    /* Style for the containers of Svazy, Kraje, Kluby, Profile */
    /* Initially hidden by JS, shown one at a time */
/* } */

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* Adjust height as needed */
    background-color: var(--theme-bottom-nav-background);
    border-top: 1px solid var(--theme-bottom-nav-border);
    display: none; /* Hidden by default when not logged in */
    justify-content: stretch; /* Stretch buttons to fill space equally */
    align-items: center;
    padding: 0; /* Remove padding for equal button widths */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1); /* Slight shadow */
    z-index: 1000;
    overflow-x: auto; /* Allow horizontal scrolling if needed */
}

/* Show bottom nav when user is logged in (dashboard is visible) */
body:has(#dashboard-view:not(.hidden)) .bottom-nav {
    display: flex;
}

.nav-button {
    background: none;
    border: none;
    color: var(--theme-nav-button-default);
    cursor: pointer;
    display: flex;
    flex-direction: column; /* Stack icon and text */
    align-items: center;
    justify-content: center;
    flex: 1; /* Equal width for all buttons */
    min-width: 60px; /* Minimum width for touch targets */
    height: 100%;
    padding: 5px 8px;
    font-size: 0.75rem; /* Smaller text */
    transition: color 0.2s, background-color 0.2s;
}

.nav-button i {
    font-size: 1.2rem; /* Icon size */
    margin-bottom: 4px;
}

.nav-button.active {
    background-color: var(--theme-nav-button-active);
    color: var(--theme-nav-button-active-text);
}

.nav-button.active i {
    color: var(--theme-nav-button-active-text);
}

.nav-button span {
    text-align: center;
    line-height: 1.1;
    white-space: nowrap;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .nav-button {
        padding: 4px 6px;
        min-width: 50px;
    }
    
    .nav-button span {
        font-size: 0.7em;
    }
    
    .nav-button i {
        font-size: 1.1em;
        margin-bottom: 2px;
    }
}

/* Hide auth-only buttons by default */
.nav-button.auth-only.hidden {
    display: none !important;
}

/* Add this rule to set the text color */
.nav-button.active span {
    color: var(--theme-nav-button-active-text);
}

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

.nav-button:hover i {
    color: var(--theme-nav-button-hover-text);
}

.nav-button:hover span {
    color: var(--theme-nav-button-hover-text);
}

/* General Data List Styling */
.data-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.data-list li {
    background-color: var(--theme-document-item-background);
    border: 1px solid var(--theme-data-list-border);
    padding: 6px 15px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    /* Ensure consistent height - adjust padding if needed */
    min-height: 25px; /* Example minimum height, adjust as necessary */
    display: flex; /* Use flexbox for vertical alignment */
    align-items: center; /* Vertically center content */
    color: var(--theme-primary-text);
}

.data-list li:hover {
    background-color: var(--theme-data-list-item-hover-background);
}

/* Style for logos within list items */
.list-item-logo {
    height: 30px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
    image-rendering: pixelated;
}

.logo-placeholder {
    display:inline-block;
    width: 28px;
    height: 30px;
    border: 1px solid var(--theme-data-list-border);
    text-align:center;
    line-height:30px;
    background: var(--theme-logo-placeholder-background);
    color: var(--theme-logo-placeholder-text);
}

/* Center loaders within their containers */
#svazy-loader, #kraje-loader, #kluby-loader, #svaz-kluby-loader {
    display: block;
    margin: 20px auto;
}

/* Profile section adjustments if needed */
#profile-section .container {
    max-width: 100%; /* Remove fixed width within profile section */
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

@media (max-width: 600px) {
    .main-content {
        padding: 10px;
        padding-bottom: 70px; /* Adjust for nav bar */
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }

    .bottom-nav {
        height: 55px;
    }

    .nav-button i {
        font-size: 1.3rem;
    }

    .nav-button span {
        font-size: 0.7rem;
    }
}

/* Profile Header Styles */
.profile-header {
    margin-bottom: 15px;
    margin-top: 0px; /* Remove top margin to eliminate extra space */
    display: flex;
    flex-direction: column; /* Vertical layout */
    align-items: center; /* Center all items horizontally */
    text-align: center;
}

/* Container for Email/DOB */
.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the box itself */
    width: 100%;
    margin-bottom: 15px;
}

.profile-info-box {
    padding: 12px 15px; /* Top/bottom: 12px, Left/right: 15px */
    background-color: var(--theme-profile-info-box-background);
    border: 1px solid var(--theme-profile-info-box-border);
    border-radius: 6px;
    width: fit-content; /* Box width fits content */
    max-width: 90%; /* Limit to 90% of container width */
    box-sizing: border-box;
}

.profile-info-box p {
    margin: 6px 0;
    padding: 0;
    font-size: 0.95em;
    color: var(--theme-profile-info-box-text);
    text-align: left; /* Left-align text inside box */
    word-break: break-word; /* Break long emails */
}

.profile-info-box p:first-child {
    margin-top: 0;
}

.profile-info-box p:last-child {
    margin-bottom: 0;
}

/* Warning message styling - shown inside profile-info-box when CUBU data not found */
.profile-cubu-warning {
    margin-top: 10px !important;
    padding: 0;
    font-size: 0.85em !important;
    color: var(--theme-error-text) !important;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.profile-cubu-warning::before {
    content: "\f071"; /* Font Awesome warning icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1em;
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-cubu-warning.hidden {
    display: none !important;
}

.profile-picture-area {
    position: relative;
    width: 250px;
    height: 250px;
    margin-bottom: 15px;
}

.profile-pic {
    width: 250px; /* Match container */
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--theme-profile-picture-border);
    background-color: var(--theme-profile-picture-background);
    display: block;
}

.profile-pic.default-icon {
    font-size: 50px; /* Adjust icon size */
    line-height: 100px; /* Center icon vertically */
    color: var(--theme-default-icon);
    background-color: var(--theme-default-icon-background);
    /* SVG content might be better handled via src attribute in HTML */
}

/* Profile Actions - Buttons for photo management */
.profile-actions {
    display: flex;
    flex-direction: row; /* Horizontal layout for buttons */
    align-items: center;
    justify-content: center;
    gap: 10px; /* Space between buttons */
    margin-bottom: 10px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.profile-actions .button-like {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin: 0; /* Remove default margin */
}

#profile-pic-loader {
    width: 20px;
    height: 20px;
    margin: 0 auto;
    display: block;
}

#profile-pic-message {
    font-size: 0.9em;
    text-align: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Cropper Modal Styles */
.modal {
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: var(--theme-modal-background); /* Black w/ opacity */
}

.modal-content {
    background-color: var(--theme-modal-content-background);
    margin: 10% auto; /* 10% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 600px; /* Maximum width */
    border-radius: 8px;
    text-align: center;
    position: relative;
}

/* Cropper container */
.img-container {
    width: 100%;
    max-height: 400px; /* Limit height */
    margin-bottom: 20px;
    background-color: var(--theme-modal-container-background);
    display: flex; /* Use flexbox */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.img-container img {
    display: block;
    /* Cropper.js will override this, but good default */
    max-width: 100%;
    max-height: 400px; /* Match container height */
}

.close-modal-button {
    color: var(--theme-close-modal-button);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-modal-button:hover,
.close-modal-button:focus {
    color: var(--theme-close-modal-button-hover);
    text-decoration: none;
    cursor: pointer;
}

/* Add Cropper.js CSS if not using CDN */
/* If using CDN, ensure it's included in index.php */

/* Dashboard Action Rows */
.dashboard-actions {
    margin-top: 10px;
}

.action-row {
    background-color: var(--theme-container-background);
    border: 1px solid var(--theme-action-row-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.action-row:hover {
    background-color: var(--theme-document-item-background);
    box-shadow: 0 1px 4px var(--theme-action-row-hover-shadow);
}

.action-row span {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--theme-profile-info-box-text);
}

.action-row .icon {
    margin-right: 12px;
    color: var(--theme-action-row-icon);
    width: 20px; /* Fixed width for alignment */
    text-align: center;
}

.action-row .arrow {
    color: var(--theme-action-row-arrow);
}

/* Verification Row Specifics */
.verification-row {
    flex-direction: column; /* Stack summary and details */
    align-items: stretch; /* Stretch items full width */
    cursor: default; /* Default cursor for outer row */
}

.verification-row.not-verified-row {
    cursor: pointer; /* Make clickable only if not verified */
}

.verification-status-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.verification-row.not-verified-row:hover .verification-status-summary {
    /* Optional: slight background change on hover for summary if row is clickable */
     background-color: var(--theme-verification-hover-background);
}

.verification-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--theme-verification-details-border);
}

.verification-row.verified-row .arrow {
    display: none; /* Hide arrow if verified */
}

.verification-row .verification-status-summary .icon.fa-check-circle {
    color: var(--theme-verification-icon-verified);
}

.verification-row .verification-status-summary .icon.fa-envelope {
    color: var(--theme-verification-icon-not-verified);
}

/* Klub Detail Styles */
/* #klub-detail-section { */
    /* Inherits main-section padding, etc.
/* } */

#klub-detail-content h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 15px;
}

#klub-detail-logo {
    display: block;
    max-width: 150px; /* Adjust size as needed */
    max-height: 100px;
    width: auto;
    height: auto;
    margin-bottom: 15px;
    background-color: var(--theme-container-background);
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    image-rendering: pixelated;
}

#klub-detail-address {
    margin-bottom: 15px;
    line-height: 1.4;
    border-left: 3px solid var(--theme-klub-detail-address-border);
    padding-left: 10px;
}

#klub-detail-address p {
    margin: 0;
    font-size: 0.95em;
    color: var(--theme-profile-info-box-text);
}

#klub-detail-content p {
    margin-bottom: 8px;
    font-size: 0.95em;
}

#klub-detail-content p strong {
    color: var(--theme-secondary-text);
}

#klub-detail-content a {
    color: var(--theme-link-text);
    text-decoration: none;
}

#klub-detail-content a:hover {
    text-decoration: underline;
}

#klub-detail-loader {
    display: block;
    margin: 20px auto;
}

/* Toast Notification Styles */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000; /* High z-index to appear above other content */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.toast {
    background-color: var(--theme-toast-default-background);
    color: var(--theme-toast-default-text);
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 250px; /* Minimum width */
    max-width: 400px; /* Maximum width */
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.toast.toast-fade-in {
    opacity: 1;
    transform: translateX(0);
}

.toast.toast-fade-out {
    opacity: 0;
    transform: translateX(100%);
}

.toast-message {
    flex-grow: 1;
    margin-right: 15px; /* Space between message and close button */
}

.toast-close-button {
    background: none;
    border: none;
    color: var(--theme-toast-default-text);
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    opacity: 0.7;
}

.toast-close-button:hover {
    opacity: 1;
}

/* Type-specific styles */
.toast-success {
    background-color: var(--theme-toast-success-background);
    color: var(--theme-toast-success-text);
}
.toast-success .toast-close-button {
    color: var(--theme-toast-success-text);
}

.toast-error {
    background-color: var(--theme-toast-error-background);
    color: var(--theme-toast-error-text);
}
.toast-error .toast-close-button {
    color: var(--theme-toast-error-text);
}

.toast-info {
    background-color: var(--theme-toast-info-background);
    color: var(--theme-toast-info-text);
}
.toast-info .toast-close-button {
    color: var(--theme-toast-info-text);
}

/* Profile Tabs Styles */
.profile-tabs-container {
    /* Container is styled via inline styles in HTML */
}

.tab-nav {
    display: flex;
    border-bottom: 2px solid var(--theme-tab-nav-border);
    margin-bottom: 20px;
    overflow-x: auto; /* Allow horizontal scrolling on small screens */
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--theme-tertiary-text);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: fit-content;
}

.tab-button:hover {
    color: var(--theme-link-text);
    background-color: var(--theme-tab-button-hover-background);
}

.tab-button.active {
    color: var(--theme-link-text);
    border-bottom-color: var(--theme-tab-button-active);
    font-weight: 500;
}

.tab-button i {
    font-size: 0.9em;
}

.tab-content {
    /* Container for all tab panels */
}

.tab-panel {
    display: none; /* Hidden by default */
}

.tab-panel.active {
    display: block; /* Show active panel */
}

.tab-panel-content {
    padding: 10px 0;
}

/* Responsive tab navigation */
@media (max-width: 600px) {
    .tab-button {
        font-size: 0.85rem;
        padding: 10px 15px;
    }
    
    .tab-nav {
        margin-bottom: 15px;
    }
}

/* Hide tabs container when user is not logged in */
.profile-tabs-container.hidden {
    display: none !important;
}