:root {
    /* --- BRANDING --- */
    --primary: #0a3024;      /* Dyp grønn */
    --secondary: #027b5f;    /* Lysere grønn */
    --bg-light: #e8f6f4;     /* Mint bakgrunn */
    --surface: #ffffff;      /* Hvit */
    --text-main: #1a1a1a;    /* Mørk tekst */
    --text-muted: #027b5f;   
    --accent: #d4af37;       /* Gull */
    --border: #d1e8e2;       
    --danger: #EF4444;
    --white: #FFF;
    --radius: 16px;
    --shadow: 0 10px 30px -10px rgba(10, 48, 36, 0.15);
    --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body { 
    margin: 0; 
    font-family: var(--font-main); 
    background-color: var(--bg-light); 
    color: var(--text-main); 
    overflow: hidden; 
    -webkit-font-smoothing: antialiased;
}

/* --- VIKTIG NY REGEL: Skjuler elementer effektivt --- */
.hidden { display: none !important; }

/* --- TOAST --- */
.toast {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: var(--accent); 
    border: 1px solid var(--accent);
    padding: 12px 24px; border-radius: 50px;
    font-weight: 600; font-size: 14px; box-shadow: var(--shadow);
    z-index: 2000; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); opacity: 1;
    display: flex; align-items: center; gap: 10px;
}
.toast.hidden { top: -60px; opacity: 0; pointer-events: none; display: flex !important; } /* Unntak for toast animasjon */

/* --- TOP MENU --- */
.top-controls {
    position: absolute; top: 24px; right: 24px;
    display: flex; gap: 12px; z-index: 100;
}

.btn-top {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(10, 48, 36, 0.08); 
    border-radius: 12px; padding: 10px 18px;
    display: flex; align-items: center; gap: 10px; 
    font-family: var(--font-main); font-size: 13px; font-weight: 600; color: var(--text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-top i { font-size: 18px; transition: transform 0.2s ease; }

.btn-top:hover { 
    transform: translateY(-2px); background: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.btn-save { color: var(--primary); }
.btn-save:hover { border-color: var(--primary); background: #f0fdf4; }
.btn-export { color: var(--text-main); }
.btn-export:hover { border-color: var(--secondary); color: var(--secondary); }
.btn-reset { color: #64748b; }
.btn-reset:hover { color: #ef4444; background: #fef2f2; border-color: #fecaca; }

/* --- SIDEBAR LEFT --- */
.sidebar-left {
    position: absolute; top: 24px; left: 24px; bottom: 110px; width: 320px;
    background: rgba(10, 48, 36, 0.95); /* Mørk bakgrunn */
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3);
    display: flex; flex-direction: column; z-index: 90; overflow: hidden;
    color: #ffffff;
}

/* Header */
.sidebar-header { 
    padding: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    background: transparent;
}
.sidebar-header img.logo {
    height: 32px; margin-bottom: 12px; display: block;
    filter: brightness(0) invert(1); opacity: 0.9;
}
.sidebar-header h3 { 
    margin: 0; display: flex; align-items: center; gap: 8px; 
    font-size: 14px; color: #ffffff; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.8;
}

/* Controls */
.guest-controls { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }

/* Knapper */
.btn-secondary-full {
    background: #ffffff; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: var(--primary); 
    padding: 12px; border-radius: 12px; cursor: pointer; 
    font-weight: 600; font-size: 13px;
    display: flex; align-items: center; justify-content: center; gap: 10px; 
    width: 100%; box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: all 0.2s;
}
.btn-secondary-full i { font-size: 16px; color: var(--secondary); }
.btn-secondary-full:hover { 
    background: #f0fdf4; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* Search Bar Sidebar */
.search-bar { position: relative; display: flex; align-items: center; }
.search-bar i { position: absolute; left: 14px; color: rgba(255, 255, 255, 0.5); }
.search-bar input { 
    width: 100%; padding: 12px 12px 12px 40px; 
    background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.1); 
    color: white; border-radius: 12px; font-size: 13px; outline: none; transition: all 0.3s;
}
.search-bar input::placeholder { color: rgba(255, 255, 255, 0.4); }
.search-bar input:focus { background: rgba(0, 0, 0, 0.35); border-color: var(--accent); }

/* Guest List */
.guest-list-scroll { flex: 1; overflow-y: auto; padding: 0 24px; margin-bottom: 10px; }
.guest-list-scroll::-webkit-scrollbar { width: 5px; }
.guest-list-scroll::-webkit-scrollbar-track { background: transparent; }
.guest-list-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

/* Guest Cards */
.guest-card {
    background: #ffffff; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 12px;
    padding: 14px 16px; margin-bottom: 8px; 
    display: flex; align-items: center; justify-content: space-between;
    color: var(--primary); 
    font-weight: 600; font-size: 13px; letter-spacing: 0.3px;
    cursor: grab; transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.guest-card:hover { 
    background: #f0fdf4; 
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15); 
}
.guest-card i { color: #94a3b8; }
.guest-card:hover i { color: var(--danger); }

/* Add Guest Footer */
.add-guest-wrapper { 
    padding: 20px 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); 
    background: rgba(0, 0, 0, 0.1); display: flex; gap: 10px; 
}
#new-guest-name {
    background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1);
    color: white; border-radius: 12px; padding: 12px 16px; font-size: 13px;
}
#new-guest-name::placeholder { color: rgba(255, 255, 255, 0.4); }

.btn-icon-add { 
    background: var(--accent); color: var(--primary); border: none; 
    width: 44px; height: 44px; min-width: 44px; border-radius: 12px; 
    cursor: pointer; display: flex; justify-content: center; align-items: center;
    font-size: 20px; transition: all 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn-icon-add:hover { background: #e6c248; transform: scale(1.05); }

/* --- BOTTOM MENU --- */
.floating-dock {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    background: rgba(10, 48, 36, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 16px 32px; border-radius: 24px;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    display: flex; align-items: center; gap: 32px; z-index: 200;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.floating-dock:hover { transform: translateX(-50%) translateY(-5px); box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.4); }
.floating-dock button { 
    background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; 
    gap: 8px; padding: 0; color: rgba(255, 255, 255, 0.7); font-family: var(--font-main); transition: all 0.2s;
}
.floating-dock button i { font-size: 28px; color: #ffffff; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); transition: transform 0.2s ease; }
.floating-dock button span { font-size: 11px; font-weight: 600; text-transform: uppercase; opacity: 0.8; }
.floating-dock button:hover { color: var(--accent); }
.floating-dock button:hover i { color: var(--accent); transform: scale(1.15) translateY(-2px); filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4)); }
.floating-dock button:active i { transform: scale(0.95); }
.divider { width: 1px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent); height: 40px; margin: 0 10px; }
.icon-circle, .icon-rect, .icon-rect-head, .icon-horseshoe { display: none; }

/* --- INSPECTOR --- */
.inspector {
    position: absolute; top: 20px; left: 380px; width: 380px; bottom: 110px; 
    background: var(--surface); border-radius: 24px; 
    box-shadow: var(--shadow); border: 1px solid #fff;
    z-index: 90; display: flex; flex-direction: column; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.inspector.hidden { transform: translateX(-50px); opacity: 0; pointer-events: none; display: flex !important; } /* Behold display flex for animasjon, override global hidden */
.inspector-header { 
    padding: 24px; border-bottom: 1px solid var(--bg-light); 
    display: flex; justify-content: space-between; align-items: center; 
    background-color: #fafdfc; border-radius: 24px 24px 0 0;
}
.inspector-header h3 { color: var(--primary); margin: 0; font-size: 16px; font-weight: 700; }
.header-actions { display: flex; gap: 8px; }
.btn-small { 
    background: #fff; border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px; cursor: pointer; 
    font-size: 12px; display: flex; gap: 5px; align-items: center; color: var(--primary);
}
.inspector-content { flex: 1; overflow-y: auto; padding: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: var(--secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
input { 
    width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 12px; box-sizing: border-box; font-family: inherit; outline: none;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 48, 36, 0.05); }

.inspector-footer { padding: 24px; border-top: 1px solid var(--bg-light); display: flex; flex-direction: column; gap: 10px; }
.btn-primary { 
    background: var(--primary); color: var(--white); border: none; padding: 14px; border-radius: 12px; cursor: pointer; font-weight: 600; width: 100%;
    box-shadow: 0 4px 12px rgba(10, 48, 36, 0.2); transition: all 0.2s;
}
.btn-primary:hover { background: #0c3b2c; transform: translateY(-1px); }
.btn-danger-text { background: transparent; color: var(--danger); border: 1px solid #FECACA; padding: 12px; border-radius: 12px; cursor: pointer; width: 100%; transition: all 0.2s; }
.btn-danger-text:hover { background: #FEF2F2; }
.btn-close { background:transparent; border:none; cursor:pointer; font-size:20px; color: var(--text-muted); }

.guest-list-header { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.seat-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.seat-number { 
    font-size: 11px; width: 28px; height: 28px; background: var(--bg-light); color: var(--secondary);
    display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700;
}
.seat-input-wrapper { flex: 2; position: relative; }
.input-allergy { flex: 1; background: #fff; border-color: var(--border); color: var(--danger); font-size: 12px;}
#canvas-container { position: absolute; width: 100vw; height: 100vh; top: 0; left: 0; z-index: 1; }

/* --- PRINT --- */
#printable-area { display: none; }
@media print {
    body > *:not(#printable-area) { display: none !important; }
    #printable-area { display: block !important; background: white; padding: 20px; font-family: 'Inter', sans-serif; }
    .print-header { text-align: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
    .print-header h1 { color: #0a3024; }
    .print-section-title { font-size: 18px; font-weight: 700; margin: 20px 0 10px 0; border-bottom: 2px solid #0a3024; display: inline-block; color: #0a3024; }
    .print-map-container { 
        text-align: center; margin-bottom: 30px; border: 1px solid #ccc; padding: 10px; border-radius: 8px; background: #fff; page-break-inside: avoid;
    }
    .print-map-image { max-width: 100%; height: auto; max-height: 800px; display: inline-block; }
    .print-table-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 10px; }
    .print-table-item { border: 1px solid #ccc; padding: 0; break-inside: avoid; page-break-inside: avoid; border-radius: 4px; overflow: hidden; }
    .print-table-header { background: #e8f6f4; padding: 5px 10px; font-weight: bold; border-bottom: 1px solid #ccc; display: flex; justify-content: space-between; color: #0a3024; }
    .print-guest-list { padding: 5px 10px; }
    .print-guest-row { display: flex; justify-content: space-between; border-bottom: 1px dotted #ddd; padding: 3px 0; font-size: 11px; }
    .print-guest-row:last-child { border-bottom: none; }
    .print-allergy-alert { color: black; font-weight: bold; font-style: italic; }
}

/* --- DASHBOARD / EVENT MANAGER --- */
.dashboard-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 48, 36, 0.98); 
    backdrop-filter: blur(10px);
    z-index: 3000; 
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.3s;
}
.dashboard-overlay.hidden { opacity: 0; pointer-events: none; display: flex !important; }

.dashboard-container {
    background: #fff; width: 600px; max-width: 90%; height: 70vh;
    border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    display: flex; flex-direction: column; overflow: hidden;
}

.dashboard-header {
    background: var(--primary); color: white; padding: 30px;
    display: flex; justify-content: space-between; align-items: center;
}
.dashboard-header h2 { margin: 0; font-size: 20px; font-weight: 600; }

.dashboard-actions { padding: 20px; border-bottom: 1px solid var(--border); background: #fafdfc; }

.event-list { flex: 1; overflow-y: auto; padding: 20px; }

.event-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border: 1px solid var(--border); border-radius: 12px;
    margin-bottom: 12px; transition: all 0.2s; background: white;
}
.event-item:hover {
    border-color: var(--secondary); transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.05);
}
.event-info h4 { margin: 0 0 5px 0; font-size: 16px; color: var(--text-main); }
.event-meta { font-size: 12px; color: #64748b; display: flex; gap: 10px; }

.event-btn-group { display: flex; gap: 8px; }
.btn-mini { 
    padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); 
    background: white; cursor: pointer; color: var(--text-main);
}
.btn-mini:hover { background: var(--bg-light); color: var(--primary); }
.save-status-indicator {
    display: flex; align-items: center; gap: 8px; margin-right: 15px; font-size: 13px;
    font-weight: 500; color: var(--secondary); background: rgba(255,255,255,0.8);
    padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); transition: all 0.3s ease;
}
.save-status-indicator i { font-size: 18px; }

/* --- CANVAS TOOLBAR --- */
.canvas-toolbar {
    position: absolute; bottom: 30px; right: 30px; left: auto;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding: 6px; border-radius: 14px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
    display: flex; flex-direction: column; gap: 12px; z-index: 500; align-items: center;
}
.toolbar-group { display: flex; flex-direction: column; gap: 6px; }
.toolbar-divider { width: 24px; height: 1px; background: #e2e8f0; margin: 2px 0; }
.canvas-toolbar button {
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: var(--text-main); display: flex; align-items: center; 
    justify-content: center; cursor: pointer; font-size: 20px; transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.canvas-toolbar button:hover { background: #f1f5f9; color: var(--primary); transform: translateX(-2px); }
.canvas-toolbar button:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }
.canvas-toolbar button.active { 
    background: var(--bg-light); color: var(--secondary); border: 1px solid var(--secondary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.canvas-toolbar button[title]:hover::after {
    content: attr(title); position: absolute; right: 50px; background: #333;
    color: #fff; padding: 4px 8px; font-size: 11px; border-radius: 4px;
    white-space: nowrap; pointer-events: none;
}

/* --- TAGS --- */
.tag-container { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tag-btn {
    width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border);
    background: white; color: #94a3b8; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 12px; transition: all 0.15s ease; position: relative;
}
.tag-btn:hover { transform: scale(1.1); }
.tag-btn[data-active="true"][data-type="vip"] { background: #FFFBEB; border-color: #F59E0B; color: #F59E0B; }
.tag-btn[data-active="true"][data-type="gluten"] { background: #FEF2F2; border-color: #EF4444; color: #EF4444; }
.tag-btn[data-active="true"][data-type="lactose"] { background: #EFF6FF; border-color: #3B82F6; color: #3B82F6; }
.tag-btn[data-active="true"][data-type="vegan"] { background: #ECFDF5; border-color: #10B981; color: #10B981; }
.tag-btn[data-active="true"][data-type="nut"] { background: #F5F3FF; border-color: #8B5CF6; color: #8B5CF6; }

.tag-btn:hover::after {
    content: attr(data-tooltip); position: absolute; bottom: 120%; left: 50%;
    transform: translateX(-50%); background: #1a1a1a; color: #fff; padding: 4px 8px;
    font-size: 10px; font-weight: 600; border-radius: 6px; white-space: nowrap; z-index: 1000;
    pointer-events: none; box-shadow: 0 4px 6px rgba(0,0,0,0.1); opacity: 0; animation: fadeInTooltip 0.2s forwards;
}
.tag-btn:hover::before {
    content: ''; position: absolute; bottom: 90%; left: 50%; transform: translateX(-50%);
    border-width: 5px; border-style: solid; border-color: #1a1a1a transparent transparent transparent;
    opacity: 0; animation: fadeInTooltip 0.2s forwards;
}
@keyframes fadeInTooltip { from { opacity: 0; transform: translate(-50%, 5px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* --- RAPPORT & HJELP --- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-bottom: 20px; }
.report-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 15px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.report-card-icon { font-size: 24px; margin-bottom: 5px; }
.report-card-num { font-size: 28px; font-weight: 700; color: var(--primary); line-height: 1; }
.report-card-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.divider-horiz { height: 1px; background: #e2e8f0; margin: 30px 0; }
.capacity-track { width: 100%; height: 12px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.capacity-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.5s ease; }
.stat-box { background: #fff; border: 1px solid #e2e8f0; padding: 20px; border-radius: 12px; text-align: center; }
.stat-val { display: block; font-size: 32px; font-weight: 800; color: var(--text-main); }
.stat-label { font-size: 13px; color: #64748b; font-weight: 500; }
.report-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.report-table th { background: #f1f5f9; padding: 10px; border-bottom: 2px solid #e2e8f0; font-weight: 600; }
.report-table td { padding: 10px; border-bottom: 1px solid #f1f5f9; }
.report-table tr:last-child td { border-bottom: none; }

.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 20px; }
.help-step { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 25px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.2s; }
.help-step:hover { transform: translateY(-5px); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1); border-color: var(--secondary); }
.help-icon { width: 60px; height: 60px; background: #ecfdf5; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 15px; }
.help-step h4 { margin: 0 0 10px 0; font-size: 16px; color: var(--primary); }
.help-step p { margin: 0; font-size: 13px; color: #64748b; line-height: 1.5; }

/* MALER / TEMPLATES */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; padding-bottom: 10px; }
.template-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: all 0.2s; background: #fff; position: relative; cursor: pointer; display: flex; flex-direction: column; }
.template-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1); border-color: var(--secondary); }
.tmpl-body { padding: 20px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; }
.tmpl-icon { font-size: 32px; color: var(--primary); margin-bottom: 10px; background: #ecfdf5; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.tmpl-name { font-size: 13px; font-weight: 600; color: var(--text-main); line-height: 1.3; }
.tmpl-del-btn { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid #fee2e2; color: #ef4444; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; opacity: 0; transition: opacity 0.2s; }
.template-card:hover .tmpl-del-btn { opacity: 1; }
.tmpl-del-btn:hover { background: #fee2e2; }

/* SPESIFIKK STYLING FOR "TOMT ROM" (NEW BLANK) */
.template-card.new-blank {
    background: #fff; /* Solid hvit som de andre */
    border: 1px solid var(--border); /* Samme ramme som andre */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.template-card.new-blank .tmpl-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(10, 48, 36, 0.2);
    margin-bottom: 12px;
}
.template-card.new-blank .tmpl-name {
    color: var(--primary);
    font-weight: 700;
}
.template-card.new-blank:hover {
    border-color: var(--secondary);
}
.template-card.new-blank:hover .tmpl-icon {
    background: var(--secondary);
    transform: scale(1.05);
    transition: transform 0.2s, background 0.2s;
}

.dash-section { margin-bottom: 30px; }
.dash-section h3 { margin-top: 0; font-size: 16px; color: var(--primary); }


/* --- SERVICE MODE (SERVITØRMODUS) --- */

/* Skjul admin-verktøy */
body.service-mode .sidebar-left,
body.service-mode .top-controls,
body.service-mode .floating-dock,
body.service-mode .canvas-toolbar, 
body.service-mode .inspector,
body.service-mode .add-guest-wrapper {
    display: none !important;
}

/* Knapper (FAB) */
.btn-fab {
    position: fixed; bottom: 30px; left: 30px;
    background: white; color: var(--primary);
    border: none; border-radius: 50px; padding: 14px 24px;
    font-family: var(--font-main); font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); cursor: pointer; z-index: 4000;
    transition: all 0.2s;
}
.btn-fab:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(0,0,0,0.2); }
body.service-mode #btn-service-mode { background: var(--primary); color: white; }

/* Søkeknapp nede til høyre */
#btn-service-search.hidden { display: none; }
#btn-service-search { width: 50px; height: 50px; padding: 0; justify-content: center; border-radius: 50%; font-size: 20px;}

/* Innstillingsknapp (Tannhjul) */
#btn-service-settings.hidden { display: none; }
#btn-service-settings { width: 50px; height: 50px; padding: 0; justify-content: center; border-radius: 50%; font-size: 22px; }


/* Søk Overlay */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.95); z-index: 6000;
    display: flex; flex-direction: column; align-items: center; padding-top: 100px;
}
.search-overlay.hidden { display: none; }

.search-box-centered {
    display: flex; gap: 10px; width: 90%; max-width: 500px;
}
.search-box-centered input {
    flex: 1; padding: 20px; font-size: 18px; border: 2px solid var(--primary);
    border-radius: 12px; outline: none;
}
.btn-close-search {
    background: #f1f5f9; border: none; width: 60px; border-radius: 12px;
    font-size: 24px; cursor: pointer;
}
.search-results-centered {
    width: 90%; max-width: 500px; margin-top: 20px;
}
.search-result-item {
    padding: 14px; border-bottom: 1px solid #f1f5f9; cursor: pointer; border-radius: 8px;
}
.search-result-item:hover { background: #f8fafc; }


/* Backdrop & Sheet */
.service-backdrop {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 48, 36, 0.6); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 4500;
}
.service-backdrop.active { opacity: 1; pointer-events: all; }

.service-sheet {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 75vh;
    background: white; border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 60px rgba(0,0,0,0.3); z-index: 5000;
    transform: translateY(110%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex; flex-direction: column;
}
.service-sheet:not(.hidden) { transform: translateY(0); }

.sheet-handle { width: 40px; height: 5px; background: #e2e8f0; border-radius: 10px; margin: 12px auto; }
.sheet-header { padding: 10px 30px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; }
.sheet-header h2 { margin: 0; color: var(--primary); font-size: 22px; font-weight: 700; }
.btn-close-sheet { background: #f1f5f9; border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; color: #64748b; cursor: pointer; transition: background 0.2s; }
.btn-close-sheet:hover { background: #e2e8f0; color: var(--primary); }
.sheet-content { overflow-y: auto; padding: 10px 30px 40px; flex: 1; }
.service-guest-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #f1f5f9; }
.sg-info { display: flex; flex-direction: column; gap: 4px; }
.sg-name { font-size: 17px; font-weight: 600; color: #1e293b; }
.sg-seat { font-size: 11px; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 5px; }
.sg-seat::before { content:''; display:inline-block; width:6px; height:6px; background:#cbd5e1; border-radius:50%; }
.sg-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag-pill { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.tag-pill.vip { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }
.tag-pill.allergy { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }

/* Station Grid */
.station-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.btn-station { 
    padding: 20px; border-radius: 12px; border: 2px solid transparent; 
    background: #f8fafc; cursor: pointer; text-align: center;
    font-weight: 700; color: var(--primary); transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.btn-station:hover { transform: translateY(-3px); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }