:root {
    --primary-color: #3274d6;
    --primary-hover: #2868c7;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --bg-color: #f4f6f9;
    --text-color: #333333;
    --text-muted: #6c757d;
    --card-bg: #ffffff;
    --header-bg: #2B2B2D;
    --header-text: #c1c4c8;
    --border-color: #dee2e6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

@font-face {
    font-family: 'Volvo Novum Regular';
    src: url('../fonts/volvo.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Volvo Novum Regular", "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.content {
    padding: 2rem 0;
}

/* Header & Nav */
.navtop {
    background-color: var(--header-bg);
    color: var(--header-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

#navbar {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

#navbar>li {
    position: relative;
}

#navbar>li>a {
    display: block;
    padding: 0 15px;
    line-height: 60px;
    color: var(--header-text);
    text-decoration: none;
    font-weight: normal;
    text-transform: uppercase;
    transition: color 0.2s, background-color 0.2s;
}

#navbar>li>a:hover,
#navbar>li.active>a {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown */
#navbar ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--header-bg);
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    z-index: 1000;
}

#navbar li:hover ul {
    display: block;
}

#navbar ul li {
    width: 100%;
}

#navbar ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--header-text);
    text-decoration: none;
    text-transform: none;
}

#navbar ul li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.menu_right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.menu_right a {
    color: var(--header-text);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.menu_right a:hover {
    color: #fff;
}

.nav-logo {
    max-height: 40px;
    width: auto;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* components */
.card {
    background-color: var(--card-bg);
    border-radius: 0.25rem;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-xs {
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: #fff;
}

table th,
table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: #495057;
}

table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

table.arhiiv {
    /* Legacy class mapping */
    width: 100%;
    margin-bottom: 1rem;
}

/* Forms */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

input[type="text"],
input[type="password"],
textarea,
select {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Login */
.login {
    max-width: 400px;
    margin: 100px auto;
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.login h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.login form {
    display: flex;
    flex-direction: column;
}

.login-input-group {
    position: relative;
    margin-bottom: 20px;
}

.login-input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.login-input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    /* Space for icon */
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.login-input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(50, 116, 214, 0.15);
}

.login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(50, 116, 214, 0.3);
}

/* Responsive Utils */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-12 {
    width: 100%;
    padding: 0 15px;
}

.col-md-6 {
    width: 50%;
    padding: 0 15px;
}

.col-md-4 {
    width: 33.3333%;
    padding: 0 15px;
}

/* Search */
#search_text {
    width: 100%;
    max-width: 500px;
    margin: 40px auto;
    display: block;
    padding: 15px;
    font-size: 1.2rem;
    border-radius: 30px;
    border: 2px solid var(--primary-color);
}

/* Legacy Popups (kept for compatibility) */
.popup-overlay {
    visibility: hidden;
    position: absolute;
    background: #fff;
    width: 30%;
    left: 35%;
    top: 20%;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    border-radius: 5px;
}

.popup-overlay.active {
    visibility: visible;
}

/* Scroll Top */
.scroll-top-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.scroll-top-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}