/* --- NULLSTILLING & BASIS --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: #f3f4f6; /* Lys grå */
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- KOMPONENTER --- */

/* Knapper */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
    text-align: center;
}
.btn:hover { opacity: 0.9; }
.btn-block { width: 100%; }

.btn-primary { background-color: #6c5ce7; color: white; } /* Lilla */
.btn-success { background-color: #10b981; color: white; } /* Grønn */
.btn-warning { background-color: #f97316; color: white; } /* Oransje */
.btn-danger  { color: #ef4444; background: transparent; padding: 0.25rem; } 
.btn-danger:hover { background-color: #fee2e2; border-radius: 4px; }
.btn-secondary { color: #d1d5db; background: transparent; }
.btn-secondary:hover { color: white; }
.btn-outline-danger { border: 1px solid #ef4444; color: #ef4444; background: white; }

/* Kort (Cards) */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

/* Skjema */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.75rem; font-weight: 700; color: #6b7280; margin-bottom: 0.25rem; text-transform: uppercase; }
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    background-color: white;
}
.form-control:focus { outline: 2px solid #6c5ce7; border-color: transparent; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* Badges */
.badge {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #f3f4f6;
    color: #374151;
    display: inline-block;
}
.badge-admin { background-color: #dc2626; color: white; }
.badge-ansatt { background-color: #f59e0b; color: white; }

/* --- LAYOUT --- */

/* Login */
.login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.login-box { width: 100%; max-width: 28rem; border-top: 4px solid #6c5ce7; }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon-bg { display: inline-flex; padding: 0.75rem; border-radius: 9999px; background-color: #eef2ff; margin-bottom: 1rem; color: #6c5ce7; }

/* Header */
.main-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem; background-color: #1f2937; color: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.header-logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; font-weight: bold; }
.header-user { display: flex; align-items: center; gap: 1rem; }
.user-pill { background-color: #374151; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.875rem; display: flex; align-items: center; gap: 0.5rem; }

/* Content */
.content-wrapper { 
    flex: 1; 
    overflow-y: auto; 
    padding: 1rem; 
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}
@media (min-width: 768px) { .content-wrapper { padding: 2rem; } }

/* Dashboard Grid */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .dashboard-grid { grid-template-columns: repeat(4, 1fr); } }

.dashboard-card { transition: transform 0.2s; cursor: pointer; display: block; text-decoration: none; color: inherit; }
.dashboard-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.dash-card-content { display: flex; justify-content: space-between; align-items: flex-start; }
.dash-count { font-size: 2.25rem; font-weight: 800; margin-top: 0.5rem; color: #111827; }

/* Borders colors */
.border-purple { border-top: 4px solid #9333ea; border-left: 4px solid #9333ea; }
.border-orange { border-top: 4px solid #fb923c; border-left: 4px solid #fb923c; }
.border-blue   { border-top: 4px solid #22d3ee; border-left: 4px solid #22d3ee; }
.border-green  { border-top: 4px solid #34d399; border-left: 4px solid #34d399; }
.border-gray   { border-top: 4px solid #6b7280; border-left: 4px solid #6b7280; }

/* Helpers Text Colors */
.text-purple { color: #9333ea; }
.text-orange { color: #f97316; }
.text-blue   { color: #06b6d4; }
.text-green  { color: #10b981; }
.text-gray   { color: #6b7280; }

/* Lists & Tables */
.list-header { display: flex; align-items: center; margin-bottom: 1.5rem; }
.list-header h2 { font-size: 1.5rem; font-weight: bold; display: flex; align-items: center; }
.job-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.job-actions { padding-top: 0.75rem; border-top: 1px solid #f3f4f6; display: flex; gap: 0.5rem; margin-top: 0.75rem; align-items: center; }

/* Table styles */
.table-container { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th { background-color: #f9fafb; padding: 0.75rem 1.5rem; font-size: 0.75rem; font-weight: 600; color: #6b7280; text-transform: uppercase; border-bottom: 1px solid #e5e7eb; }
.table td { padding: 1rem 1.5rem; font-size: 0.875rem; border-bottom: 1px solid #e5e7eb; }
.table tr:hover { background-color: #f9fafb; }

/* Utility */
.mb-4 { margin-bottom: 1rem; }
.text-muted { color: #6b7280; }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.bg-gray-50 { background-color: #f9fafb; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }

/* Animasjon */
.fade-in { animation: fadeIn 0.3s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }