/* Hugong Admin Custom CSS */

/* Osnovne boje i varijable */
:root {
    --primary-color: #0077cc;
    --primary-dark: #005fa3;
    --secondary-color: #f8a100;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

/* Opšti stilovi */
body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Header i navbar */
.main-header {
    border-bottom: 1px solid rgba(0,0,0,.125);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    background-color: #fff;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--gray-700);
    padding: 1rem;
    transition: color 0.2s ease;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Sidebar */
.main-sidebar {
    background-color: var(--dark-color);
    box-shadow: 0 0 20px rgba(0,0,0,.1);
    transition: margin-left 0.3s ease-in-out;
}

.sidebar-dark-primary {
    background-color: var(--gray-900);
}

.brand-link {
    border-bottom: 1px solid rgba(255,255,255,.1) !important;
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
}

.brand-link .brand-image {
    max-height: 33px;
    width: auto;
    margin-left: 0.8rem;
    margin-right: 0.5rem;
}

.brand-link .brand-text {
    font-weight: 300;
}

/* Stalno otvoreni menu */
.sidebar {
    padding: 0.5rem 0.5rem;
    overflow-y: auto;
    height: calc(100% - 4.5rem);
}

.nav-sidebar {
    margin-bottom: 1rem;
}

.nav-sidebar .nav-item {
    margin-bottom: 0.2rem;
}

.nav-sidebar .nav-link {
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 0.25rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

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

.nav-sidebar .nav-link.active {
    color: #fff;
    background-color: var(--primary-color);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.nav-sidebar .nav-icon {
    margin-right: 0.5rem;
    text-align: center;
    width: 1.6em;
}

/* Stil za zaglavlja sekcija */
.nav-header {
    background-color: rgba(0, 0, 0, 0.2);
    margin-bottom: 0.25rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.nav-header .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8) !important;
    cursor: default;
}

.nav-header .nav-link:hover {
    background-color: transparent !important;
    cursor: default;
}

.nav-header + .nav-item .nav-link {
    padding-left: 2.25rem;
}

/* Kartice */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0 15px rgba(0,0,0,.05);
    margin-bottom: 1.5rem;
    border: none;
    overflow: hidden;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1.1rem;
}

.card-header .card-tools {
    margin-left: auto;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

/* Tabele */
.table {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.02);
}

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

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-bordered {
    border: 1px solid var(--gray-200);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--gray-200);
}

/* Forme */
.form-group {
    margin-bottom: 1.25rem;
}

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

.form-control {
    border-radius: 0.25rem;
    border: 1px solid var(--gray-300);
    padding: 0.5rem 0.75rem;
    height: calc(2.25rem + 2px);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 119, 204, 0.25);
    border-color: #80bdff;
}

.custom-file-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.custom-file-input:focus ~ .custom-file-label {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 119, 204, 0.25);
}

textarea.form-control {
    height: auto;
    min-height: 100px;
}

select.form-control {
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px 16px;
    appearance: none;
}

/* Dugmad */
.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

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

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

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

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

.btn-info:hover {
    background-color: #138496;
    border-color: #117a8b;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn-tool {
    background-color: transparent;
    color: var(--gray-600);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-tool:hover {
    color: var(--gray-800);
    background-color: var(--gray-100);
}

/* Badgevi i oznake */
.badge {
    font-size: 75%;
    font-weight: 700;
    padding: 0.25em 0.6em;
    border-radius: 0.25rem;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

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

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

.badge-warning {
    background-color: var(--warning-color);
    color: var(--gray-900);
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

/* Notifikacije i alert-i */
.alert {
    border-radius: 0.25rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert-dismissible .close {
    padding: 0.75rem 1.25rem;
    top: 0;
    right: 0;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Footer */
.main-footer {
    padding: 1rem;
    color: var(--gray-600);
    border-top: 1px solid var(--gray-200);
    background-color: white;
    font-size: 0.9rem;
}

.main-footer a {
    color: var(--primary-color);
}

/* Content Wrapper */
.content-wrapper {
    background-color: #f4f6f9;
    padding: 1.5rem 0.5rem;
}

.content-header {
    padding: 0 0.5rem 1.5rem 0.5rem;
}

.content-header h1 {
    font-size: 1.8rem;
    margin: 0;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Dashboard stilovi */
.small-box {
    border-radius: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    position: relative;
    display: block;
    transition: transform 0.2s ease;
}

.small-box:hover {
    transform: translateY(-5px);
}

.small-box .inner {
    padding: 20px 15px;
}

.small-box h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.small-box p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.small-box .icon {
    color: rgba(0, 0, 0, 0.15);
    font-size: 70px;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 0;
}

.small-box .small-box-footer {
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.8);
    display: block;
    padding: 3px 0;
    position: relative;
    text-align: center;
    text-decoration: none;
    z-index: 10;
}

.small-box .small-box-footer:hover {
    background-color: rgba(0, 0, 0, 0.15);
    color: #fff;
}

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

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

.bg-warning {
    background-color: var(--warning-color) !important;
    color: var(--gray-900) !important;
}

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

/* Dropzone styling */
.dropzone {
    border: 2px dashed var(--gray-300);
    border-radius: 0.5rem;
    background-color: var(--gray-100);
    padding: 20px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dropzone:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 119, 204, 0.05);
}

.dropzone .dz-message {
    margin: 0;
    text-align: center;
    color: var(--gray-600);
}

.dropzone .dz-preview {
    margin: 10px;
}

.dropzone .dz-image {
    border-radius: 5px;
    overflow: hidden;
}

.dropzone .dz-remove {
    color: var(--danger-color);
    margin-top: 5px;
    display: inline-block;
}

/* Paginacija */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem;
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: var(--gray-500);
    pointer-events: none;
    background-color: #fff;
    border-color: var(--gray-300);
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--primary-color);
    background-color: #fff;
    border: 1px solid var(--gray-300);
}

.page-link:hover {
    z-index: 2;
    color: var(--primary-dark);
    text-decoration: none;
    background-color: var(--gray-200);
    border-color: var(--gray-300);
}

/* Responsiveness */
@media (max-width: 992px) {
    .content-wrapper, .main-footer {
        margin-left: 0;
    }
    
    .main-sidebar {
        margin-left: -250px;
    }
    
    .sidebar-open .main-sidebar {
        margin-left: 0;
    }
    
    .small-box h3 {
        font-size: 1.5rem;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table td, .table th {
        padding: 0.5rem;
    }
    
    .small-box .inner {
        padding: 15px 10px;
    }
    
    .small-box h3 {
        font-size: 1.2rem;
    }
    
    .small-box .icon {
        font-size: 50px;
    }
}