/* Stefnumótunarkerfi - Modern CSS */

:root {
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-color: #f1f5f9;
    --dark-color: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

.navbar-brand {
    font-weight: bold;
}

/* Modern Cards */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: white;
    transition: all 0.2s ease;
    overflow: visible;
}

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

.card-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    font-weight: 600;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

/* Modern Buttons */
.btn {
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    transition: all 0.15s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

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

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

.btn-outline-secondary {
    border: 2px solid var(--gray-300);
    color: var(--gray-600);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-outline-info {
    border: 2px solid var(--info-color);
    color: var(--info-color);
    background: transparent;
}

.btn-outline-info:hover {
    background: var(--info-color);
    color: white;
}

.btn-outline-danger {
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
    background: transparent;
}

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

/* Fix button group corners */
.btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group .btn:not(:first-child) {
    margin-left: -1px;
}

/* Fix dropdown clipping */
.btn-group .dropdown-menu {
    z-index: 1050;
}

.card .table-responsive {
    overflow: visible;
}

.card-body {
    position: relative;
    overflow: visible;
}

/* Modern Forms */
.form-control {
    border-radius: var(--radius);
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    background: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Modern Alerts */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-success {
    background: rgb(16 185 129 / 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgb(239 68 68 / 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: rgb(6 182 212 / 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* Modern Tables */
.table {
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-sm);
}

.table-responsive {
    overflow: visible;
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    padding: 1rem;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.table-hover tbody tr:hover {
    background: var(--gray-50);
}

/* Modern Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
}

.bg-primary {
    background: var(--primary-color) !important;
}

.bg-success {
    background: var(--success-color) !important;
}

.bg-info {
    background: var(--info-color) !important;
}

.bg-secondary {
    background: var(--gray-500) !important;
}

/* Modern Professional Sidebar */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
    border-right: none;
    width: 260px !important;
    z-index: 1000;
    position: fixed !important;
    top: 0;
    left: 0 !important;
}

.sidebar .position-sticky {
    padding: 1.5rem 0 0 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Brand Section */
.sidebar .text-center {
    padding: 0 1.5rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
}

.sidebar h5 {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.sidebar small {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Navigation Links */
.sidebar .nav-link {
    color: #cbd5e1;
    padding: 0.75rem 1.5rem;
    margin: 0.125rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(37, 99, 235, 0.2);
    border-left: 3px solid #3b82f6;
    margin-left: 1rem;
    padding-left: 1.375rem;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 18px;
    font-size: 1rem;
    text-align: center;
}

/* User Info Section */
.sidebar .px-3 {
    padding: 1rem 1.5rem !important;
    margin-top: auto;
    border-top: 1px solid #475569;
}

.sidebar .px-3 small:first-child {
    color: #94a3b8;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.25rem;
}

.sidebar .px-3 .text-white {
    color: white !important;
    font-weight: 600;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.25rem;
}

.sidebar .px-3 small:last-child {
    color: #64748b;
    font-size: 0.75rem;
    text-transform: none;
    display: block;
}

/* Logout Link */
.sidebar .text-danger {
    color: #ef4444 !important;
    margin-top: 0.5rem;
}

.sidebar .text-danger:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

/* Adjust main content for fixed sidebar - ALWAYS */
.main-content {
    background: var(--gray-50);
    min-height: 100vh;
    padding: 1.5rem;
    margin-left: 260px !important;
}

/* Force margin on ALL screen sizes */
main.col-md-10,
main[class*="col-"] {
    margin-left: 260px !important;
}

/* Modern Stats Cards */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

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

.border-left-info {
    border-left: 4px solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-xs {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-300 {
    color: var(--gray-300) !important;
}

.text-gray-800 {
    color: var(--gray-800) !important;
}

.h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    background: var(--gray-50);
    min-height: 100vh;
    padding: 2rem;
}

.border-bottom {
    border-bottom: 2px solid var(--gray-200) !important;
}

.h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

/* Loading spinnari */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
}

.spinner-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hópflokkar */
.group-card {
    transition: transform 0.2s ease;
    cursor: pointer;
}

.group-card:hover {
    transform: translateY(-2px);
}

/* Athugasemdir */
.comment-item {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.comment-pending {
    border-left-color: var(--warning-color);
    background-color: #fff8e1;
}

.comment-approved {
    border-left-color: var(--success-color);
    background-color: #e8f5e8;
}

.comment-rejected {
    border-left-color: var(--danger-color);
    background-color: #ffeaea;
}

/* AI greining */
.ai-analysis {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.ai-analysis .btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.ai-analysis .btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Rauntíma uppfærslur */
.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Hide mobile menu elements - not needed */
.mobile-menu-toggle,
.sidebar-overlay {
    display: none !important;
}

/* Prentun */
@media print {
    .sidebar,
    .btn,
    .navbar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}