/* ==========================================================================
	Variables & Root Settings
 ========================================================================== */
:root {
	/* Layout */
	--header-height: 60px;

	/* Brand Colors */
	--color-primary: #104e97;	/* Deep Blue */
	--color-primary-dark: #0c3462;  /* Dark Blue */
	--color-secondary: #009dde;  /* Sky Blue */
	--color-secondary-dark: #006590;  /* Dark Sky Blue */
	--color-accent: #940052;     /* Purple */
	--color-accent-dark: #640037;     /* Dark Purple */
	
	/* Neutral Colors */
	--color-text: #333333;
	--color-text-light: #555555;
	--color-text-lighter: #999999;
	--color-border: #dddddd;
	--color-background: #fafafa;
	
	/* Spacing */
	--spacing-xs: 0.25rem;
	--spacing-sm: 0.5rem;
	--spacing-md: 1rem;
	--spacing-lg: 1.5rem;
	--spacing-xl: 2rem;
}

/* ==========================================================================
	Base Styles & Typography
	 ========================================================================== */
body {
	background: url(img/loginbg.jpg) center center no-repeat;
	background-size: cover;
	background-attachment: fixed;
	font-family: 'Montserrat', sans-serif;
	color: var(--color-text);
	padding-top: var(--header-height);
	margin-top: 0;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--color-text-light);
	margin: 0 0 var(--spacing-md);
}

h1 { 
	font-size: 1.6rem; 
	color: var(--color-text-lighter);
	font-weight: 700;
	padding: 15px 0 0 0;
}

h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }

legend { 
	font-size: 1.2rem;
	color: var(--color-text-light);
	font-weight: 500;
	padding: 5px 0 0 0;
}

/* ==========================================================================
	Layout Components
   ========================================================================== */

/* Header & Navigation */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--header-height);
	background-color: var(--color-primary);
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	z-index: 1030;
}

.navbar {
	height: var(--header-height);
	padding: 0;
}

.navbar-brand {
	color: rgba(255, 255, 255, 0.85);;
	font-weight: 500;
	font-size: 1rem;
	padding: 0.5rem 1rem;
	margin: 0;
	/* transition: transform 0.2s ease; */
}

/* .navbar-brand:hover {
	transform: scale(1.05) !important;
} */

.navbar-nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.nav-item {
	position: relative;
}

.nav-link {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.9rem;
	padding: 0.5rem 1rem;
	border: none !important;
	transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.3);
	border-radius: 4px;
}

.nav-link.active{
	color: #fff;
	background-color: var(--color-primary-dark);
	border-radius: 4px;
}

.dropdown-menu {
	background-color: #fff;
	border: none;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	padding: 0.5rem;
	margin-top: 0.5rem;
}

.dropdown-item {
	color: var(--color-text);
	font-size: 0.9rem;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
	background-color: rgba(0,0,0,0.05);
	color: var(--color-primary);
}

.dropdown-menu .dropdown-item:active {
	background-color: var(--color-primary);
	color: #fff;
}

.dropdown-menu hr {
	margin: 0.5rem 0;
	opacity: 0.1;
}

.navbar-brand img {
	max-width: 160px;
}

.navbar-dark .navbar-nav .nav-link {
	border-bottom: 1px solid;
	margin-right: 3px;
	color: rgba(255, 255, 255, 0.8);
}

.navbar-dark .navbar-nav .nav-link:hover {
	border-bottom: 3px solid;
	margin-bottom: -2px;
	color: #ffffff;
}

/* Main Container */
main.container:not(.login-screen) {
	margin: 20px;
	background-color: #fff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	padding: 20px;
	width: -webkit-fill-available;
	max-width: 100%;
}

/* Page Title */
.h1 {
	font-size: 1.6rem;
	color: var(--color-text-lighter);
	font-weight: 700;
	margin-bottom: 1.5rem;
	padding: 0;
}

/* Content Sections */
.content-section {
	background: #ffffff;
	padding: 10px 20px;
	border: 1px solid var(--color-border);
	border-radius: 3px;
	margin-bottom: 20px;
}

.standardbox {
	border-radius: 6px;
	padding: 20px;
	background-color: #f5f5f5;
}

/* ==========================================================================
	Forms & Inputs
	========================================================================== */
.form-control {
	border: none;
	border-bottom: 1px solid var(--color-border);
	border-radius: 0;
	padding: 0.5rem 0;
}

.form-control:focus {
	box-shadow: none;
	border-bottom: 3px solid var(--color-accent);
}

.form-check-input:checked {
	background-color: var(--color-secondary);
	border-color: var(--color-secondary);
}

/* Buttons */
.btn {
	border: none;
	background-image: linear-gradient(var(--color-secondary), var(--color-primary));
	border-radius: 5px;
	color: #fff;
	text-transform: uppercase;
	font-weight: 500;
	font-size: 12px;
	padding: 10px 20px;
	transition: background 0.3s ease;
}

.btn:hover {
	color: #fff;
	background: var(--color-primary) !important;
}

.btn-primary {
	background-image: linear-gradient(var(--color-primary), var(--color-primary)) !important;
}

.btn-primary:hover {
	background-image: linear-gradient(var(--color-primary-dark), var(--color-primary-dark)) !important;
}

.btn-primary:focus,
.btn-secondary:focus,
.btn-danger:focus {
	outline: none !important;
    box-shadow: none !important;
}


.btn-secondary {
	background-image: linear-gradient(#999, #999) !important;
}

.btn-secondary:hover {
	background-image: linear-gradient(#555, #555) !important;
}

.btn-outline-secondary {
	background-image: linear-gradient(#ffffff, #ffffff) !important;
	outline-width: 2px !important;
	outline-style: solid !important;
	outline-color: var(--color-secondary) !important;
}
.btn-outline-secondary:hover {
	background-image: linear-gradient(var(--color-secondary), var(--color-secondary)) !important;
	outline-width: 0px !important;
	outline-style: solid !important;
	color: #ffffff !important;
}

.btn-danger {
	background-image: linear-gradient(var(--color-accent), var(--color-accent)) !important;
}

.btn-danger:hover {
	background-image: linear-gradient(var(--color-accent-dark), var(--color-accent-dark)) !important;
}

/* Tabs Navigation */
.nav-tabs {
	border-bottom: 1px solid var(--color-border);
	margin-bottom: 2rem;
}

.nav-tabs .nav-link {
	color: var(--color-text-light);
	border: none;
	padding: 0.75rem 1.5rem;
	font-size: 0.9rem;
	font-weight: 500;
	transition: all 0.2s ease;
	border-bottom: 2px solid transparent;
	background: none;
}

.nav-tabs .nav-link:hover {
	border-color: transparent;
	background: var(--color-background);
	color: var(--color-primary);
}

.nav-tabs .nav-link.active {
	color: var(--color-primary);
	border-top: 1px solid var(--color-border) !important;
	border-left: 1px solid var(--color-border) !important;
	border-right: 1px solid var(--color-border) !important;
}

/* Tables */
.table {
	width: 100% !important;
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table thead th {
	background-color: #f8f9fa;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.5px;
	padding: 1rem;
	border: none;
}

.table tbody td {
	padding: 1rem;
	vertical-align: middle;
	border-bottom: 1px solid var(--color-border);
	font-size: 0.9rem;
}

.table tbody tr:last-child td {
	border-bottom: none;
}

.table-striped tbody tr:nth-of-type(odd) {
	background-color: #f8f9fa;
}

/* Action Buttons Container */
.action-buttons {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.action-buttons .btn {
	margin: 0 !important;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* Remove any margins from buttons that might interfere with flexbox */
.btn.mb-4 {
	margin-bottom: 0 !important;
  }
  
  .btn.sec-nazad {
	margin: 0 !important;
  }
  
  .btn-x:hover {
	background-color: rgba(0,0,0,0.05);
  }
  
  .awesomeedit {
	color: var(--color-primary);
	font-size: 1.1rem;
	opacity: 0.7;
	transition: opacity 0.2s ease;
  }
  
  .awesomeedit:hover {
	opacity: 1;
  }
  
  /* Modal Styles */
  .modal-dialog {
	margin: 1.75rem auto;
  }
  
  .modal-dialog-centered {
	display: flex;
	align-items: center;
	min-height: calc(100% - 3.5rem);
  }
  
  .modal-content {
	border: none;
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  }
  
  .modal-header {
	padding: 1.5rem;
	border-bottom: 1px solid var(--color-border);
	background-color: #f8f9fa;
	border-top-left-radius: 12px;
	border-top-right-radius: 12px;
  }
  
  .modal-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--color-text);
  }
  
  .modal-body {
	padding: 1.5rem;
  }
  
  .modal-footer {
	padding: 1.25rem 1.5rem;
	border-top: 1px solid var(--color-border);
	background-color: #f8f9fa;
	border-bottom-left-radius: 12px;
	border-bottom-right-radius: 12px;
  }
  
  .modal .form-group {
	margin-bottom: 1.25rem;
  }
  
  .modal .form-group:last-child {
	margin-bottom: 0;
  }
  
  .modal .form-control,
  .modal .form-select {
	padding: 0.625rem 0.875rem;
	border-radius: 6px;
	border: 1px solid var(--color-border);
	font-size: 0.95rem;
	transition: all 0.2s ease;
  }
  
  .modal .form-control:focus,
  .modal .form-select:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(16, 78, 151, 0.1);
  }
  
  .modal .form-control[readonly] {
	background-color: #f8f9fa;
	cursor: not-allowed;
  }
  
  .modal .form-control-label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-text-light);
	margin-bottom: 0.5rem;
  }
  
  .modal .close {
	padding: 0;
	position: relative;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(0,0,0,0.05);
	border: none;
	transition: all 0.2s ease;
  }
  
  .modal .close:hover {
	background: rgba(0,0,0,0.1);
  }
  
  .modal .close span {
	font-size: 1.5rem;
	line-height: 1;
	color: var(--color-text-light);
  }
  
  .modal .btn {
	padding: 0.625rem 1.25rem;
	font-weight: 500;
  }
  
  .modal .invalid-feedback {
	font-size: 0.875rem;
	color: #dc3545;
	margin-top: 0.375rem;
  }
  
  /* Forms */
  .form-control, .form-select {
	border: 1px solid var(--color-border);
	border-radius: 6px;
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	transition: all 0.2s ease;
  }
  
  .form-control:focus, .form-select:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(16, 78, 151, 0.1);
  }
  
  .form-control-label {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--color-text-light);
	margin-bottom: 0.5rem;
  }
  
  /* Report Page Styles */
  .report-container {
	padding: 1.5rem 0;
  }
  
  .report-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 2rem;
  }
  
  .report-divider {
	width: 100%;
	height: 1px;
	background: var(--color-border);
	margin: 1.5rem 0;
  }
  
  /* Enhanced Table Styles */
  .report-table {
	background: white;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	margin: 1rem 0;
  }
  
  .report-table thead th {
	background-color: #f8f9fa;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.5px;
	color: var(--color-text-light);
	padding: 1rem;
	border: none;
	white-space: nowrap;
  }
  
  .report-table tbody td {
	padding: 1rem;
	border-bottom: 1px solid var(--color-border);
	font-size: 0.9rem;
  }
  
  .report-table tbody tr:last-child td {
	border-bottom: none;
  }
  
  .report-table tfoot {
	background-color: #f8f9fa;
	font-weight: 600;
  }
  
  .report-table tfoot th {
	padding: 1rem;
	border-top: 2px solid var(--color-border);
  }
  
  /* Numeric Column Alignment */
  .report-table td[data-raw-value],
  .report-table th.numeric {
	text-align: right;
  }
  
  /* Dropdown Menu Enhancements */
.report-dropdown .dropdown-menu {
	padding: 0.5rem;
min-width: 280px;
}

.report-dropdown .dropdown-item {
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-size: 0.9rem;
	color: var(--color-text);
	transition: all 0.2s ease;
}

.report-dropdown .dropdown-item:hover {
	background-color: rgba(0,0,0,0.05);
	color: var(--color-primary);
}

.report-dropdown .dropdown-divider {
	margin: 0.5rem 0;
	border-color: var(--color-border);
	opacity: 0.1;
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter input {
	border: 1px solid var(--color-border);
	border-radius: 6px;
	padding: 0.5rem 1rem;
	margin-left: 0.5rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
	background: var(--color-primary) !important;
	color: white !important;
	border: none !important;
	border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
	background: var(--color-primary) !important;
	color: white !important;
	border: none !important;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
	height: auto;
	padding: 0.75rem 1rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
}

.select2-container--bootstrap-5 .select2-selection {
	border: 1px solid var(--color-border);
	border-radius: 6px;
	min-height: 42px;
	padding: 0.375rem 0.75rem;
 }
 
 .select2-container--bootstrap-5 .select2-selection--single {
	background-color: white;
 }
 
 .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
	color: var(--color-text);
	padding-left: 0;
 }
 
 .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
	color: #6c757d;
 }
 
 .select2-container--bootstrap-5 .select2-dropdown {
	border-color: var(--color-primary);
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
 }
 
 .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
	background-color: var(--color-primary);
	color: white;
 }

/* ==========================================================================
	 Login Screen
	 ========================================================================== */
main.login-screen {
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
}

main.login-screen .row {
	display: flex;
	max-width: 700px;
	background: rgba(255,255,255,0.7);
	border-radius: 20px;
	box-shadow: 0 0 20px rgba(0,0,0,0.04);
	padding: 20px;
}

.login-logo {
	margin: 0 0 20px;
	max-width: 300px;
}

/* ==========================================================================
	 Utilities
	 ========================================================================== */
.gap20 { gap: 20px; }

/* .alert {
	display: inline-block;
	padding: 5px 20px 3px 40px !important;
	border-radius: 50px;
	margin-top: 20px;
	font-weight: 700;
	font-size: 16px;
	text-align: left;
}

.alert::before {
	position: absolute;
	font-family: "Font Awesome 6 Free";
	left: 0;
	top: -8px;
	font-size: 32px;
}

.alert-success {
	color: var(--color-secondary);
	border: 1px solid var(--color-secondary);
}

.alert-danger {
	color: var(--color-accent);
	border: 1px solid var(--color-accent);
} */

.alert {
    display: inline-block;
    padding: 5px 20px 3px 40px !important;
    border-radius: 50px;
    margin-top: 20px;
    font-weight: 700;
    font-size: 16px;
    text-align: left;
    background-color: transparent; /* Dodato */
	position: relative; /* Dodato za pozicioniranje X dugmeta */
	transition: opacity 0.3s, transform 0.3s;
}

.alert::before {
    position: absolute;
    font-family: "Font Awesome 6 Free";
    left: 0;
    top: -8px;
    font-size: 32px;
}

.alert-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}


.alert-dismissible {
    padding-right: 40px !important; /* Prostor za X dugme */
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

.alert.closing {
    animation: fadeOut 0.3s forwards;
}

.alert-success {
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
}

.alert-success::before {
    content: '\f058'; /* Dodato - Font Awesome ikonica za success */
}

.alert-danger {
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.alert-danger::before {
    content: '\f057'; /* Dodato - Font Awesome ikonica za danger */
}

/* Dodati nedostajući stilovi */
.alert-success-link {
    color: var(--color-secondary-dark);
}

.alert-message {
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    background-color: transparent;
}

.alert-message::before {
    content: '\f06a'; /* Font Awesome ikonica za message */
}

.alert-info {
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    background-color: transparent;
}

.alert-info::before {
    content: '\f05a'; /* Font Awesome ikonica za info */
}

	/* ==========================================================================
		Responsive Design
	 ========================================================================== */
@media (max-width: 991px) {
	table.dataTable {
		max-width: 100% !important;
		width: 100% !important;
	}
	
	body:not(.Users2) table#data.dataTable tr {
		display: flex;
		flex-direction: column;
		border-bottom: 10px solid #fff;
	}
	
	.content-section {
	padding-top: 50px;
	background-color: #f5f5f5;
	}
}

@media (max-width: 767px) {
	main.login-screen .row {
		width: auto;
	}
	
	fieldset.form-group {
		max-width: 100%;
		margin: auto;
	}
}

@media (max-width: 575px) {
	body {
		background-color: #f5f5f5;
		padding-left: 0;
		margin-left: 0;
	}
	
	main.container {
		width: auto;
		border: 10px solid #fff;
		background-color: #f5f5f5 !important;
	}
}

/* Loading Animation */
.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.spinner {
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid var(--color-secondary);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 2s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}


.loading-overlay.active {
	opacity: 1;
	pointer-events: all;
}
