/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
        "Ubuntu", "Cantarell", sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
}

.logo-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    transform: translateY(2px);
}

.logo-text {
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--background);
    color: var(--text-primary);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    overflow: hidden;
    z-index: 101;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
    font-size: 0.875rem;
}

.nav-dropdown-content a:hover {
    background: var(--background);
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.user-button:hover {
    background: var(--surface);
    box-shadow: var(--shadow);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--background);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.25rem 0;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.webhook-limit {
    padding: 0.5rem 1rem;
    background: var(--background);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background);
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.login-box .logo {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
}

.login-box .logo h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.login-box .logo p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Email Verification Banner */
.email-verification-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #f59e0b;
}

.email-verification-banner a {
    color: #92400e;
    font-weight: 600;
    text-decoration: underline;
}

.email-verification-banner a:hover {
    color: #78350f;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    height: 42px;
    box-sizing: border-box;
}

.form-group textarea {
    height: auto;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Auth Page Container (for logged-in pages like resend verification) */
.auth-page-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-box {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-box h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.verification-info {
    background: var(--background);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.verification-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

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

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dashboard-header h1 {
    font-size: 1.5rem;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
}

.filters-panel {
    background: linear-gradient(135deg, var(--surface) 0%, #f0f4ff 100%);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    box-shadow:
        var(--shadow),
        0 0 0 1px rgba(59, 130, 246, 0.08);
    border: none;
}

.filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    margin-bottom: 0;
}

.filter-group > label:first-child {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    min-width: 150px;
    transition: all 0.15s ease;
}

.filter-group select:hover,
.filter-group input[type="text"]:hover {
    border-color: #cbd5e1;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.filter-group select[multiple] {
    height: auto;
    min-height: 88px;
    max-height: 88px;
    padding: 0.375rem;
    scrollbar-width: thin;
}

.filter-group select[multiple]::-webkit-scrollbar {
    width: 6px;
}

.filter-group select[multiple]::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.filter-group select[multiple] option {
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-bottom: 1px;
}

.filter-group select[multiple] option:checked {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
}

.filter-group small {
    display: none;
}

.filter-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: all 0.15s ease;
    user-select: none;
}

.filter-group .checkbox-label:hover {
    border-color: var(--primary-color);
    background: #f8faff;
}

.filter-group .checkbox-label:has(input:checked) {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #f0f4ff 100%);
    color: var(--primary-color);
}

.filter-group .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.filter-group textarea {
    height: auto;
    min-height: 80px;
    max-height: 80px;
    font-family: monospace;
    font-size: 0.75rem;
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
    min-width: 120px;
    transition: all 0.15s ease;
}

.filter-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    align-self: flex-end;
}

.filter-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

.filter-actions .btn-primary {
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.filter-actions .btn-primary:hover {
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

/* Capcode Search Autocomplete */
.filter-group-capcode {
    min-width: 280px;
}

.capcode-search-container {
    position: relative;
}

.capcode-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.capcode-search-results.show {
    display: block;
}

.capcode-search-result {
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.capcode-search-result:last-child {
    border-bottom: none;
}

.capcode-search-result:hover {
    background: var(--background);
}

.capcode-search-result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.capcode-search-result-icon {
    font-size: 1rem;
}

.capcode-search-result-desc {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-primary);
}

.capcode-search-result-meta {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 1.5rem;
}

.capcode-search-result-code {
    font-family: monospace;
    background: var(--background);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
}

.capcode-search-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.capcode-search-loading {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* Selected Capcodes Chips */
.selected-capcodes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.selected-capcodes:empty {
    display: none;
}

.capcode-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #6366f1 100%);
    color: white;
    border-radius: 100px;
    font-size: 0.6875rem;
    font-weight: 500;
}

.capcode-chip-icon {
    font-size: 0.75rem;
}

.capcode-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.625rem;
    transition: background 0.15s;
}

.capcode-chip-remove:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Messages */
.messages-stats {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-box {
    background: var(--surface);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.messages-container {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.message-card {
    background: var(--surface);
    border-radius: 0.375rem;
    padding: 0.5rem 0.625rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.message-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* Discipline-specific left borders */
.message-card.discipline-brandweer {
    border-left-color: #dc2626;
}

.message-card.discipline-politie {
    border-left-color: #2563eb;
}

.message-card.discipline-ambulance {
    border-left-color: #f59e0b;
}

.message-card.discipline-lifeliner {
    border-left-color: #7c3aed;
}

.message-card.discipline-multi {
    border-left-color: #6b7280;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.25rem;
}

.discipline-icons {
    display: flex;
    gap: 0.125rem;
}

.discipline-icon {
    font-size: 0.875rem;
    line-height: 1;
}

.message-time {
    color: var(--text-secondary);
    font-size: 0.6875rem;
    white-space: nowrap;
    font-family: monospace;
}

.message-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin-left: auto;
}

.message-info-link,
.message-incident-link {
    text-decoration: none;
    font-size: 0.75rem;
    opacity: 0.4;
    transition: opacity 0.2s;
    line-height: 1;
}

.message-info-link:hover,
.message-incident-link:hover {
    opacity: 1;
}

.receiver-warning {
    font-size: 0.75rem;
    cursor: help;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.receiver-warning:hover {
    opacity: 1;
}

.message-text {
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.message-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.message-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    background: var(--background);
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.message-tag.tag-brandweer {
    background: #fee2e2;
    color: #991b1b;
}

.message-tag.tag-politie {
    background: #dbeafe;
    color: #1e40af;
}

.message-tag.tag-ambulance {
    background: #fef3c7;
    color: #92400e;
}

.message-tag.tag-lifeliner {
    background: #e0e7ff;
    color: #3730a3;
}

/* Old capcode detail fallback (hidden, use tags instead) */
.message-details {
    display: none;
}

.capcode-detail {
    display: none;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.no-messages {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    background: var(--surface);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.no-messages-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-messages-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-messages-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* Message Groups */
.message-group {
    background: var(--surface);
    border-radius: 0.375rem;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary-color);
    opacity: 1;
    transform: translateY(0);
}

.group-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5rem;
    background: rgba(59, 130, 246, 0.05);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
}

.group-header:hover {
    background: rgba(59, 130, 246, 0.1);
}

.group-toggle {
    font-size: 0.625rem;
    color: var(--primary-color);
    font-weight: bold;
    transition: transform 0.2s;
}

.group-title {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.group-count {
    margin-left: auto;
    font-size: 0.6875rem;
    color: var(--text-secondary);
    background: var(--background);
    padding: 0.125rem 0.375rem;
    border-radius: 1rem;
}

.grouped-messages {
    display: flex;
    flex-direction: column;
}

.grouped-message {
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.grouped-message.show {
    opacity: 1;
    transform: translateY(0);
}

.grouped-message:last-child {
    border-bottom: none;
}

/* Grouped message row layout */
.grouped-message-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.grouped-message-row .discipline-icons {
    display: flex;
    gap: 0.125rem;
}

.grouped-message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.grouped-message-links {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.grouped-message-links a {
    font-size: 0.75rem;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.grouped-message-links a:hover {
    opacity: 1;
}

.grouped-message-text {
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.grouped-message-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.grouped-message-tags .message-tag {
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
}

/* Webhooks */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.webhooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.webhook-card {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

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

.webhook-card.inactive {
    opacity: 0.6;
}

.webhook-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.webhook-header h3 {
    font-size: 1.125rem;
}

.webhook-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.webhook-url {
    background: var(--background);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.webhook-url code {
    font-size: 0.75rem;
    word-break: break-all;
    color: var(--text-secondary);
}

.webhook-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 0.5rem;
}

.webhook-stats .stat {
    text-align: center;
}

.webhook-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.webhook-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.webhook-filters {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 0.5rem;
}

.webhook-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.webhook-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Form Card */
.form-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.form-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-section h3 {
    margin-bottom: 0.5rem;
}

.form-help {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.filter-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.filter-fields {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.filter-fields select,
.filter-fields input {
    flex: 1;
}

.filter-value-container {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.info-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.info-card h3 {
    margin-bottom: 1rem;
}

.info-card pre {
    background: var(--background);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-size: 0.75rem;
}

/* Logs */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card.success {
    border-left: 4px solid var(--success-color);
}

.stat-card.error {
    border-left: 4px solid var(--error-color);
}

/* Priority Statistics */
.priority-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.priority-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    border-left: 4px solid;
}

.priority-card.priority-1 {
    border-color: #ef4444;
    background: linear-gradient(
        135deg,
        rgba(239, 68, 68, 0.1) 0%,
        var(--surface) 100%
    );
}

.priority-card.priority-2 {
    border-color: #f97316;
    background: linear-gradient(
        135deg,
        rgba(249, 115, 22, 0.1) 0%,
        var(--surface) 100%
    );
}

.priority-card.priority-3 {
    border-color: #eab308;
    background: linear-gradient(
        135deg,
        rgba(234, 179, 8, 0.1) 0%,
        var(--surface) 100%
    );
}

.priority-card.priority-4 {
    border-color: #22c55e;
    background: linear-gradient(
        135deg,
        rgba(34, 197, 94, 0.1) 0%,
        var(--surface) 100%
    );
}

.priority-card.priority-unknown {
    border-color: #9ca3af;
    background: linear-gradient(
        135deg,
        rgba(156, 163, 175, 0.1) 0%,
        var(--surface) 100%
    );
}

.priority-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.priority-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.priority-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

@media (max-width: 768px) {
    .priority-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .priority-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .priority-card:last-child {
        grid-column: span 2;
    }
}

.priority-chart-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

.logs-table-container {
    background: var(--surface);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table thead {
    background: var(--background);
}

.logs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.logs-table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.logs-table tr.log-success {
    background: rgba(16, 185, 129, 0.05);
}

.logs-table tr.log-error {
    background: rgba(239, 68, 68, 0.05);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.log-message {
    font-family: monospace;
    font-size: 0.8125rem;
}

.status-code {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-2xx {
    background: #d1fae5;
    color: #065f46;
}

.status-4xx,
.status-5xx {
    background: #fee2e2;
    color: #991b1b;
}

.log-details-row {
    background: var(--background) !important;
}

.log-details {
    padding: 1rem;
}

.detail-section {
    margin-bottom: 1rem;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section strong {
    display: block;
    margin-bottom: 0.5rem;
}

.detail-section pre {
    background: var(--surface);
    padding: 0.75rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-size: 0.75rem;
}

.detail-section.error pre {
    background: #fee2e2;
    color: #991b1b;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.page-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Statistics */
.data-range-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 1px solid #7dd3fc;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-range-info::before {
    content: "ℹ️";
    font-size: 1rem;
}

.data-range-info strong {
    color: #0c4a6e;
}

.filters-card {
    background: linear-gradient(135deg, var(--surface) 0%, #f8fafc 100%);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: visible;
}

.filters-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        #8b5cf6,
        var(--primary-color)
    );
    background-size: 200% 100%;
}

.stats-filters .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.stats-filters .filter-row .form-group {
    flex: 1;
    min-width: 150px;
}

.stats-filters .filter-row .form-group:last-child {
    flex: 0 0 auto;
}

.chart-container {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.chart-container h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.chart-container canvas {
    height: 300px !important;
}

.top-capcodes {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.top-capcodes h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.capcodes-table-container {
    overflow-x: auto;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
}

.styled-table thead {
    background: var(--background);
}

.styled-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
}

.styled-table td {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.discipline-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.discipline-brandweer {
    background: #fee2e2;
    color: #991b1b;
}

.discipline-politie {
    background: #dbeafe;
    color: #1e40af;
}

.discipline-ambulance {
    background: #fef3c7;
    color: #92400e;
}

.discipline-lifeliner {
    background: #e0e7ff;
    color: #3730a3;
}

.text-muted {
    color: var(--text-secondary);
}

/* Detail Pages - Shared Styles */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.back-link:hover {
    color: var(--primary-color);
}

.error-msg {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Section Component */
.section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.section-hdr {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    user-select: none;
}

.section-hdr:hover {
    background: var(--border-color);
}

.section-hdr .cnt {
    background: var(--primary-color);
    color: white;
    padding: 0.0625rem 0.375rem;
    border-radius: 1rem;
    font-size: 0.6875rem;
    margin-left: auto;
}

.section-body {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.section-body.collapsed {
    display: none;
}

/* Incident Header */
.incident-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.incident-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.incident-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    opacity: 0.9;
}

.incident-disciplines {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.incident-disciplines .disc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
}

/* Message Hero (detail page) */
.msg-hero {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.msg-hero-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.msg-hero .disc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.msg-id {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.incident-link {
    font-size: 0.75rem;
    background: #3b82f6;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    text-decoration: none;
    margin-left: 0.5rem;
}

.incident-link:hover {
    background: #2563eb;
}

.msg-content {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.msg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Message Timeline */
.msg-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.msg-item {
    position: relative;
    padding: 0.5rem 0.75rem;
    background: var(--background);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid transparent;
}

/* Timeline dots disabled - use colored left border instead */

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

.msg-item.discipline-brandweer {
    border-left-color: #dc2626;
}

.msg-item.discipline-politie {
    border-left-color: #2563eb;
}

.msg-item.discipline-ambulance {
    border-left-color: #f59e0b;
}

.msg-item.discipline-lifeliner {
    border-left-color: #7c3aed;
}

.msg-time {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.msg-text {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
}

.msg-link {
    font-size: 0.6875rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.5rem;
}

.msg-link:hover {
    text-decoration: underline;
}

/* Discipline Groups */
.disc-grp {
    margin-bottom: 0.75rem;
}

.disc-grp:last-child {
    margin-bottom: 0;
}

.disc-grp-hdr {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.375rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--border-color);
}

/* Capcode Grid */
.cap-grid {
    display: grid;
    gap: 0.375rem;
}

.cap-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: var(--background);
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.cap-code {
    font-family: monospace;
    font-weight: 600;
    background: var(--surface);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border-color);
    font-size: 0.6875rem;
}

.cap-info {
    flex: 1;
}

.cap-desc {
    font-weight: 500;
}

.cap-station {
    color: var(--text-secondary);
    font-size: 0.6875rem;
}

/* Vehicle Grid */
.veh-grid {
    display: grid;
    gap: 0.375rem;
}

.veh-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: var(--background);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.veh-id {
    font-family: monospace;
    font-weight: 600;
    background: #dc2626;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
}

.veh-type {
    font-weight: 500;
}

.veh-desc {
    color: var(--text-secondary);
    font-size: 0.6875rem;
    flex: 1;
}

.veh-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.veh-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
}

/* INSTR Grid */
.instr-grid {
    display: grid;
    gap: 0.25rem;
}

.instr-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--background);
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.instr-time {
    font-family: monospace;
    color: var(--text-secondary);
    font-size: 0.6875rem;
}

.instr-cap {
    font-family: monospace;
    font-weight: 600;
    font-size: 0.6875rem;
}

.instr-det {
    flex: 1;
    color: var(--text-secondary);
}

/* Receiver Grid */
.recv-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.recv-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--background);
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.recv-item.ok {
    background: #dcfce7;
    color: #166534;
}

.recv-item.miss {
    background: #fee2e2;
    color: #991b1b;
}

/* Raw Data Block */
.raw-data {
    font-family: monospace;
    font-size: 0.6875rem;
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.5rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 150px;
    overflow-y: auto;
}

/* Group Detail Page */
.group-info {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.group-info h1 {
    margin: 0 0 0.5rem 0;
}

.group-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.period-selector {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.period-selector label {
    font-weight: 500;
}

.period-selector select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    min-width: 200px;
}

.total-stat {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.capcode-section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.capcode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--background);
    cursor: pointer;
    user-select: none;
}

.capcode-header:hover {
    background: var(--border-color);
}

.capcode-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.capcode-info code {
    background: var(--surface);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.capcode-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.capcode-station {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.capcode-count {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.capcode-count.zero {
    background: var(--secondary-color);
}

.count-badge {
    display: inline-block;
    padding: 0.0625rem 0.375rem;
    background: var(--success-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.625rem;
    font-weight: 600;
    margin-left: 0.375rem;
}

.count-badge.inactive {
    background: var(--secondary-color);
}

.capcode-messages {
    display: none;
    border-top: 1px solid var(--border-color);
}

.capcode-messages.open {
    display: block;
}

.message-list {
    max-height: 400px;
    overflow-y: auto;
}

.message-item {
    padding: 0.625rem 0.75rem;
    margin: 0.375rem 0.5rem;
    background: var(--surface);
    border-radius: 0.375rem;
    border-left: 3px solid transparent;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message-item:first-child {
    margin-top: 0.5rem;
}

.message-item:last-child {
    margin-bottom: 0.5rem;
}

.message-item.discipline-brandweer {
    border-left-color: #dc2626;
}

.message-item.discipline-politie {
    border-left-color: #2563eb;
}

.message-item.discipline-ambulance {
    border-left-color: #f59e0b;
}

.message-item.discipline-lifeliner {
    border-left-color: #7c3aed;
}

.message-item .message-time {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-family: monospace;
}

.message-item .message-text {
    font-size: 0.8125rem;
}

.no-messages {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.toggle-icon {
    transition: transform 0.2s;
    font-size: 0.75rem;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 102;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .header-container {
        flex-wrap: nowrap;
        height: 64px;
        padding: 0 1rem;
        position: relative;
    }

    .header-left {
        flex: 1;
    }

    .header-right {
        order: 2;
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .mobile-menu-toggle {
        order: 3;
    }

    .header-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 1rem;
        gap: 0.25rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 100;
        border-top: 1px solid var(--border-color);
    }

    .header-nav.mobile-open {
        transform: translateX(0);
    }

    .header-nav .nav-link {
        display: block;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-radius: 0.5rem;
    }

    .header-nav .nav-link.active {
        background: var(--primary-color);
        color: white;
    }

    /* Mobile dropdowns */
    .nav-dropdown {
        position: relative;
    }

    .nav-dropdown .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--background);
        margin: 0.25rem 0 0.5rem 0;
        padding-left: 1rem;
    }

    .nav-dropdown:hover .nav-dropdown-content {
        display: none;
    }

    .nav-dropdown.mobile-dropdown-open .nav-dropdown-content {
        display: block;
    }

    .nav-dropdown.mobile-dropdown-open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-arrow {
        transition: transform 0.2s;
    }

    .nav-dropdown-content a {
        padding: 0.75rem 1rem;
        border-radius: 0.375rem;
    }

    /* User menu adjustments for mobile */
    .user-button .user-name {
        display: none;
    }

    .user-button {
        padding: 0.5rem;
    }

    .user-dropdown {
        right: 0;
        min-width: 180px;
    }

    /* Other mobile adjustments */
    .webhooks-grid {
        grid-template-columns: 1fr;
    }

    .stats-filters .filter-row {
        grid-template-columns: 1fr;
    }

    .webhook-actions {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .filters-panel {
        padding: 1rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .container {
        padding: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .message-header {
        flex-wrap: wrap;
    }

    .message-time {
        order: -1;
        width: 100%;
        margin-bottom: 0.25rem;
    }
}
