
/* ============================================
   GRUNNLEGGENDE RESET OG VARIABLER
   ============================================ */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
    --border-radius: 10px;
    --border-radius-sm: 5px;
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: var(--spacing-lg);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: white;
    border-radius: 20px;
    padding: 35px 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.logo {
    max-width: 90px;
    height: auto;
}

.header-text {
    text-align: left;
}

.header-text h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.header-text p {
    font-size: 1rem;
    color: #666;
}

@media (max-width: 768px) {
    .header-logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .header-text {
        text-align: center;
    }
    .logo {
        max-width: 60px;
    }
}

/* ============================================
   BOBLE-GRID - RESPONSIV
   ============================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 35px;
    }
}

@media (min-width: 1200px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 40px;
    }
}

.event-bubble {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-bubble:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.event-bubble.full {
    opacity: 0.7;
    cursor: not-allowed;
}

.event-bubble.full:hover {
    transform: none;
}

.bubble-header {
    background: var(--primary-gradient);
    color: white;
    padding: 25px 20px;
    position: relative;
    text-align: center;
}

.bubble-header h3 {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 12px;
    word-break: break-word;
    line-height: 1.3;
    letter-spacing: -0.3px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.event-type-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.bubble-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bubble-info {
    margin-bottom: 20px;
    flex: 1;
}

.bubble-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #555;
    font-size: 1rem;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bubble-info-item:last-child {
    border-bottom: none;
}

.bubble-info-item .emoji {
    font-size: 1.3rem;
    min-width: 32px;
    text-align: center;
}

.spots-indicator {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.spots-bar {
    background: #f0f0f0;
    border-radius: 12px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.spots-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 12px;
    transition: width 0.3s ease;
}

.spots-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.spots-text strong {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 700;
}

.full-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--danger-color);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

/* ============================================
   MODAL - RESPONSIV
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-header {
    background: var(--primary-gradient);
    color: white;
    padding: 25px;
    position: relative;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h2 {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 8px;
    padding-right: 30px;
    word-break: break-word;
}

.close-modal {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-lg);
    font-size: 28px;
    cursor: pointer;
    color: white;
    transition: opacity 0.3s;
    line-height: 1;
}

.close-modal:hover {
    opacity: 0.8;
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-event-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 5px solid #667eea;
}

.modal-event-info p {
    margin: 8px 0;
    color: #333;
    font-size: 1rem;
}

.modal-event-info p strong {
    color: #667eea;
    font-weight: 600;
}

/* ============================================
   BEKREFTELSESMODAL
   ============================================ */
.confirmation-modal {
    text-align: center;
}

.confirmation-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.confirmation-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

.confirmation-body h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.confirmation-message {
    text-align: left;
}

#confirmationText {
    margin-bottom: 20px;
}

#confirmationText p {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.5;
}

#confirmationText p:first-child {
    font-size: 1.1rem;
    font-weight: 500;
    color: #28a745;
}

.confirmation-event-details {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 15px 0;
    border-left: 4px solid #28a745;
}

.confirmation-event-details strong {
    font-size: 1.2rem;
    color: #28a745;
    margin-bottom: 15px;
    display: block;
}

/* Event detail - EN ENKEL DEFINISJON */
.event-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    color: #555;
    line-height: 1.4;
}

.event-detail:first-child {
    margin-top: 0;
}

.event-detail:last-child {
    margin-bottom: 0;
}

.detail-emoji {
    font-size: 1.1rem;
    min-width: 32px;
    text-align: center;
}

/* Pris og Vipps */
#confirmationPrice,
#confirmationVipps {
    margin: 0;
}

#confirmationPrice strong,
#confirmationVipps strong {
    font-weight: 600;
    color: #333;
}

/* Vipps-nummer - EN ENKEL DEFINISJON */
.vipps-number-inline {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff5e00;
    font-family: monospace;
    background: #fff3e0;
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
}

.confirmation-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.confirmation-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    width: auto;
    padding: 12px 30px;
    margin-top: var(--spacing-sm);
}

/* ============================================
   SKJEMAER - RESPONSIV
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* ============================================
   KNAPPER - RESPONSIV
   ============================================ */
button, .btn {
    background: var(--primary-gradient);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.4);
}

@media (max-width: 640px) {
    button, .btn {
        padding: 12px 24px;
        font-size: 0.875rem;
        width: 100%;
    }
}

/* ============================================
   MELDINGER
   ============================================ */
.message, .alert {
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
    font-size: 0.875rem;
}

.message.success, .alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error, .alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ============================================
   ADMINPANEL - RESPONSIV
   ============================================ */
.admin-header {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.admin-header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-logo {
    max-width: 50px;
    height: auto;
}

.admin-header-logo h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: background 0.3s;
    font-size: 0.875rem;
}

.logout-btn:hover {
    background: #c82333;
    transform: none;
}

@media (max-width: 768px) {
    .admin-header-logo {
        flex-direction: column;
        text-align: center;
    }
    .admin-logo {
        max-width: 40px;
    }
}
/* Mobil tilpasning for admin-header */
@media (max-width: 768px) {
    .admin-header {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .admin-header-logo {
        gap: 10px;
    }
    
    .admin-logo {
        max-width: 35px;
    }
    
    .admin-header-logo h1 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .logout-btn {
        padding: 5px 12px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .admin-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 12px;
    }
    
    .admin-header-logo {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .admin-logo {
        max-width: 40px;
    }
    
    .admin-header-logo h1 {
        font-size: 0.9rem;
    }
    
    .logout-btn {
        width: 100%;
        text-align: center;
    }
}

/* Tabs */
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.tab {
    background: white;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s;
    font-size: 0.875rem;
    flex: 0 0 auto;
}

.tab:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.tab.active {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 640px) {
    .tab {
        padding: 8px 16px;
        font-size: 0.8125rem;
        flex: 1;
        text-align: center;
    }
}

/* Tabell-innhold */
.tab-content {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

@media (max-width: 640px) {
    .tab-content {
        padding: var(--spacing-md);
    }
}

.form-card {
    background: #f9f9f9;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-xl);
    border: 1px solid #e0e0e0;
}

/* Tabeller */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.events-table,
.participants-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

th {
    background: #f5f5f5;
    font-weight: 600;
    color: var(--text-dark);
}

tr:hover {
    background: #f9f9f9;
}

/* Klikkbar rad */
.events-table.clickable-rows tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.events-table.clickable-rows tbody tr:hover {
    background-color: #f5f5f5;
}

/* Kompakte knapper */
.compact-btn {
    display: inline-block;
    padding: 4px 10px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    margin: 0 2px;
}

.compact-btn:hover {
    transform: translateY(-1px);
}

.compact-edit {
    background: #ffc107;
    color: #333;
}

.compact-edit:hover {
    background: #e0a800;
}

.compact-email {
    background: #17a2b8;
    color: white;
}

.compact-email:hover {
    background: #138496;
}

.compact-delete {
    background: #dc3545;
    color: white;
}

.compact-delete:hover {
    background: #c82333;
}

.delete-btn-small {
    background: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.7rem;
    display: inline-block;
    transition: all 0.2s;
}

.delete-btn-small:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.link-btn {
    display: inline-block;
    padding: 4px 8px;
    background: #17a2b8;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.link-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

.mobile-link {
    color: #17a2b8;
    text-decoration: none;
    font-size: 0.75rem;
}

.event-actions-compact {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Deltaker-side */
.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.event-info-banner {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-left: 4px solid #667eea;
}

.event-info-item {
    font-size: 0.875rem;
    color: #555;
}

.event-info-item strong {
    color: #333;
}

.event-selector {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: #f9f9f9;
    border-radius: var(--border-radius-sm);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.event-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    flex: 1;
    min-width: 200px;
}

/* Betalingsstatus */
.payment-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.payment-paid {
    background: #d4edda;
    color: #155724;
}

.payment-pending {
    background: #fff3cd;
    color: #856404;
}

.mark-paid-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 5px;
    transition: all 0.2s;
}

.mark-paid-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Utstyr */
.equipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.btn-add-equipment {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.equipment-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.equipment-filter {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 10px;
}

.equipment-table {
    width: 100%;
    border-collapse: collapse;
}

.equipment-table tr.low-stock {
    background: #fff3e0;
}

/* Lagerjustering */
.stock-cell {
    min-width: 200px;
}

.stock-adjust-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 30px;
    border: 1px solid #e0e0e0;
    width: fit-content;
}

.stock-adjust {
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stock-minus-large {
    background: #dc3545;
    color: white;
}

.stock-minus-small {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stock-value {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    min-width: 45px;
    text-align: center;
    padding: 0 4px;
    cursor: pointer;
    border-radius: 4px;
}

.stock-value:hover {
    background-color: #e9ecef;
}

.stock-unit {
    font-size: 0.7rem;
    color: #666;
    margin-left: 2px;
}

.stock-plus-small {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-plus-large {
    background: #28a745;
    color: white;
}

/* Tidligere arrangementer */
.event-section {
    margin-bottom: 40px;
}

.event-section h2 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    color: #333;
}

.past-events-section h2 {
    color: #666;
}

.past-events-table {
    opacity: 0.85;
}

.past-events-table tbody tr {
    background-color: #f5f5f5;
}

.past-event-header {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
}

.past-event-banner {
    background: #f5f5f5;
    border-left-color: #9e9e9e;
    opacity: 0.85;
}

/* Mobil kort-visning */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

.event-card-mobile {
    display: block;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.event-card-header {
    background: var(--primary-gradient);
    padding: 15px;
}

.event-card-header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.event-card-body {
    padding: 15px;
}

.event-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-icon {
    font-size: 1rem;
    min-width: 24px;
}

.info-text {
    color: #555;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .desktop-view {
        display: none;
    }
    .mobile-view {
        display: block;
    }
    .participants-table td {
        display: block;
        padding: 10px;
        position: relative;
        padding-left: 40%;
    }
    .participants-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 35%;
        font-weight: 600;
        color: #666;
    }
    .participants-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
    }
    .equipment-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 12px;
    }
    .stat-number {
        font-size: 1.2rem;
    }
}

/* Login-skjema */
.login-form {
    max-width: 400px;
    width: 90%;
    margin: 100px auto;
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.admin-link {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.admin-link a {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    transition: background 0.3s;
}

.no-events {
    background: white;
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Animasjoner */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Print */
@media print {
    body {
        background: white;
        padding: 0;
    }
    .admin-link, .logout-btn, .delete-btn, .edit-btn, button, .tabs, .modal {
        display: none;
    }
}

/* ============================================
   KOMPAKT MODAL FOR UTSTYR
   ============================================ */
#equipmentModal .modal-content {
    max-width: 550px;
}

#equipmentModal .modal-body {
    padding: 20px !important;
}

#equipmentModal .form-group {
    margin-bottom: 12px;
}

#equipmentModal .form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

#equipmentModal .form-group input,
#equipmentModal .form-group select,
#equipmentModal .form-group textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s;
}

#equipmentModal .form-group input:focus,
#equipmentModal .form-group select:focus,
#equipmentModal .form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.1);
}

#equipmentModal .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

#equipmentModal .form-group.half {
    flex: 1;
    margin-bottom: 0;
}

#equipmentModal .btn-cancel,
#equipmentModal .btn-save {
    padding: 8px 20px;
    font-size: 0.85rem;
    border-radius: 6px;
}

#equipmentModal .btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
}

#equipmentModal .btn-cancel:hover {
    background: #5a6268;
}

#equipmentModal .btn-save {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    cursor: pointer;
}

#equipmentModal .btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

/* Mobil tilpasning for utstyr-modal */
@media (max-width: 640px) {
    #equipmentModal .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    #equipmentModal .modal-body {
        padding: 15px !important;
    }
}

/* ============================================
   VIPPS-INFORMASJON - STILER
   ============================================ */
.vipps-info-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
}

.vipps-details {
    flex: 2;
    min-width: 180px;
}

.vipps-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.vipps-row:last-child {
    margin-bottom: 0;
}

.vipps-row .detail-emoji {
    font-size: 1.1rem;
    min-width: 32px;
}

.vipps-row strong {
    font-weight: 600;
    color: #333;
    min-width: 110px;
}

.vipps-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff5e00;
    font-family: monospace;
    background: #fff3e0;
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
}

.vipps-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    background: #fff3e0;
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
}

.vipps-qr {
    flex: 1;
    text-align: center;
    min-width: 80px;
}

.vipps-qr-code {
    max-width: 80px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.vipps-qr-code:hover {
    transform: scale(1.05);
}

/* Mobil tilpasning */
@media (max-width: 640px) {
    .vipps-info-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 12px;
    }
    
    .vipps-row {
        flex-wrap: wrap;
    }
    
    .vipps-row strong {
        min-width: 100px;
    }
    
    .vipps-number {
        font-size: 1rem;
        padding: 3px 10px;
    }
    
    .vipps-name {
        font-size: 0.85rem;
        padding: 3px 10px;
    }
    
    .vipps-qr {
        text-align: center;
    }
    
    .vipps-qr-code {
        max-width: 70px;
    }
}

/* ============================================
   BOBLE-GRID - MIDTSTILT
   ============================================ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    gap: 30px;
    margin-bottom: var(--spacing-xl);
    justify-content: center;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .events-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 350px));
        gap: 25px;
    }
}

@media (max-width: 767px) {
    .events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

.event-bubble {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.event-bubble:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.event-bubble.full {
    opacity: 0.7;
    cursor: not-allowed;
}

.event-bubble.full:hover {
    transform: none;
}

/* ============================================
   UTSTYR - MOBIL RESPONSIV
   ============================================ */
.equipment-desktop-view {
    display: block;
}

.equipment-mobile-view {
    display: none;
}

/* Mobil kort for utstyr */
.equipment-card-mobile {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
}

.equipment-card-mobile:active {
    transform: scale(0.98);
}

.equipment-card-mobile.low-stock-mobile {
    background: #fff8e7;
    border-left: 4px solid #ffc107;
}

.equipment-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.equipment-card-header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
    flex: 1;
}

.low-stock-badge {
    background: #ffc107;
    color: #333;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.equipment-card-body {
    padding: 12px 15px;
}

.equipment-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 8px;
}

.equipment-card-row:last-child {
    border-bottom: none;
}

.row-label {
    font-weight: 600;
    color: #555;
    font-size: 0.8rem;
    min-width: 90px;
}

.row-value {
    color: #333;
    font-size: 0.85rem;
    text-align: right;
    flex: 1;
}

.stock-input-mobile {
    width: 70px;
    padding: 6px 8px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: white;
}

.stock-input-mobile:focus {
    outline: none;
    border-color: #667eea;
}

.unit-text {
    font-size: 0.75rem;
    color: #666;
    margin-left: 4px;
}

/* Desktop visning */
@media (min-width: 769px) {
    .equipment-desktop-view {
        display: block;
    }
    .equipment-mobile-view {
        display: none;
    }
}

/* Mobil visning */
@media (max-width: 768px) {
    .equipment-desktop-view {
        display: none;
    }
    .equipment-mobile-view {
        display: block;
    }
    
    .equipment-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .equipment-filter {
        flex-wrap: wrap;
    }
    
    .equipment-filter select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .equipment-stats {
        grid-template-columns: 1fr;
    }
    
    .equipment-card-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .row-label {
        min-width: auto;
    }
    
    .row-value {
        text-align: left;
        width: 100%;
    }
    
    .stock-input-mobile {
        width: 100%;
        max-width: 100px;
    }
}

/* ============================================
   MOBIL KORT-VISNING - ADMINPANEL
   ============================================ */
.desktop-view {
    display: block;
}

.mobile-view {
    display: none;
}

/* Mobil kort-styling - kommende arrangementer */
.event-card-mobile {
    display: block;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

.event-card-mobile:active {
    transform: scale(0.98);
}

.event-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px;
}

.event-card-header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    word-break: break-word;
}

.event-card-body {
    padding: 15px;
}

.event-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-icon {
    font-size: 1rem;
    min-width: 24px;
}

.info-text {
    color: #555;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* TIDLIGERE ARRANGEMENTER - MOBIL (GRÅ BAKGRUNN) */
.past-event-card-mobile {
    background: #f5f5f5;
    opacity: 0.85;
}

.past-event-header-mobile {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
}

.past-event-card-mobile .event-card-body {
    background: #f9f9f9;
}

.past-event-card-mobile .info-text {
    color: #666;
}

/* Mobil visning */
@media (max-width: 768px) {
    .desktop-view {
        display: none;
    }
    
    .mobile-view {
        display: block;
    }
    
    /* Juster tabell for mobil */
    .participants-table {
        min-width: 100%;
    }
    
    .participants-table th {
        display: none;
    }
    
    .participants-table td {
        display: block;
        padding: 10px;
        position: relative;
        padding-left: 40%;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.875rem;
    }
    
    .participants-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 35%;
        font-weight: 600;
        color: #666;
        font-size: 0.75rem;
    }
    
    .participants-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
        background: white;
    }
    
    .participants-table td:last-child {
        border-bottom: none;
    }
    
    /* Deltaker-tabell på mobil - vis telefon */
    .participants-table td.col-phone,
    .participants-table th.col-phone {
        display: block;
    }
}

/* Desktop standard */
@media (min-width: 769px) {
    .desktop-view {
        display: block;
    }
    
    .mobile-view {
        display: none;
    }
}

/* ============================================
   SLUG-FELT (DIREKTELENKE)
   ============================================ */
.slug-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
}

.slug-domain {
    font-size: 0.85rem;
    color: #666;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.slug-input {
    flex: 1;
    min-width: 150px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: monospace;
}

.slug-input:focus {
    outline: none;
    border-color: #667eea;
}

.slug-generate-btn {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.slug-generate-btn:hover {
    background: #5a6268;
}

@media (max-width: 640px) {
    .slug-preview {
        flex-direction: column;
        align-items: stretch;
    }
    
    .slug-domain {
        text-align: center;
    }
    
    .slug-generate-btn {
        width: 100%;
    }
}
/* ============================================
   EVENT SELECTOR - MOBILVENNLIG
   ============================================ */
.event-selector {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: #f9f9f9;
    border-radius: var(--border-radius-sm);
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.event-selector label {
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
}

.event-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    flex: 1;
    min-width: 200px;
    max-width: 100%;
}

/* Mobil tilpasning */
@media (max-width: 768px) {
    .event-selector {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 8px;
    }
    
    .event-selector label {
        font-size: 0.8rem;
        white-space: normal;
        margin-bottom: 2px;
    }
    
    .event-selector select {
        width: 100%;
        min-width: auto;
        padding: 8px 10px;
        font-size: 0.85rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Forhindre at select blir for bred */
    .event-selector form {
        width: 100%;
    }
    
    .event-selector select option {
        font-size: 0.8rem;
        white-space: normal;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .event-selector {
        padding: 10px;
    }
    
    .event-selector select {
        padding: 8px 8px;
        font-size: 0.8rem;
    }
    
    .event-selector label {
        font-size: 0.75rem;
    }
}

/* ============================================
   KALENDER - FULLCALENDAR TILPASNING
   ============================================ */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-add-event {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-add-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.calendar-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #1565c0;
}

/* FullCalendar tilpasning */
#calendar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.fc {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fc-toolbar-title {
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: #333;
}

.fc-button {
    background: #f8f9fa !important;
    border: 1px solid #ddd !important;
    color: #333 !important;
    text-transform: capitalize !important;
    transition: all 0.2s !important;
}

.fc-button:hover {
    background: #e9ecef !important;
    transform: translateY(-1px);
}

.fc-button-primary {
    background: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

.fc-button-primary:hover {
    background: #5a67d8 !important;
}

.fc-daygrid-day {
    cursor: pointer;
    transition: background-color 0.2s;
}

.fc-daygrid-day:hover {
    background-color: #f8f9fa;
}

.fc-daygrid-day-number {
    font-size: 0.85rem;
    padding: 8px !important;
}

.fc-daygrid-day-top {
    justify-content: center !important;
}

.fc-event {
    cursor: pointer;
    border-radius: 6px !important;
    padding: 4px 6px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    transition: transform 0.1s, opacity 0.2s;
}

.fc-event:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.fc-event-title {
    font-weight: 500;
}

.fc-list-event-title {
    font-weight: 500;
}

.fc-list-event-dot {
    border-radius: 50% !important;
}

/* Modal for kalenderhendelser */
#calendarModal .modal-content {
    max-width: 500px;
}

#calendarModal .modal-body {
    padding: 20px !important;
}

#calendarModal .form-group {
    margin-bottom: 12px;
}

#calendarModal .form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

#calendarModal .form-group input,
#calendarModal .form-group select,
#calendarModal .form-group textarea {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s;
}

#calendarModal .form-group input:focus,
#calendarModal .form-group select:focus,
#calendarModal .form-group textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.1);
}

#calendarModal .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

#calendarModal .form-group.half {
    flex: 1;
    margin-bottom: 0;
}

#calendarModal .btn-cancel,
#calendarModal .btn-save,
#calendarModal .btn-delete {
    padding: 8px 20px;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

#calendarModal .btn-cancel {
    background: #6c757d;
    color: white;
}

#calendarModal .btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

#calendarModal .btn-delete {
    background: #dc3545;
    color: white;
}

#calendarModal .btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

#calendarModal .btn-save {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

#calendarModal .btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40,167,69,0.3);
}

/* Mobil tilpasning for kalender */
@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-add-event {
        width: 100%;
        text-align: center;
    }
    
    #calendar {
        padding: 10px;
    }
    
    .fc-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .fc-toolbar-title {
        font-size: 1rem !important;
    }
    
    .fc-button {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.7rem !important;
        padding: 4px !important;
    }
    
    .fc-event {
        font-size: 0.65rem !important;
        padding: 2px 4px !important;
    }
    
    #calendarModal .form-row {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .fc-toolbar {
        gap: 8px;
    }
    
    .fc-toolbar-title {
        font-size: 0.9rem !important;
    }
    
    .fc-button-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .fc-button {
        margin: 2px !important;
    }
}