/*
 * Modernized Global Styling for Work Order System
 *
 * Enhanced with modern design principles, improved typography, 
 * contemporary color palette, and better visual hierarchy while
 * preserving all existing functionality.
 */

/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --danger-dark: #dc2626;
    --success-color: #22c55e;
    --success-dark: #16a34a;
    --warning-color: #f59e0b;
    --warning-dark: #d97706;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background-primary: #ffffff;
    --background-secondary: #f8fafc;
    --background-tertiary: #f1f5f9;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.2s ease-in-out;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
}

/* Container styling with modern card-like appearance */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Header row for welcome message and inline safety sign */
.header-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.header-row h1 {
    margin: 0;
    flex: 0 0 auto;
}

/* Digital Safety Sign */
.safety-sign {
    background: #000000;
    border: 8px solid #dc2626;
    border-radius: 12px;
    margin: 2rem 0;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3), 
                0 0 20px rgba(220, 38, 38, 0.2),
                inset 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Inline safety sign variant - smaller and compact */
.safety-sign-inline {
    margin: 0;
    margin-left: auto;
    padding: 0.75rem 1rem;
    border-width: 4px;
    border-radius: 8px;
    flex: 0 0 auto;
    min-width: 200px;
}

.safety-sign-inline .safety-sign-number {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: center;
    gap: 4px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 700;
}

.safety-sign-inline .safety-sign-number .digit {
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid #dc2626;
    border-radius: 4px;
    padding: 2px 8px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.8),
        0 0 8px rgba(220, 38, 38, 0.4);
}

.safety-sign-inline .safety-sign-text {
    font-size: 0.75rem;
    line-height: 1.1;
}

.safety-sign::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(220, 38, 38, 0.1) 50%, transparent 51%);
    pointer-events: none;
}

.safety-sign-content {
    position: relative;
    z-index: 2;
}

.safety-sign-number {
    font-family: 'Inter', 'Arial Black', sans-serif;
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 900;
    color: #dc2626;
    text-shadow: 
        0 0 10px #dc2626,
        0 0 20px #dc2626,
        0 0 30px #dc2626,
        2px 2px 0 #000,
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000;
    margin-bottom: 0.5rem;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

.safety-sign-text {
    font-family: 'Inter', 'Arial Black', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #dc2626;
    text-shadow: 
        0 0 5px #dc2626,
        0 0 10px #dc2626,
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .safety-sign {
        margin: 1.5rem 0;
        padding: 1.5rem;
        border-width: 6px;
    }
    
    .safety-sign-number {
        font-size: clamp(3rem, 12vw, 6rem);
    }
    
    .safety-sign-text {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
}

/* Modern navigation bar */
.navbar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Hamburger menu button - hidden by default, shown only on mobile */
.navbar-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

/* Hamburger animation when active */
.navbar-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.navbar-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Navigation links container */
.navbar-links {
    display: flex;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.navbar a {
    color: #fff;
    margin-right: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    text-decoration: none;
}

.navbar a:active {
    transform: translateY(0);
}

.navbar .nav-user {
    margin-left: auto;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.navbar .logout-link {
    margin-left: 1rem;
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: #fff;
    transition: var(--transition);
    font-weight: 500;
}

.navbar .logout-link:hover {
    background: linear-gradient(135deg, var(--danger-dark) 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Modern table styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

thead tr {
    background: linear-gradient(135deg, var(--background-tertiary) 0%, var(--border-light) 100%);
}

th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    white-space: nowrap;
}

td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
    vertical-align: top;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:nth-child(odd) {
    background-color: rgba(248, 250, 252, 0.5);
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Responsive table wrapper */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Filter controls styling */
.filter-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-light);
}

.filter-label:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.filter-label input[type="checkbox"] {
    margin: 0;
    transform: scale(1.1);
}

.filter-label span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Dashboard specific styling */
.hall-of-fame {
    display: flex;
    gap: 2rem;
    margin: 3rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.hof-card {
    flex: 1;
    max-width: 320px;
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    min-width: 280px;
    position: relative;
    overflow: hidden;
}

.hof-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.hof-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hof-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.375rem;
    font-weight: 700;
}

.hof-card.ansvarlig::before {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.hof-card.entreprenor::before {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
}

.hof-card p {
    margin: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.hof-card p strong {
    font-size: 1.25rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

/* Status cards enhancement */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.card {
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    color: #fff;
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card.planlagt {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.card.planlagt:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
}

.card.aktiv {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.card.aktiv:hover {
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.4);
}

.card.afsluttet {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    box-shadow: 0 10px 30px rgba(107, 114, 128, 0.3);
}

.card.afsluttet:hover {
    box-shadow: 0 20px 40px rgba(107, 114, 128, 0.4);
}

/* Charts enhancement */
.charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.chart-container {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.chart-container h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

/* Dashboard sections spacing */
.dashboard-section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.dashboard-section:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.dashboard-section h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.dashboard-section h3 {
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
}

/* Modern button system */
a.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.75rem; /* Larger padding for better touch targets */
    margin: 0.25rem 0.5rem 0.25rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem; /* Slightly larger for mobile readability */
    font-weight: 500;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-width: auto;
    min-height: 48px; /* Apple's recommended minimum touch target */
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    touch-action: manipulation;
}

/* Button hover effects */
a.button:hover,
button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

a.button:active,
button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Button variants */
a.button.button-danger,
button.button-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
}

a.button.button-danger:hover,
button.button-danger:hover {
    background: linear-gradient(135deg, var(--danger-dark) 0%, #b91c1c 100%);
}

a.button.button-secondary,
button.button-secondary {
    background: linear-gradient(135deg, var(--text-secondary) 0%, var(--text-primary) 100%);
}

a.button.button-success,
button.button-success {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
}

/* Buttons in table cells */
td a.button,
td button {
    margin: 0.125rem 0.25rem;
    padding: 0.5rem 0.75rem; /* Larger touch targets */
    vertical-align: middle;
    white-space: nowrap;
    font-size: 0.8rem;
}

/* Make approval buttons in table cells extra compact to match status icons */
td button.button-success.button-sm {
    padding: 2px 4px;
    font-size: 0.9rem;
    min-width: 24px;
    min-height: 24px;
    width: 24px;
    height: 24px;
    line-height: 1;
    vertical-align: middle;
    border-radius: 4px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
}

/* Button size variants */
.button-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.button-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Modern form styling */
form {
    background: var(--background-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

form > div {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

input[type="text"],
input[type="tel"],
input[type="date"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 1rem 1.25rem; /* Larger padding for better touch targets */
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem; /* Better readability on mobile */
    transition: var(--transition);
    background: var(--background-primary);
    color: var(--text-primary);
    font-family: inherit;
    cursor: text;
    min-height: 48px; /* Apple's recommended minimum touch target */
    -webkit-appearance: none; /* Remove iOS default styling */
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    touch-action: manipulation;
}

input[type="file"] {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    background: var(--background-primary);
    color: var(--text-primary);
    font-family: inherit;
    min-height: 48px; /* Apple's recommended minimum touch target */
    -webkit-appearance: none; /* Remove iOS default styling */
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    touch-action: manipulation;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus,
input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--background-primary);
}

/* Modern file input styling - Clean and centered */
.file-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.file-input {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none !important;
    z-index: -1;
    width: 0;
    height: 0;
}

.file-input-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--background-primary) 0%, var(--background-secondary) 100%);
    cursor: pointer;
    transition: var(--transition);
    min-height: 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.file-input-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: var(--transition);
}

.file-input-display:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(59, 130, 246, 0.05) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-style: solid;
}

.file-input-display:hover::before {
    left: 100%;
}

.file-input-display:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.file-input-wrapper:focus-within .file-input-display {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    border-style: solid;
}

.file-icon {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
    pointer-events: none;
}

.file-input-display:hover .file-icon {
    transform: scale(1.1);
    color: var(--primary-dark);
}

.file-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: none;
    user-select: none;
}

.file-text.has-file {
    color: var(--text-primary);
    font-weight: 600;
}

.file-text.has-file + .file-icon {
    color: var(--secondary-color);
}

/* Additional styling for when file is selected */
.file-input-display.has-file {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.1) 100%);
    border-color: var(--secondary-color);
    border-style: solid;
}

.file-input-display.has-file:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.15) 100%);
}

input[type="text"]:hover,
input[type="tel"]:hover,
input[type="date"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
    border-color: var(--primary-light);
}

textarea {
    min-height: 6rem;
    resize: vertical;
}

/* Checkbox and radio styling */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

/* Form groups */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

/* Ensure form elements are always interactive */
.form-group input,
.form-group textarea,
.form-group select {
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
}

.card .form-group input,
.card .form-group textarea,
.card .form-group select {
    pointer-events: auto !important;
    user-select: auto !important;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Special button styling for saving WOs */
button[name="save_wo"] {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: #fff;
    font-weight: 600;
}
button[name="save_wo"]:hover {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Modern parse log style */
#parseLog {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: var(--background-tertiary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    white-space: pre-wrap;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Field OK/missing indicators used during PDF parsing */
.field-ok {
    border: 2px solid green !important;
    background: #f6fff6 url('data:image/svg+xml;utf8,✔') no-repeat right 8px center;
    background-size: 14px;
}
.field-missing {
    border: 2px solid red !important;
    background: #fff6f6 url('data:image/svg+xml;utf8,✘') no-repeat right 8px center;
    background-size: 14px;
}

/* Modern status badge system */
.status-planlagt {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
}
.status-aktiv {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%) !important;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
}
.status-afsluttet {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--text-secondary) 0%, var(--text-primary) 100%) !important;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
}

/* Fix for status classes applied to select elements - ensure dropdown options are visible */
select.status-planlagt,
select.status-aktiv,
select.status-afsluttet {
    color: #ffffff !important;
    font-weight: 600;
}

select.status-planlagt option,
select.status-aktiv option,
select.status-afsluttet option {
    color: var(--text-primary) !important;
    background: var(--background-primary) !important;
    padding: 0.5rem !important;
    font-weight: normal !important;
    text-transform: none !important;
}

select.status-planlagt option:hover,
select.status-aktiv option:hover,
select.status-afsluttet option:hover {
    background: var(--primary-light) !important;
    color: #ffffff !important;
}

/* Indicate parse log states used when parsing PDFs */
.found {
    color: green;
}
.missing {
    color: red;
}

/* Kompakt WO tabel styling */
#arbejdstilladelseTable {
    font-size: 0.8rem;
}

#arbejdstilladelseTable th {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
}

#arbejdstilladelseTable td {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}

/* Godkendelser kolonne - mere kompakt */
#arbejdstilladelseTable th:nth-child(7) {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.2;
}

#arbejdstilladelseTable td:nth-child(7) {
    width: 110px;
    min-width: 110px;
    max-width: 110px;
    font-size: 0.7rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Add spacing between approval rows in table cell */
#arbejdstilladelseTable td:nth-child(7) > div {
    margin-bottom: 16px;
    line-height: 1.5;
    display: table;
    width: 100%;
    table-layout: fixed;
    border-spacing: 0;
}

#arbejdstilladelseTable td:nth-child(7) > div > * {
    display: table-cell;
    vertical-align: middle;
}

#arbejdstilladelseTable td:nth-child(7) > div:last-child {
    margin-bottom: 0;
}

#arbejdstilladelseTable td:nth-child(7) strong {
    font-size: 0.65rem;
    font-weight: 600;
    width: 38px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#arbejdstilladelseTable td:nth-child(7) .approval-status {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 20px;
    padding: 0;
    line-height: 1;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    background: none !important;
    border: none !important;
}

#arbejdstilladelseTable td:nth-child(7) button {
    display: table-cell;
}

/* Handlinger kolonne - uniforme knapper */
.col-actions .button,
.col-actions a.button,
.col-actions button.button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    padding: 2px 10px !important;
    font-size: 0.875rem !important;
    border-radius: 0.5rem !important;
    margin: 0.1rem !important;
    width: 88px !important;
    height: auto !important;
    min-height: 26px !important;
    box-sizing: border-box !important;
}

/* Ikoner må ikke skubbe højden */
.col-actions .button i { 
    margin: 0 2px; 
}

/* Responsive forbedringer */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 95%;
        padding: 1rem;
    }
    
    #arbejdstilladelseTable {
        font-size: 0.75rem;
    }
    
    #arbejdstilladelseTable th,
    #arbejdstilladelseTable td {
        padding: 0.3rem 0.4rem;
    }
}

@media screen and (max-width: 768px) {
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.75rem; /* Extend table to edge on mobile */
        border-radius: 0;
    }
    
    table {
        font-size: 0.85rem;
        border-radius: 0;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        min-width: 100px; /* Ensure readable column width */
    }
    
    th {
        font-size: 0.8rem;
        font-weight: 700;
        white-space: nowrap;
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, var(--background-tertiary) 0%, var(--border-light) 100%);
        z-index: 10;
    }
    
    /* Make action columns more compact on mobile */
    td:last-child,
    th:last-child {
        min-width: 120px;
        text-align: center;
    }
    
    /* Improve mobile table buttons */
    td a.button,
    td button {
        display: block;
        width: 100%;
        margin: 0.25rem 0;
        padding: 0.5rem;
        font-size: 0.75rem;
        white-space: nowrap;
        text-align: center;
    }
    
    /* Add zebra striping emphasis on mobile */
    tbody tr:nth-child(odd) {
        background-color: rgba(59, 130, 246, 0.03);
    }
    
    tbody tr:hover {
        background-color: rgba(59, 130, 246, 0.05);
        transform: none; /* Disable hover transform on mobile */
    }
    
    #arbejdstilladelseTable {
        min-width: 800px;
    }
}

/* When printing, hide the navigation bar so the printout is clean */
@media print {
    .navbar {
        display: none !important;
    }
}

/* Map container with modern styling */
#map {
    height: 500px;
    margin-bottom: 1.5rem;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.875rem;
    color: var(--text-primary);
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Card components */
.card {
    background: var(--background-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--background-tertiary) 0%, var(--border-light) 100%);
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--background-secondary);
    border-top: 1px solid var(--border-light);
}

/* Alert/message components */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: var(--secondary-color);
    color: var(--secondary-dark);
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-dark);
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-dark);
}

/* Loading states and animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Enhanced Responsive Design */

/* Large tablets and small desktops (992px and below) */
@media (max-width: 992px) {
    .charts {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .hall-of-fame {
        justify-content: center;
    }
    
    .dashboard {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Tablet and medium screens (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* Enhanced navbar for tablets */
    .navbar {
        padding: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .navbar a {
        margin-right: 0.5rem;
        margin-bottom: 0.5rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        white-space: normal;
        text-align: center;
        min-width: auto;
    }
    
    .navbar .nav-user {
        width: 100%;
        margin-left: 0;
        margin-top: 0.75rem;
        font-size: 0.875rem;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        text-align: center;
    }
    
    .navbar .logout-link {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    /* Enhanced dashboard for tablets */
    .dashboard {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.5rem;
        margin: 2rem 0;
    }
    
    .card {
        padding: 2rem 1.5rem;
        font-size: 1.1rem;
    }
    
    .hall-of-fame {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .hof-card {
        max-width: 400px;
        min-width: 300px;
    }
    
    /* Enhanced charts for tablets */
    .charts {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .chart-container {
        min-width: auto;
        padding: 1.5rem;
    }
    
    /* Enhanced tables for tablets */
    .table-wrapper {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    /* Override for Godkendelser column header - allow wrapping but keep words intact */
    #arbejdstilladelseTable th:nth-child(7) {
        white-space: normal !important;
        word-break: keep-all !important;
    }
    
    /* Override for Godkendelser column data - allow word breaking for long content */
    #arbejdstilladelseTable td:nth-child(7) {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }
    
    /* Enhanced filter controls */
    .filter-controls {
        margin: 0 -1rem 1.5rem -1rem;
        border-radius: 0;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .filter-label {
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    /* Enhanced forms */
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: auto;
        margin-bottom: 1rem;
    }
    
    /* Enhanced typography */
    h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    h2 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Enhanced buttons */
    .button-lg {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }
    
    a.button,
    button {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
        min-height: 44px; /* Touch-friendly */
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
        margin: 0;
        border-radius: 0;
    }
    
    /* Mobile typography improvements */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    /* Improve mobile button spacing */
    a.button,
    button {
        width: 100%;
        margin: 0.5rem 0;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Better mobile form experience */
    form {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    label {
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Mobile card improvements */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Mobile dashboard improvements */
    .dashboard {
        gap: 1rem;
    }
    
    .dashboard-section {
        margin: 1.5rem 0;
        padding: 1rem 0;
    }
    
    /* Mobile navigation - Show hamburger, hide desktop nav */
    .navbar-toggle {
        display: flex !important; /* Show hamburger menu on mobile */
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        z-index: 1001;
        background: rgba(30, 64, 175, 0.9);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        box-shadow: var(--shadow-md);
        min-height: 48px;
        min-width: 48px;
        align-items: center;
        justify-content: center;
    }
    
    .navbar {
        padding: 0.75rem;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        position: relative;
        min-height: 60px;
    }
    
    /* Hide navigation links by default on mobile */
    .navbar-links {
        display: none; /* Hidden by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        flex-direction: column;
        padding: 6rem 1rem 1rem 1rem;
        box-shadow: var(--shadow-xl);
        z-index: 1000;
        backdrop-filter: blur(20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Show navigation links when active with slide-in animation */
    .navbar-links.active {
        display: flex;
        animation: slideIn 0.3s ease-out forwards;
    }
    
    @keyframes slideIn {
        from {
            transform: translateX(-100%);
        }
        to {
            transform: translateX(0);
        }
    }
    
    .navbar-links a:not(.nav-user) {
        padding: 1rem 1.5rem;
        margin: 0.25rem 0;
        border-radius: var(--radius-md);
        font-size: 1rem;
        font-weight: 500;
        min-height: 56px; /* Better touch targets for iPhone */
        display: flex;
        align-items: center;
        justify-content: flex-start;
        transition: var(--transition);
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        text-decoration: none;
        color: #fff;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
        touch-action: manipulation;
    }
    
    .navbar-links a:not(.nav-user):hover,
    .navbar-links a:not(.nav-user):active {
        background: rgba(255, 255, 255, 0.25);
        transform: translateX(4px);
        box-shadow: var(--shadow-sm);
    }
    
    .navbar-links .nav-user {
        width: 100%;
        margin: 1rem 0;
        font-size: 0.9rem;
        font-weight: 400;
        padding: 1rem 1.5rem;
        text-align: center;
        border-top: 2px solid rgba(255, 255, 255, 0.2);
        border-bottom: 2px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        color: rgba(255, 255, 255, 0.9);
    }
    
    .navbar-links .logout-link {
        margin: 1rem 0 0.5rem 0;
        background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
        font-weight: 600;
        box-shadow: var(--shadow-sm);
    }
    
    .navbar-links .logout-link:hover {
        background: linear-gradient(135deg, var(--danger-dark) 0%, #b91c1c 100%);
        transform: translateX(4px) scale(1.02);
    }
    
    /* Mobile dashboard */
    .dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .card {
        padding: 2rem 1rem;
        font-size: 1rem;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .hall-of-fame {
        margin: 2rem 0;
        gap: 1rem;
    }
    
    .hof-card {
        min-width: auto;
        max-width: none;
        padding: 1.5rem;
    }
    
    /* Mobile charts */
    .charts {
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    .chart-container h2 {
        font-size: 1rem;
    }
    
    /* Mobile tables */
    .table-wrapper {
        margin: 0 -0.75rem;
        border-radius: 0;
        box-shadow: none;
        border: 1px solid var(--border-light);
    }
    
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    td a.button,
    td button {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
        margin: 0.125rem;
        min-height: 36px;
    }
    
    /* Mobile filter controls */
    .filter-controls {
        margin: 0 -0.75rem 1rem -0.75rem;
        border-radius: 0;
        padding: 0.75rem;
    }
    
    .filter-label {
        padding: 0.75rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Mobile forms */
    form {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
    }
    
    input[type="text"],
    input[type="tel"],
    input[type="date"],
    input[type="password"],
    textarea,
    select,
    input[type="file"] {
        padding: 1rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    label {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
    
    /* Mobile typography */
    h1 {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.375rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    h3 {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    /* Mobile buttons */
    .button-lg {
        padding: 1rem;
        font-size: 0.9rem;
        width: 100%;
        min-height: 48px;
    }
    
    a.button,
    button {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
        min-height: 44px;
        width: 100%;
        margin: 0.25rem 0;
    }
    
    /* Mobile alerts */
    .alert {
        padding: 1rem;
        margin: 1rem 0;
        border-radius: var(--radius-md);
        font-size: 0.875rem;
    }
    
    /* Mobile sections */
    .dashboard-section {
        margin: 2rem 0;
        padding: 1rem 0;
    }
    
    .dashboard-section h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    /* Map adjustments */
    #map {
        height: 250px;
        margin: 0 -0.75rem;
        border-radius: 0;
    }
    
    /* Mobile table scrolling hint */
    .table-wrapper::after {
        content: "Swipe for more →";
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: var(--text-secondary);
        padding: 0.5rem;
        background: var(--background-secondary);
        margin-top: -1px;
    }
    
    /* Mobile-specific touch optimizations */
    .card,
    .hof-card,
    .filter-label,
    a.button,
    button {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }
    
    /* Mobile status indicators optimization */
    .status-planlagt,
    .status-aktiv,
    .status-afsluttet {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        white-space: nowrap;
    }
}

/* Extra small mobile devices (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0.5rem;
    }
    
    .navbar {
        padding: 0.5rem;
    }
    
    .card {
        padding: 1.5rem 0.75rem;
        font-size: 0.9rem;
        min-height: 100px;
    }
    
    .hof-card {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .chart-container {
        padding: 0.75rem;
    }
    
    th, td {
        padding: 0.375rem 0.125rem;
        font-size: 0.7rem;
    }
    
    td a.button,
    td button {
        padding: 0.375rem 0.5rem;
        font-size: 0.65rem;
        min-height: 32px;
    }
}

/* Touch-friendly enhancements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
    a.button,
    button,
    .filter-label,
    .card,
    .hof-card {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    .hof-card:hover,
    .chart-container:hover,
    tbody tr:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    /* Add active states for touch feedback */
    .card:active,
    .hof-card:active,
    a.button:active,
    button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Print styles */
@media print {
    .navbar,
    .print-btn {
        display: none !important;
    }
    
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
    }
    
    table {
        border-collapse: collapse;
        width: 100%;
        box-shadow: none;
    }
    
    th, td {
        border: 1px solid #000;
        padding: 8pt;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    h1, h2, h3 {
        color: #000 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
}

/* Header section with view toggle */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-section h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
}

/* View toggle buttons */
.view-toggle {
    display: flex;
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.view-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.view-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.view-btn.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* Card view container - Clean and spacious layout */
.card-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); /* Larger minimum for better readability */
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
    align-items: start;
    padding: 1rem 0;
}

/* Ensure maximum 2 columns on larger screens */
@media (min-width: 769px) {
    .card-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Individual work permit card - Clean and readable design with better separation */
.work-permit-card {
    background: #ffffff;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    min-height: auto;
    display: flex;
    flex-direction: column;
    height: fit-content;
    margin-bottom: 1.5rem;
}

.work-permit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

/* Card header - Clear header with AT number and description */
.card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
    flex-shrink: 0;
}

.card-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.card-title-text {
    flex: 1;
}

.card-title h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card-header-description {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card-p-description {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.card-status {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* Horizontal divider between header and content */
.card-divider {
    margin: 0;
    border: none;
    border-top: 2px solid var(--border-light);
    opacity: 0.5;
}

/* Card content - Spacious and readable */
.card-content {
    padding: 1.5rem 2rem;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Add spacing between sections */
}

.card-description {
    margin-bottom: 0.375rem;
    flex-shrink: 0;
}

.card-description h4 {
    margin: 0 0 0.375rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-description p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.3;
    font-size: 0.75rem;
    word-wrap: break-word;
}

.p-description {
    background: var(--background-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--primary-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* Card details - Ultra compact */
.card-details {
    margin-bottom: 0.375rem;
    flex-shrink: 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: 0.25rem;
    font-size: 0.75rem;
}

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

.detail-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    min-width: 70px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: right;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card approvals section - Ultra compact */
.card-approvals {
    background: var(--background-secondary);
    border-radius: var(--radius-sm);
    padding: 0.375rem;
    margin-top: auto;
    flex-shrink: 0;
}

.card-approvals h4 {
    margin: 0 0 0.375rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.approval-grid {
    display: grid;
    gap: 0.25rem;
}

.approval-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.375rem;
    background: var(--background-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    gap: 0.25rem;
}

.approval-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.75rem;
    min-width: 50px;
    flex-shrink: 0;
}

.approval-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.375rem;
    border-radius: var(--radius-sm);
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.approval-status.approved {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.approval-status.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fbbf24;
}

/* Card actions - Clean and spacious */
.card-actions {
    padding: 1rem 2rem;
    background: var(--background-tertiary);
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 0;
}

.card-actions .button {
    margin: 0;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-width: auto;
    white-space: nowrap;
    border-radius: var(--radius-md);
}

/* Status indicators for cards */
.card-status.status-planlagt {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.card-status.status-aktiv {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.card-status.status-afsluttet {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Ultra compact approval buttons for card view */
.ajax-approve-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-width: auto;
    margin-top: 0.25rem;
}

.ajax-approve-btn:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.ajax-approve-btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

/* Hide P-description on compact cards to save space */
.card-view .p-description {
    display: none;
}

/* Enhanced responsive design for card view */
/* Large desktop: 3 columns (≥1024px) - default grid already set */

/* Tablet: 2 columns (<1024px) */
@media (max-width: 1023px) {
    .card-view {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on tablets */
        gap: 1.5rem;
    }
    
    /* Show P-description on tablets since there's space per card */
    .card-view .p-description {
        display: block;
    }
    
    /* Adjust card spacing for tablets */
    .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .card-content {
        padding: 1.25rem 1.5rem;
        gap: 1.25rem;
    }
    
    .card-actions {
        padding: 1rem 1.5rem;
    }
}

/* Small tablets and large phones */
@media (max-width: 768px) {
    .header-section {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .view-toggle {
        align-self: center;
        min-width: 280px;
    }
    
    .card-view {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on small tablets */
        gap: 1rem;
    }
    
    .work-permit-card {
        margin: 0 0 1rem 0;
    }
    
    .card-header {
        padding: 1rem 1.25rem;
    }
    
    .card-title h3 {
        font-size: 1.125rem;
    }
    
    .card-header-description {
        font-size: 0.875rem;
    }
    
    .card-content {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }
    
    .card-actions {
        padding: 0.75rem 1.25rem;
        gap: 0.5rem;
    }
    
    .card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-label {
        min-width: auto;
        font-size: 0.75rem;
    }
    
    .detail-value {
        text-align: left;
        font-size: 0.75rem;
    }
    
    .approval-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .approval-label {
        min-width: auto;
        font-size: 0.75rem;
    }
    
    .approval-status {
        text-align: center;
        font-size: 0.75rem;
    }
    
    .card-actions {
        justify-content: center;
        padding: 0.75rem 1rem;
    }
}

/* Very small screens: 1 column (<480px) */
@media (max-width: 480px) {
    .card-view {
        grid-template-columns: 1fr; /* 1 card per row on very small screens */
        gap: 1.5rem;
        margin: 0 -0.5rem;
        padding: 0.5rem;
    }
    
    .container {
        padding: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .work-permit-card {
        margin: 0 0 1rem 0;
        border-radius: var(--radius-md);
    }
    
    .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .card-title h3 {
        font-size: 1.1rem;
    }
    
    .card-header-description {
        font-size: 0.875rem;
    }
    
    .card-content {
        padding: 1.25rem 1.5rem;
        gap: 1.25rem;
    }
    
    .card-actions {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .card-actions .button {
        width: 100%;
        text-align: center;
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    .view-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Notification System Styles */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
    max-width: 400px;
    word-wrap: break-word;
}

.notification-show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95) 0%, rgba(22, 163, 74, 0.95) 100%);
    color: white;
    border-color: rgba(34, 197, 94, 0.3);
}

.notification-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    color: white;
    border-color: rgba(239, 68, 68, 0.3);
}

.notification-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
    color: white;
    border-color: rgba(245, 158, 11, 0.3);
}

.notification-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
    opacity: 0.8;
}

.notification-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive notifications */
@media (max-width: 768px) {
    .notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification-show {
        transform: translateY(0);
    }
}

/* Enhanced approval button styles */
.ajax-approve-btn {
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.ajax-approve-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.ajax-approve-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Time Tracking Styles */
.card-time-tracking {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.card-time-tracking h4 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
}

.time-entry-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.time-input-group {
    display: flex;
    flex-direction: column;
}

.time-input-group.full-width {
    grid-column: 1 / -1;
}

.time-input-group label {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #495057;
}

.time-date-input,
.time-hours-input,
.time-desc-input {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

.time-date-input:focus,
.time-hours-input:focus,
.time-desc-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.time-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.time-history {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.time-history h5 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1rem;
}

.time-summary {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #e9ecef;
    border-radius: 4px;
    text-align: center;
}

.time-entries-list {
    max-height: 300px;
    overflow-y: auto;
}

.time-entry-item {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    align-items: center;
}

.time-entry-date {
    font-weight: 600;
    color: #495057;
}

.time-entry-hours {
    color: #007bff;
    font-weight: 600;
}

.time-entry-user {
    color: #6c757d;
    font-size: 0.9rem;
}

.time-entry-desc {
    grid-column: 1 / -1;
    color: #6c757d;
    font-style: italic;
    margin-top: 0.25rem;
}

.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.error {
    color: #dc3545;
    font-weight: 600;
}

/* Responsive adjustments for time tracking */
@media (max-width: 768px) {
    .time-entry-form {
        grid-template-columns: 1fr;
    }
    
    .time-entry-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .time-entry-desc {
        grid-column: 1;
    }
    
    .time-actions {
        flex-direction: column;
    }
}

/* Dashboard Time Tracking Styles */
.time-overview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.time-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.time-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.time-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.time-card.total-hours {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.time-card.active-workers {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.time-card.projects-with-time {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.time-card-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.time-card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

.time-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.top-work-orders-by-hours,
.top-contractors-by-hours {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.top-work-orders-by-hours h3,
.top-contractors-by-hours h3 {
    margin: 0 0 1rem 0;
    color: #374151;
    font-size: 1.2rem;
}

.top-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.top-item:hover {
    background: #e2e8f0;
}

.top-item .medal {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.top-content {
    flex: 1;
}

.top-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.top-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.top-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.top-stats span {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.top-stats .hours {
    background: #dbeafe;
    color: #1e40af;
}

.top-stats .workers,
.top-stats .projects {
    background: #d1fae5;
    color: #065f46;
}

.top-stats .avg {
    background: #fef3c7;
    color: #92400e;
}

.no-time-data {
    text-align: center;
    padding: 3rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
}

.no-time-data p {
    color: #6b7280;
    font-size: 1.1rem;
    margin: 0;
}

/* Custom Modal Styles */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  margin: 1rem;
  text-align: center;
}

.modal-content p {
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-color);
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-yes {
  background: var(--success-color);
  color: white;
}

.btn-yes:hover {
  background: #27ae60;
  transform: translateY(-1px);
}

.btn-no {
  background: var(--danger-color);
  color: white;
}

.btn-no:hover {
  background: #c0392b;
  transform: translateY(-1px);
}

.btn-ok {
  background: var(--primary-color);
  color: white;
  min-width: 100px;
}

.btn-ok:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Responsive adjustments for dashboard time tracking */
@media (max-width: 768px) {
    .time-stats-cards {
        grid-template-columns: 1fr;
    }
    
    .time-overview {
        gap: 1rem;
    }
    
    .top-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .top-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .top-item .medal {
        align-self: center;
    }
}

/* ========================================
 * Custom Leaflet Map Markers with SJA Indicators
 * ======================================== */

/* Leaflet divIcon SJA indicators - using different approach */
/* Base marker styling for divIcon elements */
div.custom-marker-black {
    position: relative !important;
    width: 25px !important;
    height: 41px !important;
    background-size: 25px 41px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Green marker with SJA indicator */
div.marker-green-black {
    background-image: url('https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png') !important;
}

/* Blue marker with SJA indicator */  
div.marker-blue-black {
    background-image: url('https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-blue.png') !important;
}

/* Gray marker with SJA indicator */
div.marker-gray-black {
    background-image: url('https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-grey.png') !important;
}

/* Black circle SJA indicator - positioned as overlay */
div.custom-marker-black::before {
    content: '●' !important;
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    font-size: 12px !important;
    color: #000 !important;
    text-shadow: 0 0 2px #fff, 0 0 4px #fff !important;
    z-index: 1000 !important;
    display: block !important;
}