/* FlowerShop - Main Stylesheet */

/* ===== CSS Variables ===== */
:root {
    --border-radius: 5px;
    --border-radius-badge: 15px;
}

/* ===== Dynamic Design Colors with Gradients ===== */
/*
 * IMPORTANT: The following elements have DYNAMIC background gradients
 * that are set in /app/views/partials/public_layout_start.php based on
 * admin-configurable design settings from the database:
 *
 * - .navbar:not(.admin-top-navbar)       -> nav_background gradient
 * - .hero-section                        -> hero_background gradient
 * - footer.bg-dark                       -> footer_background gradient
 * - .hot-deals-section, .badge-hot       -> hot_deals_background gradient
 * - .new-arrivals-section, .badge-new    -> new_arrivals_background gradient
 *
 * Each gradient uses linear-gradient(135deg, baseColor 0%, lighterColor 100%)
 * The lighter color is automatically calculated at 15% lighter than base color.
 *
 * To modify these colors, use: Admin -> Settings -> Design
 */

/* ===== Public Navigation Bar ===== */
.navbar:not(.admin-top-navbar) {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar:not(.admin-top-navbar) .navbar-brand,
.navbar:not(.admin-top-navbar) .nav-link {
    color: #2c3e50 !important;
}

.navbar:not(.admin-top-navbar) .nav-link:hover {
    color: #1e3c72 !important;
}

.navbar:not(.admin-top-navbar) .nav-link.active {
    color: #2a5298 !important;
    font-weight: 600;
}

.navbar:not(.admin-top-navbar) .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar:not(.admin-top-navbar) .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar:not(.admin-top-navbar) .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== Admin Top Navigation Bar ===== */
.admin-top-navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
}

.admin-top-navbar .navbar-brand,
.admin-top-navbar .nav-link,
.admin-top-navbar .btn-link {
    color: white !important;
}

/* ===== Auth Pages (Login, Registration, Password Reset) ===== */
.auth-page {
    --hero-bg: #667eea; /* Default, overridden by inline style */
    background: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-card {
    max-width: 450px;
    margin: 2rem auto;
}

.auth-page .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-page .card-header {
    background: var(--hero-bg);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 2rem;
    text-align: center;
}

.auth-page .card-header h2 {
    margin: 0;
    font-weight: 600;
}

.auth-page .card-body {
    padding: 2rem;
}

.auth-page .form-label {
    font-weight: 500;
    color: #495057;
}

.auth-page .form-control:focus {
    border-color: var(--hero-bg);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.auth-page .btn-primary {
    background: var(--hero-bg);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: transform 0.2s;
}

.auth-page .btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.auth-page .alert {
    border-radius: var(--border-radius);
    border: none;
}

.auth-page .password-wrapper {
    position: relative;
}

.auth-page .password-toggle {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #6c757d;
    background: #f8f9fa;
    border-left: 1px solid #ced4da;
    border-radius: 0 0.375rem 0.375rem 0;
}

.auth-page .password-toggle:hover {
    color: #495057;
    background: #e9ecef;
}

.auth-page .links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-page .links a {
    color: var(--hero-bg);
    text-decoration: none;
    display: block;
    margin: 0.5rem 0;
}

.auth-page .links a:hover {
    text-decoration: underline;
}

/* Back link for auth pages */
.auth-page .back-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-page .back-link a {
    color: var(--hero-bg);
    text-decoration: none;
}

.auth-page .back-link a:hover {
    text-decoration: underline;
}

/* Success card for auth pages (password reset success, etc.) */
.auth-page .success-card {
    max-width: 550px;
    margin: 2rem auto;
}

.auth-page .success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.auth-page .success-icon.animate-envelope {
    animation: register-envelope 0.8s ease-in-out;
}

.auth-page .info-text {
    font-size: 1.1rem;
    color: #495057;
    margin: 1.5rem 0;
}

.auth-page .email-highlight {
    color: var(--hero-bg);
    font-weight: 600;
}

.auth-page .info-box {
    background: #e7f3ff;
    border-left: 4px solid var(--hero-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    text-align: left;
}

.auth-page .info-box ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.auth-page .info-box li {
    margin: 0.5rem 0;
    color: #495057;
}

/* Success header variant (green, for password reset success, etc.) */
.auth-page .card-header.success-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.auth-page .success-icon.animate-checkmark {
    animation: auth-checkmark 0.8s ease-in-out;
}

@keyframes auth-checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Password requirements validation list */
.auth-page .password-requirements {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-page .password-requirements ul {
    margin: 0.5rem 0 0 0;
    padding-left: 0;
    list-style: none;
}

.auth-page .password-requirements li {
    margin: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.auth-page .password-requirements li.valid {
    color: #28a745;
}

.auth-page .password-requirements li.invalid {
    color: #dc3545;
}

.auth-page .password-requirements li::before {
    position: absolute;
    left: 0;
    font-family: 'bootstrap-icons';
    font-weight: bold;
}

.auth-page .password-requirements li.valid::before {
    content: "\f26b";
    color: #28a745;
}

.auth-page .password-requirements li.invalid::before {
    content: "\f659";
    color: #dc3545;
}

/* ===== Register Pages ===== */
.register-page {
    --hero-bg: #667eea; /* Default, overridden by inline style */
    background: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.register-page.centered {
    justify-content: center;
    padding: 2rem 0;
}

.register-page .register-container {
    max-width: 550px;
    width: 100%;
    padding: 20px;
}

.register-page .register-card {
    max-width: 600px;
    margin: 2rem auto;
}

.register-page .register-card.wide {
    max-width: 700px;
}

.register-page .register-card-simple {
    background: white;
    border-radius: var(--border-radius);
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.register-page .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.register-page .card-header {
    background: var(--hero-bg);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 2rem;
    text-align: center;
}

.register-page .card-header h2 {
    margin: 0;
    font-weight: 600;
}

.register-page .card-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.register-page .card-body {
    padding: 2rem;
}

.register-page .card-body.text-center {
    text-align: center;
}

.register-page .form-label {
    font-weight: 500;
    color: #495057;
}

.register-page .form-floating {
    margin-bottom: 1rem;
}

.register-page .form-control:focus,
.register-page .form-select:focus {
    border-color: var(--hero-bg);
    box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1);
}

.register-page .btn-primary {
    background: var(--hero-bg);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: transform 0.2s;
}

.register-page .btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(0.9);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.register-page .alert {
    border-radius: var(--border-radius);
    border: none;
}

/* Brand logo section (simple register form) */
.register-page .brand-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.register-page .brand-logo i {
    font-size: 4rem;
    color: var(--hero-bg);
}

.register-page .brand-logo h2 {
    color: #343a40;
    margin-top: 1rem;
    font-weight: 600;
}

/* Step indicator */
.register-page .step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.register-page .step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 0.5rem;
    position: relative;
}

.register-page .step.active {
    background: var(--hero-bg);
    color: white;
}

.register-page .step.completed {
    background: #28a745;
    color: white;
}

.register-page .step:not(:last-child)::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: #e9ecef;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.register-page .step.completed:not(:last-child)::after {
    background: #28a745;
}

.register-page .step.pending {
    background: #e9ecef;
    color: #6c757d;
}

.register-page .step.pending::after {
    background: #e9ecef;
}

/* User info box */
.register-page .user-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.register-page .user-info strong {
    color: var(--hero-bg);
}

/* Section headers */
.register-page .section-header {
    font-weight: 600;
    color: var(--hero-bg);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

/* Form check inputs */
.register-page .form-check-input:checked {
    background-color: var(--hero-bg);
    border-color: var(--hero-bg);
}

/* Back link */
.register-page .back-link {
    text-align: center;
    margin-top: 1rem;
}

.register-page .back-link a {
    color: var(--hero-bg);
    text-decoration: none;
}

.register-page .back-link a:hover {
    text-decoration: underline;
}

/* Password strength indicator */
.register-page .password-strength {
    height: 5px;
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    transition: all 0.3s;
}

.register-page .strength-weak {
    background: #dc3545;
    width: 33%;
}

.register-page .strength-medium {
    background: #ffc107;
    width: 66%;
}

.register-page .strength-strong {
    background: #28a745;
    width: 100%;
}

/* Divider */
.register-page .divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.register-page .divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #dee2e6;
}

.register-page .divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: #6c757d;
}

/* Social login buttons */
.register-page .social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.register-page .social-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.register-page .social-btn:hover {
    border-color: var(--hero-bg);
    background: #f8f9fa;
}

/* Footer links */
.register-page .footer-links {
    text-align: center;
    margin-top: 1.5rem;
}

.register-page .footer-links a {
    color: var(--hero-bg);
    text-decoration: none;
}

.register-page .footer-links a:hover {
    text-decoration: underline;
}

/* Benefits box */
.register-page .benefits {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.register-page .benefits ul {
    margin: 0;
    padding-left: 1.5rem;
}

.register-page .benefits li {
    margin-bottom: 0.5rem;
}

/* Success pages */
.register-page .success-card {
    max-width: 550px;
    margin: 2rem auto;
}

.register-page .success-card.wide {
    max-width: 600px;
}

.register-page .success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.register-page .success-icon.large {
    font-size: 5rem;
}

@keyframes register-envelope {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes register-checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.register-page .success-icon.animate-envelope {
    animation: register-envelope 0.8s ease-in-out;
}

.register-page .success-icon.animate-checkmark {
    animation: register-checkmark 0.8s ease-in-out;
}

.register-page .info-text {
    font-size: 1.1rem;
    color: #495057;
    margin: 1.5rem 0;
}

.register-page .email-highlight {
    color: var(--hero-bg);
    font-weight: 600;
}

.register-page .info-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    text-align: left;
}

.register-page .info-box ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.register-page .info-box li {
    margin: 0.5rem 0;
    color: #495057;
}

.register-page .user-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
    text-align: left;
}

.register-page .user-details strong {
    color: var(--hero-bg);
}

/* ===== Main Content Area ===== */
.main-content {
    padding: 2rem;
}

/* Public pages - adjust padding for no sidebar */
.public-page .main-content {
    padding: 2rem 0;
}

/* ===== Admin Dashboard ===== */
.admin-sidebar {
    min-height: 100vh;
    background: #2c3e50;
    color: white;
    padding: 1.5rem 0;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.admin-sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #667eea;
    color: white;
}

.admin-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    margin-bottom: 2rem;
}

.admin-content {
    padding: 2rem;
}

/* Admin page h5 headings - visual segmentation */
/* Only apply to admin pages, not public pages */
body:has(.admin-sidebar) h5,
body:has(.admin-content) h5 {
    background: #b8b8b8;
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-weight: 600;
    color: #262626;
}

/* ===== Unified Stat Cards - Design 4: Colored Header ===== */
.stat-card, .stats-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: block;
}
/* Clickable stat cards (links or onclick handlers) */
.stat-card.clickable, .stats-card.clickable,
a.stat-card, a.stats-card {
    cursor: pointer;
}
.stat-card.clickable:hover, .stats-card.clickable:hover,
a.stat-card:hover, a.stats-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.stat-card .stat-header, .stats-card .stat-header {
    padding: 0.2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-card .stat-header .stat-icon, .stats-card .stat-header .stat-icon {
    font-size: 1.25rem;
    opacity: 0.85;
    color: inherit;
    order: 2;
}
.stat-card .stat-header .stat-label, .stats-card .stat-header .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 600;
    color: inherit;
}
.stat-card .stat-body, .stats-card .stat-body {
    padding: 1rem;
}
.stat-card .stat-body .stat-value, .stats-card .stat-body .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: #212529;
}
.stat-card .stat-body small, .stats-card .stat-body small {
    font-size: 0.75rem;
    color: #6c757d;
}
/* Header color variants */
.stat-card.primary .stat-header, .stats-card.primary .stat-header { background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); color: #fff; }
.stat-card.success .stat-header, .stats-card.success .stat-header { background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%); color: #fff; }
.stat-card.warning .stat-header, .stats-card.warning .stat-header { background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%); color: #212529; }
.stat-card.danger .stat-header, .stats-card.danger .stat-header { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); color: #fff; }
.stat-card.info .stat-header, .stats-card.info .stat-header { background: linear-gradient(135deg, #17a2b8 0%, #138496 100%); color: #fff; }
.stat-card.secondary .stat-header, .stats-card.secondary .stat-header { background: linear-gradient(135deg, #6c757d 0%, #545b62 100%); color: #fff; }
.stat-card.preorder .stat-header, .stats-card.preorder .stat-header { background: linear-gradient(135deg, #6f42c1 0%, #8b5cf6 100%); color: #fff; }
.bg-preorder { background: linear-gradient(135deg, #6f42c1 0%, #8b5cf6 100%) !important; }

/* Compact stat card for dual values */
.stat-card.stat-card-compact .stat-body {
    padding: 0.5rem 1rem;
}
.stat-card .stat-value-dual {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #212529;
}
.stat-card .stat-value-dual small {
    font-size: 0.7rem;
    color: #6c757d;
}

/* ===== Quick Action Cards ===== */
.action-card {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    overflow: hidden;
    height: 100%;
}
.action-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}
.action-card .action-icon {
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}
.action-card.primary .action-icon { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.action-card.success .action-icon { background: linear-gradient(135deg, #198754, #146c43); }
.action-card.warning .action-icon { background: linear-gradient(135deg, #ffc107, #e0a800); color: #212529; }
.action-card.info .action-icon { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }
.action-card.danger .action-icon { background: linear-gradient(135deg, #dc3545, #b02a37); }
.action-card.secondary .action-icon { background: linear-gradient(135deg, #6c757d, #565e64); }
.action-card.purple .action-icon { background: linear-gradient(135deg, #6f42c1, #59359a); }
.action-card.preorder .action-icon { background: linear-gradient(135deg, #6f42c1, #8b5cf6); }
.action-card.dark .action-icon { background: linear-gradient(135deg, #212529, #343a40); }
.action-card .action-text {
    flex: 1;
    padding: 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}
.action-card .action-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.action-card .action-content .action-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.action-card .action-content .action-desc {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

/* Action cards: icon-only on small screens */
@media (max-width: 767.98px) {
    .action-card {
        min-width: auto !important;
    }
    .action-card .action-text {
        display: none;
    }
    .action-card .action-icon {
        border-radius: var(--border-radius);
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* ===== Tables ===== */
.table-hover tbody tr {
    transition: background-color 0.2s;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.table-actions {
    white-space: nowrap;
    text-align: right;
}

.table-actions .btn {
    margin-right: 0.25rem;
}

/* Actions dropdown menu (3-dots menu) */
.actions-dropdown-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    position: relative;
}

.actions-dropdown {
    min-width: 200px;
    padding: 0.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    z-index: 1050;
}

/* Allow dropdown to overflow table-responsive container */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible !important;
}

/* Ensure dropdown appears above other elements */
.table-responsive .dropdown-menu.show {
    z-index: 1050;
}

.actions-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.actions-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.actions-dropdown .dropdown-item i {
    width: 1.25rem;
    text-align: center;
}

.actions-dropdown .dropdown-divider {
    margin: 0.25rem 0;
}

/* ===== Unified Data Table ===== */
.data-table-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.data-table {
    margin-bottom: 0;
}

.data-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    cursor: default;
}

.data-table th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.data-table th[data-sort]:hover {
    background-color: rgba(0,0,0,0.03);
}

.data-table td {
    vertical-align: middle;
}

.data-table .sort-icon {
    font-size: 0.7rem;
    opacity: 0.5;
    margin-left: 0.25rem;
}

.data-table th[data-sort]:hover .sort-icon {
    opacity: 1;
}

.data-table th.sort-asc .sort-icon::before {
    content: "\F282"; /* bi-chevron-up */
}

.data-table th.sort-desc .sort-icon::before {
    content: "\F286"; /* bi-chevron-down */
}

.data-table th.sort-asc .sort-icon,
.data-table th.sort-desc .sort-icon {
    opacity: 1;
    color: var(--bs-primary);
}

/* Signature thumbnail in data tables */
.signature-thumb {
    width: 80px;
    height: 40px;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: #fff;
}

.signature-thumb:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.gps-badge {
    background: #28a745;
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: var(--border-radius);
    font-size: 0.7rem;
}

/* ===== Drag & Drop / Sortable ===== */
.drag-handle {
    cursor: move;
    color: #adb5bd;
}

.drag-handle:hover {
    color: #6c757d;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: #e9ecef;
}

/* ===== Icon Picker ===== */
.icon-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.icon-picker-item {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-picker-item:hover,
.icon-picker-item.selected {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.icon-picker-item i {
    font-size: 1.25rem;
}

/* ===== Collapsible Group Cards ===== */
.group-card {
    margin-bottom: 1rem;
}

.group-card .card-header {
    cursor: pointer;
    background-color: #f8f9fa;
}

.group-card .card-header.collapsed {
    border-bottom: none;
}

.group-card .group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-card .group-actions {
    margin-left: auto;
}

.group-card.ungrouped .card-header {
    border-left: 3px solid #6c757d;
}

/* ===== Attribute Display ===== */
.attribute-icon {
    font-size: 1.25rem;
    width: 2rem;
    text-align: center;
}

.type-badge {
    font-size: 0.75rem;
    font-weight: normal;
}

.scope-indicator {
    font-size: 0.75rem;
}

/* ===== Badges ===== */
.badge-new {
    background: #28a745;
}

.badge-sale {
    background: #dc3545;
}

.badge-hot {
    background: #ff6b6b;
}

.badge-featured {
    background: #ffc107;
    color: #000;
}

.badge-low-stock {
    background: #fd7e14;
}

.badge-out-of-stock {
    background: #6c757d;
}

/* ===== Buttons ===== */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.required-field::after {
    content: ' *';
    color: #dc3545;
}

/* ===== Product Cards ===== */
.product-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-card .product-image {
    position: relative;
    overflow: hidden;
/*    padding-top: 100%; */
    background: #f8f9fa;
}

.product-card .product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

.product-card .product-info {
    padding: 1rem;
}

.product-card .product-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #667eea;
}

.product-card .product-price-old {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* ===== Shopping Cart ===== */
.cart-item {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
}

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

.cart-summary {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cart-summary .summary-total {
    font-size: 1.5rem;
    font-weight: bold;
    border-top: 2px solid #dee2e6;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* ===== Order Status Timeline ===== */
.order-timeline {
    position: relative;
    padding-left: 2rem;
}

.order-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.order-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.order-timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dee2e6;
    border: 3px solid white;
}

.order-timeline-item.active::before {
    background: #667eea;
}

.order-timeline-item.completed::before {
    background: #28a745;
}

/* ===== Loading Spinner ===== */
.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* ===== Alerts & Notifications ===== */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
    .admin-sidebar {
        display: none;
    }

    .auth-card {
        margin: 1rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

/* ===== Utility Classes ===== */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm-hover {
    transition: box-shadow 0.2s;
}

.shadow-sm-hover:hover {
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15) !important;
}

.cursor-pointer {
    cursor: pointer;
}

.overflow-hidden {
    overflow: hidden;
}

/* ===== Dashboard Charts ===== */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
}

/* ===== File Upload ===== */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background 0.2s;
}

.file-upload-label:hover {
    background: #764ba2;
}

/* ===== Image Preview (Admin Upload Areas) ===== */
.image-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-preview:hover {
    border-color: #2a5298;
    background-color: #f8f9fa;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--border-radius);
}

/* ===== Signature Pad ===== */
.signature-pad {
    border: 2px solid #dee2e6;
    border-radius: var(--border-radius);
    background: white;
    cursor: crosshair;
}

/* ===== Mobile Delivery Interface ===== */
.mobile-delivery-card {
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-delivery-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.delivery-stop {
    padding: 1rem;
    border-left: 4px solid #dee2e6;
    margin-bottom: 1rem;
    background: white;
    border-radius: var(--border-radius);
}

.delivery-stop.completed {
    border-left-color: #28a745;
    opacity: 0.7;
}

.delivery-stop.pending {
    border-left-color: #ffc107;
}

.settings-nav {
    border-right: 1px solid #dee2e6;
}
.settings-nav .nav-link {
    color: #495057 !important;
    padding: 1rem 1.5rem;
    border-left: 3px solid transparent;
}
.settings-nav .nav-link:hover {
    background: #f8f9fa;
    border-left-color: #2a5298;
}
.settings-nav .nav-link.active {
    background: #e9ecef;
    border-left-color: #2a5298;
    color: #2a5298;
    font-weight: 600;
}

/* ===== Membership Pages ===== */
/* Shared styles for all membership pages (tiers, benefits, requests) */
.membership-page body {
    background: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.membership-page .main-content {
    padding: 2rem;
}

.membership-page .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Tier badges */
.tier-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
}

/* Tier filter radio buttons (benefits page) */
.tier-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tier-radio {
    display: none;
}

.tier-radio-label {
    padding: 0.5rem 1.25rem;
    border: 2px solid #dee2e6;
    border-radius: var(--border-radius-badge);
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    font-weight: 500;
}

.tier-radio-label:hover {
    border-color: #0d6efd;
    background: #f8f9fa;
}

.tier-radio:checked + .tier-radio-label {
    border-color: #0d6efd;
    background: #0d6efd;
    color: white;
}

.tier-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

/* Request cards (requests page) */
.request-card {
    border-left: 5px solid;
    transition: all 0.3s;
}

.request-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.request-pending {
    border-left-color: #ffc107;
}

.request-approved {
    border-left-color: #28a745;
}

.request-rejected {
    border-left-color: #dc3545;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-badge);
    font-weight: bold;
}

/* Filter tabs (requests page) */
.filter-tabs .nav-link {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    color: #495057;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    margin-right: 0.25rem;
}

.filter-tabs .nav-link:hover {
    background: #dee2e6;
    color: #212529;
}

.filter-tabs .nav-link.active {
    background: white;
    border-bottom-color: white;
    color: #0d6efd;
    font-weight: 600;
}

/* Table hover effect for membership pages */
.membership-page .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* ===== Image Modal (80% Viewport) ===== */
.modal-image-80 .modal-dialog {
    width: 80vw;
    max-width: 80vw;
    height: 50vh;
    max-height: 50vh;
    margin: 10vh auto;
    top: 1rem;
}

.modal-image-80 .modal-content {
    height: 90%;
    display: flex;
    flex-direction: column;
}

.modal-image-80 .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-80 .modal-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===== Print Styles ===== */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}

/* Alapértelmezett beállítások (kis képernyőkön és md alatt) */
.gdpr-toast-sizing {
    width: 100% !important; /* Mobil nézetben mindig 100% */
    max-width: 80vw !important; /* Maximum a nézet 90%-át foglalja el */
}

/* Képernyőméret: Közepes (md) és afelett (768px +) */
@media (max-width: 768px) {
    .gdpr-toast-sizing {
        /* A fix szélesség beállítása (pl. 350px) */
        width: 450px !important;
    }
}

/* ===== Settings Pages Base Styles ===== */
.settings-page {
    background: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Settings Three-Panel Layout */
.settings-page .main-content {
    margin-left: 490px !important; /* 240px sidebar + 250px settings nav */
    width: calc(100% - 490px) !important;
    padding: 1.5rem;
}

.settings-secondary-nav {
    position: fixed;
    top: 0;
    left: 240px;
    width: 250px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    z-index: 1000;
    padding-top: 1rem;
    padding-bottom: 2rem;
    transition: left 0.3s ease;
}

.settings-secondary-nav .nav-header {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-secondary-nav .nav-link {
    display: block;
    padding: 0.4rem 1rem;
    color: #495057;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.settings-secondary-nav .nav-link:hover {
    background: #f8f9fa;
    color: #2a5298;
}

.settings-secondary-nav .nav-link.active {
    background: #e3f2fd;
    border-left-color: #0d6efd;
    color: #0d6efd;
    font-weight: 500;
}

.settings-secondary-nav .nav-link i {
    width: 20px;
    margin-right: 0.5rem;
}

.settings-secondary-nav .nav-divider {
    height: 1px;
    background: #dee2e6;
    margin: 0.5rem 1rem;
}

/* Settings Nav Toggle Button */
.settings-nav-toggle {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.settings-nav-toggle:hover {
    background: #e9ecef;
    color: #495057;
}

.settings-secondary-nav.collapsed .settings-nav-toggle i {
    transform: rotate(180deg);
}

/* Settings Secondary Nav Collapsed State */
.settings-secondary-nav.collapsed {
    width: 60px;
}

.settings-secondary-nav.collapsed .nav-header {
    padding: 0.3rem 0.5rem;
    justify-content: center;
}

/* Hide header text in collapsed mode */
.settings-secondary-nav.collapsed .nav-header {
    font-size: 0;
    color: transparent;
}

/* But keep toggle button visible */
.settings-secondary-nav.collapsed .settings-nav-toggle {
    font-size: 1rem;
    color: #6c757d;
}

.settings-secondary-nav.collapsed .nav-link {
    padding: 0.3rem 0.5rem;
    text-align: center;
    border-left: none;
    border-bottom: 2px solid transparent;
}

.settings-secondary-nav.collapsed .nav-link i {
    width: auto;
    margin-right: 0;
    font-size: 1.1rem;
}

.settings-secondary-nav.collapsed .nav-link span,
.settings-secondary-nav.collapsed .nav-link:not(i) {
    font-size: 0;
}

/* Hide text in collapsed mode - keep only icons */
.settings-secondary-nav.collapsed .nav-link {
    font-size: 0;
}

.settings-secondary-nav.collapsed .nav-link i {
    font-size: 1.1rem;
}

.settings-secondary-nav.collapsed .nav-link.active {
    background: #e3f2fd;
    border-left: none;
    border-radius: 4px;
    margin: 0 0.5rem;
}

/* Visual group separators in collapsed mode */
.settings-secondary-nav.collapsed .nav-divider {
    height: 2px;
    margin: 0.4rem 0.5rem;
    background: #adb5bd;
}

/* Responsive: Hide secondary nav on tablet/mobile */
@media (max-width: 991.98px) {
    .settings-secondary-nav {
        display: none;
    }
    .settings-page .main-content {
        margin-left: 0;
    }
}

/* When primary sidebar is collapsed */
.settings-secondary-nav.sidebar-collapsed {
    left: 70px;
}
.settings-page.sidebar-collapsed .main-content {
    margin-left: 320px !important; /* 70px + 250px */
    width: calc(100% - 320px) !important;
}

/* When secondary nav is collapsed */
.settings-page.settings-nav-collapsed .main-content {
    margin-left: 300px !important; /* 240px + 60px */
    width: calc(100% - 300px) !important;
}

/* When both primary sidebar AND secondary nav are collapsed */
.settings-page.sidebar-collapsed.settings-nav-collapsed .main-content {
    margin-left: 130px !important; /* 70px + 60px */
    width: calc(100% - 130px) !important;
}

.settings-page .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.settings-page .form-label {
    font-weight: 600;
    color: #495057;
}

.settings-page .help-text {
    font-size: 0.875rem;
    color: #6c757d;
}

.settings-page .settings-nav {
    border-right: 1px solid #dee2e6;
}

.settings-page .settings-nav .nav-link {
    color: #495057;
    padding: 1rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.settings-page .settings-nav .nav-link:hover {
    background: #f8f9fa;
    border-left-color: #2a5298;
}

.settings-page .settings-nav .nav-link.active {
    background: #e9ecef;
    border-left-color: #2a5298;
    color: #2a5298;
    font-weight: 600;
}

.settings-page .settings-nav .nav-link i {
    width: 20px;
    margin-right: 10px;
}

/* Settings page card headers - darker background */
.settings-page .card-header {
    background-color: #e2e6ea !important;
}

.settings-page .card-header h5,
.settings-page .card-header h6 {
    margin-bottom: 0;
}

.settings-page .color-preview {
    width: 50px;
    height: 38px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
}

.settings-page .preset-btn {
    margin-bottom: 0.5rem;
}

.settings-page .password-toggle {
    cursor: pointer;
}

/* Access Matrix Table Styles */
.settings-page .access-matrix-table {
    font-size: 0.875rem;
}

.settings-page .access-matrix-table th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.settings-page .access-matrix-table thead th:first-child {
    left: 0;
    z-index: 11;
}

.settings-page .access-matrix-table tbody th {
    position: sticky;
    left: 0;
    background: white;
    font-weight: 500;
    z-index: 9;
    white-space: nowrap;
}

.settings-page .access-matrix-table td {
    text-align: center;
    vertical-align: middle;
}

.settings-page .table-wrapper {
    max-height: 600px;
    overflow: auto;
}

.settings-page .role-header {
    writing-mode: horizontal-tb;
    min-width: 80px;
}

.settings-page .checkbox-cell input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.settings-page .select-all-col {
    cursor: pointer;
}

.settings-page .access-type-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.settings-page .access-type-switch .form-check {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.settings-page .access-type-switch .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    cursor: pointer;
    margin: 0;
}

.settings-page .access-type-switch small {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.settings-page .access-type-switch .text-readonly {
    color: #0dcaf0;
}

.settings-page .access-type-switch .text-write {
    color: #198754;
}

.settings-page .permission-cell {
    text-align: center;
    vertical-align: middle;
}

.settings-page .checkbox-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== External Integrations Page ===== */

/* Progress bar container */
.subscribers-progress {
    height: 24px;
    max-width: 350px;
}

.subscribers-progress-text {
    line-height: 24px;
    font-weight: 500;
    color: #333;
}

/* Modal table containers */
.modal-table-scroll {
    max-height: 350px;
    overflow-y: auto;
}

.modal-table-scroll-lg {
    max-height: 400px;
    overflow-y: auto;
}

/* Large icon in empty states */
.modal-icon-lg {
    font-size: 3rem;
}

/* Table checkbox column */
.col-checkbox {
    width: 40px;
}

/* Progress bar initial state */
.progress-bar-zero {
    width: 0%;
}

/* ===== Toast and Modal z-index ===== */
.toast-container-top {
    z-index: 99999;
}

.modal-high-z {
    z-index: 9999;
}

/* ===== Admin Navbar ===== */
.admin-top-navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1040;
}

.admin-top-navbar .container-fluid {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.admin-top-navbar .bi-list {
    font-size: 1.5rem;
}

.admin-top-navbar .navbar-brand,
.admin-top-navbar .nav-link {
    color: white !important;
}
/* ============================================ */
/* DELIVERY MAP STYLES                         */
/* ============================================ */

/* Map container */
.delivery-map-container {
    width: 100%;
    height: 400px;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.delivery-map-container.large {
    height: 500px;
}

.delivery-map-container.fullscreen {
    height: calc(100vh - 200px);
    min-height: 400px;
}

/* Numbered markers */
.delivery-marker-container {
    background: transparent;
}

.delivery-marker {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #0d6efd;
    position: relative;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.delivery-marker .marker-number {
    transform: rotate(45deg);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.delivery-marker.pending {
    background: #0d6efd;
}

.delivery-marker.in_progress {
    background: #fd7e14;
}

.delivery-marker.completed {
    background: #198754;
}

.delivery-marker.failed {
    background: #dc3545;
}

/* Driver location pulsing marker */
.driver-location-marker {
    background: transparent;
}

.driver-dot {
    width: 12px;
    height: 12px;
    background: #0d6efd;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.driver-pulse {
    width: 30px;
    height: 30px;
    background: rgba(13, 110, 253, 0.3);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: driver-pulse 2s ease-out infinite;
}

@keyframes driver-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Map legend */
.map-legend {
    background: white;
    padding: 10px 15px;
    border-radius: 0.375rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.map-legend-item:last-child {
    margin-bottom: 0;
}

.map-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.map-legend-dot.pending { background: #0d6efd; }
.map-legend-dot.completed { background: #198754; }
.map-legend-dot.failed { background: #dc3545; }
.map-legend-dot.driver { background: #fd7e14; }

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    border-radius: 0.375rem;
}

.leaflet-popup-content {
    margin: 10px 12px;
    font-size: 0.875rem;
}

/* Marker cluster custom styles */
.marker-cluster-custom {
    background: transparent;
}

.cluster-marker {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
}

.cluster-marker span {
    font-size: 14px;
    line-height: 1;
}

.cluster-marker .cluster-sequences {
    font-size: 9px;
    font-weight: normal;
    opacity: 0.9;
    line-height: 1;
    margin-top: 2px;
}

.cluster-marker.cluster-small {
    background: #0d6efd;
}

.cluster-marker.cluster-medium {
    background: #fd7e14;
}

.cluster-marker.cluster-large {
    background: #dc3545;
}


/* ===== Storage / Warehouse Management Styles ===== */

/* Scrap Report - smaller chart height for dashboard layout */
.scrap-report-page .chart-container {
    height: 250px;
}

/* Stock Transfers */
.storage-transfers-page .transfer-arrow {
    font-size: 1.2rem;
    color: #6c757d;
}

/* Storage Settings */
.storage-settings-page #reasonsTable .reason-slug {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.zip-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.zip-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.875rem;
    border-bottom: 1px solid #f0f0f0;
}

.zip-autocomplete-item:hover {
    background-color: #f8f9fa;
}

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

/* ===== Driver Dashboard Styles ===== */

/* Driver header */
.driver-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.driver-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Date sections */
.date-section {
    padding: 1rem;
}

.date-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    border-left: 4px solid #0d6efd;
}

.date-header.today {
    border-left-color: #198754;
}

.date-header.tomorrow {
    border-left-color: #fd7e14;
}

.date-header.past {
    border-left-color: #6c757d;
}

/* Route cards */
.route-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 5px solid #dee2e6;
    transition: all 0.2s;
}

.route-card:active {
    transform: scale(0.98);
}

.route-card.planned {
    border-left-color: #0d6efd;
}

.route-card.in_progress {
    border-left-color: #fd7e14;
}

.route-card.completed {
    border-left-color: #198754;
}

.route-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.5rem;
}

.route-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.route-progress {
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    margin: 0.75rem 0;
    overflow: hidden;
}

.route-progress-bar {
    height: 100%;
    background: #198754;
    border-radius: 3px;
    transition: width 0.3s;
}

/* Driver dashboard buttons */
.btn-start,
.btn-continue {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.route-actions {
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.route-actions .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* Empty state */
.driver-dashboard .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.driver-dashboard .empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.badge-status {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
}

/* Sysadmin driver grouping styles */
.driver-section {
    margin-bottom: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.driver-header-bar {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.driver-header-bar.own-routes {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-bottom-color: #b1dfbb;
}

.driver-header-bar h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.driver-route-count {
    background: #6c757d;
    color: white;
    border-radius: var(--border-radius);
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.driver-header-bar.own-routes .driver-route-count {
    background: #198754;
}

.driver-routes-content {
    padding: 0.5rem;
}

.route-card.readonly {
    opacity: 0.85;
}

/* Collapsible date header for past routes */
.date-header.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s;
}

.date-header.collapsible-header:hover {
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

.date-header.collapsible-header .collapse-icon {
    transition: transform 0.3s ease;
}

.date-header.collapsible-header[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

/* ===== Address Map Module ===== */
.address-map-icon {
    color: #6c757d;
    transition: color 0.2s;
    vertical-align: middle;
}

.address-map-icon:hover {
    color: #0d6efd;
}

#addressMapContainer {
    border-radius: 0;
}

#addressMapModal .modal-body {
    min-height: 200px;
}

/* ===== Admin Card Styles ===== */
.main-content .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* ===== Admin Form Styles ===== */
.main-content .form-label {
    font-weight: 600;
    color: #495057;
}

.main-content .help-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* ===== Dashboard Specific Styles ===== */
/* Activity timeline items */
.activity-item {
    padding: 1rem;
    border-left: 3px solid #dee2e6;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 0 5px 5px 0;
}

.activity-item.create { border-left-color: #28a745; }
.activity-item.update { border-left-color: #17a2b8; }
.activity-item.delete { border-left-color: #dc3545; }

/* Low stock list items */
.low-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

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

/* ===== Message Board Styles ===== */
.message-card {
    border-left: 5px solid;
    transition: all 0.3s;
    cursor: pointer;
}

.message-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.message-unread {
    border-left-color: #007bff;
    background: #f0f8ff;
}

.message-read {
    border-left-color: #6c757d;
}

.message-urgent {
    border-left-color: #dc3545;
}

.message-important {
    border-left-color: #ffc107;
}

.priority-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-badge);
    font-weight: bold;
    font-size: 0.85rem;
}

.message-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.message-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

.message-content {
    line-height: 1.8;
    white-space: pre-wrap;
}

.read-stats {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.target-roles .form-check {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.target-roles .form-check:hover {
    background: #f8f9fa;
}

/* ===== Report Styles ===== */
.chart-container {
    position: relative;
    height: 350px;
    margin: 1rem 0;
}

.export-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.growth-positive {
    color: #28a745;
}

.growth-negative {
    color: #dc3545;
}

.success-rate-high {
    color: #28a745;
}

.success-rate-medium {
    color: #ffc107;
}

.success-rate-low {
    color: #dc3545;
}

.order-row {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.3s;
}

.order-row:hover {
    background: #f8f9fa;
}

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

/* Customer segment badges */
.segment-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-badge);
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.segment-loyal { background: rgba(40, 167, 69, 0.8); }
.segment-regular { background: rgba(23, 162, 184, 0.8); }
.segment-occasional { background: rgba(255, 193, 7, 0.8); color: #333; }
.segment-onetime, .segment-one-time { background: rgba(220, 53, 69, 0.8); }
.segment-noorders { background: rgba(108, 117, 125, 0.8); }

/* ===== Invoice Styles ===== */
.invoice-card {
    border-left: 5px solid;
    transition: all 0.3s;
    position: relative;
}

.invoice-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.invoice-pending { border-left-color: #ffc107; }
.invoice-generated { border-left-color: #28a745; }
.invoice-not-required { border-left-color: #6c757d; }
.invoice-stornoed { border-left-color: #dc3545; }
.invoice-manually-invoiced { border-left-color: #17a2b8; }

.invoice-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--border-radius);
}

.invoice-card-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.invoice-card-overlay .progress {
    width: 80%;
    height: 8px;
    margin-top: 1rem;
}

/* ===== Inventory Styles ===== */
.stock-value {
    font-weight: 600;
    text-align: right;
}

.calculated-stock {
    width: 120px;
    text-align: right;
}

.has-reserved td {
    background-color: #fff3cd !important;
}

.has-reserved:hover td {
    background-color: #ffe69c !important;
}

.zero-stock td {
    color: #6c757d;
}

.separator-row td {
    background-color: #e9ecef !important;
    padding: 8px !important;
    font-weight: 600;
    color: #495057;
    border-top: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
}

/* Stock status badges */
.stock-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 600;
}

.stock-high { background: #d4edda; color: #155724; }
.stock-low { background: #fff3cd; color: #856404; }
.stock-out { background: #f8d7da; color: #721c24; }

/* ===== Product Styles ===== */
.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.filter-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.image-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-preview:hover {
    border-color: #2a5298;
    background-color: #f8f9fa;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--border-radius);
}

/* Low stock indicators */
.stock-critical {
    background-color: #fee;
}

.stock-warning {
    background-color: #fff3cd;
}

.alert-banner {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}
