/* GLOBALNI STILOVI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
   font-family: 'Inter', sans-serif;
   margin: 0;
   background: #f5f7fa;
   /* Glavna pozadina stranice */
   color: #333;
   min-height: 100vh;
   display: flex;
   flex-direction: column;
   overflow-x: hidden;
}

main,
.container {
   flex: 1 0 auto;
}

.main-footer {
   flex-shrink: 0;
}

/* 1) GLAVNI PRIKAZ (CONTAINER) - ISPUPČENI DIO */
.container {
   max-width: 1400px;
   width: 94%;
   margin: 30px auto;
   position: relative;

   /* STIL ZA ISPUPČENI KONTEJNER */
   padding: 20px;
   background: white;
   border-radius: 15px;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

   flex-grow: 1;
}

/* Reusable error page layout */
.error-page {
   text-align: center;
   padding: 60px 20px;
}

.error-page .error-icon {
   font-size: 3rem;
   color: #f59e0b;
   margin-bottom: 20px;
}

.error-mascot {
   margin-bottom: 24px;
}

.error-mascot-face {
   width: 120px;
   height: 120px;
   margin: 0 auto 10px;
   border-radius: 50%;
   background: #eff6ff;
   border: 3px solid #bfdbfe;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   position: relative;
}

.error-mascot-face .eye {
   position: absolute;
   top: 40%;
   font-size: 1.6rem;
   color: #1f2937;
}

.error-mascot-face .left-eye {
   left: 32%;
}

.error-mascot-face .right-eye {
   right: 32%;
}

.error-mascot-face .mouth {
   position: absolute;
   bottom: 30%;
   font-size: 1.4rem;
   color: #1f2937;
}

.error-mascot-text {
   margin: 0;
   font-size: 0.95rem;
   color: #4b5563;
}

.error-page h1 {
   font-size: 1.9rem;
   margin-bottom: 10px;
   color: #111827;
}

.error-page .error-text {
   max-width: 520px;
   margin: 0 auto 25px;
   color: #6b7280;
}

/* Stilovi za flash poruke (Nepromijenjeno) */
.flash-messages {
   position: fixed;
   top: 60px;
   left: 50%;
   transform: translateX(-50%);
   width: 90%;
   max-width: 500px;
   z-index: 10000;
   padding: 0;
   list-style: none;
}

.flash-message {
   padding: 12px 20px;
   margin-bottom: 10px;
   border-radius: 8px;
   font-size: 0.95rem;
   font-weight: 600;
   text-align: center;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flash-message.success {
   background-color: #d4edda;
   color: #155724;
   border: 1px solid #c3e6cb;
}

.flash-message.error,
.flash-message.danger {
   background-color: #f8d7da;
   color: #721c24;
   border: 1px solid #f5c6cb;
}

.flash-message.info {
   background-color: #d1ecf1;
   color: #0c5460;
   border: 1px solid #bee5eb;
}


/* NEW HEADER STILOVI */
.main-header {
   background: #1f2937;
   padding: 0;
   border-radius: 0 0 15px 15px;
   box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 0 24px;   /* No padding to shrink the bar */
   max-width: 1400px;
   margin: 0 auto;
   height: 70px;     /* Small fixed height */
}

.header-left {
   flex-shrink: 0;
}

.mini-logo {
   height: 45px;    /* Reduced from 80px */
   transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
   margin: -5px 0;
   transform: translateY(5px); /* Adjusted for new size */
   z-index: 100;
   position: relative;
}

.mini-logo:hover {
   transform: scale(1.1) rotate(2deg);
   filter: drop-shadow(0 8px 12px rgba(0,0,0,0.3));
}

.header-nav {
   display: flex;
   gap: 25px;
   align-items: center;
}

.nav-link {
   text-decoration: none;
   color: #e5e7eb;
   font-weight: 600;
   font-size: 0.95rem;
   transition: color 0.2s;
}

.nav-link:hover {
   color: #2563eb;
}

.header-default-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.header-default-content.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-5px);
}

.header-search-takeover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.98); /* Deep dark blue with slight transparency */
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10000; /* Over everything */
}

.header-search-takeover.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.search-takeover-container {
    width: 100%;
    max-width: 800px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.search-takeover-form {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.search-takeover-form .search-icon {
    color: #9ca3af;
    font-size: 1.5rem;
}

.search-takeover-form input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem; /* Larger font for full-page search */
    font-weight: 700;
    font-family: 'Syne', sans-serif;
    outline: none;
    padding: 15px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
}

.search-takeover-form input:focus {
    border-bottom-color: #2563eb;
}

.search-takeover-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.search-close-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10001;
}

.search-close-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.search-takeover-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 0.8s ease forwards 0.3s;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-popular-categories {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: fadeIn 0.8s ease forwards 0.5s;
    opacity: 0;
}

.search-popular-categories span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.category-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.cat-tag {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.cat-tag:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.header-search-trigger {
    background: transparent;
    border: none;
    color: #e5e7eb;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.header-search-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Global Map Button */
.global-map-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #10b981;
    color: white;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.global-map-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
    color: white;
}

.global-map-btn i {
    font-size: 1.1rem;
}

.header-right {
   flex-shrink: 0;
}

.user-profile-menu {
   position: relative;
}

.profile-trigger {
   cursor: pointer;
   display: flex;
   align-items: center;
}

.profile-thumb-new {
   width: 40px;
   height: 40px;
   border-radius: 50%;
   object-fit: cover;
   border: 2px solid transparent;
   transition: transform 0.2s, border-color 0.2s;
}

.profile-thumb-new:hover {
   transform: scale(1.08);
   border-color: #2563eb;
}

.default-profile-icon {
   font-size: 36px;
   color: #fff;
   transition: transform 0.2s;
}

.default-profile-icon:hover {
   transform: scale(1.1);
}

.profile-dropdown-content {
   display: none;
   position: absolute;
   top: 100%;
   right: 0;
   background: white;
   min-width: 200px;
   box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
   border-radius: 12px;
   padding: 8px 0;
   z-index: 1000;
   margin-top: 10px;
}

.profile-dropdown-content a {
   display: flex;
   align-items: center;
   gap: 12px;
   padding: 12px 20px;
   color: #333;
   text-decoration: none;
   font-size: 0.95rem;
   transition: background 0.2s;
}

.profile-dropdown-content a:hover {
   background: #f1f5f9;
   color: #2563eb;
}

.profile-dropdown-content hr {
   margin: 8px 0;
   border: none;
   border-top: 1px solid #eee;
}

.logout-link {
   color: #dc2626 !important;
}

.profile-dropdown-content.show {
   display: block;
}

@media (max-width: 768px) {
   .header-container {
      padding: 12px 16px;
   }

   .header-nav {
      display: none;
      /* Hide nav on mobile for burger or similar later */
   }

   .mini-logo {
      height: 28px;
   }
}


/* STILOVI ZA IKONE */
.profile-icon {
   width: 40px;
   height: 40px;
   border-radius: 50%;
   background-color: #e5e7eb;
   color: #6c757d;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 20px;
   cursor: pointer;
   transition: transform 0.2s;
   border: 2px solid transparent;
}

.profile-icon:hover {
   transform: scale(1.1);
   border-color: #2563eb;
}

/* Stil za PFP u nameplateu i dropdownu */
.user-profile-card {
   width: 32px;
   height: 32px;
   border-radius: 50%;
   object-fit: cover;
   background-color: #e5e7eb;
   color: #6c757d;
   display: block;
}


/* --- 1. GUMB 'DODAJ NOVU PRIJAVU' (FAB) - KRUG S HOVER EFEKTOM --- */
#add-complaint-btn {
   position: fixed !important;
   right: 30px !important;
   bottom: 30px !important;
   z-index: 1000 !important;

   /* INICIJALNO: SAVRŠEN KRUG */
   width: 60px !important;
   height: 60px !important;
   padding: 0 !important;
   border-radius: 50% !important;

   background-color: #2563eb !important;
   color: white !important;
   border: none !important;

   display: flex !important;
   justify-content: center !important;
   align-items: center !important;

   font-size: 1rem !important;
   font-weight: 600 !important;
   box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
   cursor: pointer !important;
   transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;

   /* Tekst (Podnesi prijavu) je inicijalno skriven */
   overflow: hidden;
   white-space: nowrap;

   /* Poravnanje za širenje */
   text-align: left !important;
}

#add-complaint-btn .add-icon {
   /* Plus ikona je u centru inicijalno */
   margin-right: 0px;
   font-size: 1.56rem !important;
   /* Slightly larger plus */
   color: white !important;
   transition: all 0.3s ease;
   min-width: 60px;
   /* fills the circle width */
   display: flex;
   justify-content: center;
   align-items: center;
   flex-shrink: 0;
}

#add-complaint-btn .btn-text {
   opacity: 0;
   width: 0;
   /* Prevents text from pushing the icon off-center */
   overflow: hidden;
   transition: opacity 0.2s ease, width 0.3s ease;
   white-space: nowrap;
}

/* HOVER EFEKT: Krug se proširuje i prikazuje tekst */
#add-complaint-btn:hover {
   width: 220px !important;
   border-radius: 30px !important;
   background-color: #1a4fbe !important;
   box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
   justify-content: flex-start !important;
}

#add-complaint-btn:hover .add-icon {
   min-width: 45px;
   margin-left: 10px;
}

#add-complaint-btn:hover .btn-text {
   opacity: 1;
   width: auto;
   margin-right: 15px;
}


/* Unified Complaint Card Styles */
/* --- NEW PREMIUM COMPLAINT CARD DESIGN --- */
.complaint-grid {
    max-width: 680px;
    margin: 40px auto;
    padding: 0 16px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.complaint-card {
    width: 100%;
    max-width: 100%;
    background: #FDFCFA;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    overflow: visible;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.complaint-card:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.card-image-wrapper {
    width: 100%;
    height: 240px; /* Smanjena visina za kompaktni izgled */
    background: #E8E4DC;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.complaint-card:hover .card-image {
    transform: scale(1.05);
}

.rank-badge {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 65px;
    z-index: 20;
    filter: drop-shadow(0 8px 15px rgba(0,0,0,0.15));
    pointer-events: none;
}

.card-status-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1A1814;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 10;
}

.card-status-badge.resolved {
    color: #2D8A56;
}

.card-content-bottom {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(212, 82, 42, 0.08);
    color: #D4522A;
    padding: 4px 10px;
    border-radius: 5px;
}

.card-date, .card-stats {
    font-size: 12px;
    color: #A8A49E;
    font-weight: 400;
}

.card-stats i {
    color: #E02424;
    margin-right: 4px;
}

.card-text-info {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: 'Syne', sans-serif !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    color: #1A1814 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.card-reporter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.04);
}

.reporter-pfp-wrapper {
    position: relative;
    width: 36px;
    height: 36px;
}

.reporter-pfp {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.reporter-badges {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    z-index: 5;
}

.card-mini-badge {
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    padding: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-username-link {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #1A1814 !important;
    text-decoration: none;
}

.card-username-link:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out both;
}

@media (max-width: 768px) {
    .complaint-card {
        max-width: 100%;
    }
    .card-image-wrapper {
        height: 200px;
    }
    .card-title {
        font-size: 18px !important;
    }
}



/* --- MODERN MODAL RE-DESIGN --- */
.modal {
   display: none;
   position: fixed;
   z-index: 2000;
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   background: rgba(15, 23, 42, 0.75);
   backdrop-filter: blur(8px);
   opacity: 0;
   transition: opacity 0.3s ease;
   justify-content: center;
   align-items: flex-start;
   overflow-y: auto;
   padding: 40px 20px;
}

.modal.show {
   display: flex;
   opacity: 1;
}

.modal-content {
   background: white;
   width: 90%;
   max-width: 900px;
   max-height: calc(100vh - 80px); /* Leave space for padding */
   border-radius: 20px;
   padding: 0;
   overflow: hidden;
   display: flex;
   flex-direction: row; /* Horizontal split: Form | Preview */
   box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
   transform: scale(0.95);
   transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
   transform: scale(1);
}

.modal-form-side {
   flex: 1;
   padding: 30px;
   background: white;
   overflow-y: auto; /* Allow form side to scroll if too tall */
}

.modal-preview-side {
   flex: 0.8;
   padding: 30px;
   background: #f8fafc;
   border-left: 1px solid #e2e8f0;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   overflow-y: auto; /* Also allow preview side to scroll */
}

.modal-preview-side h3 {
   margin-bottom: 20px;
   color: #64748b;
   font-size: 0.9rem;
   text-transform: uppercase;
   letter-spacing: 0.05em;
   font-weight: 700;
}

.close-btn {
   position: absolute;
   top: 15px;
   right: 20px;
   font-size: 24px;
   color: #94a3b8;
   cursor: pointer;
   transition: color 0.2s, transform 0.2s;
   z-index: 10;
}

.close-btn:hover {
   color: #1e293b;
   transform: rotate(90deg);
}

.modal-form-side h2 {
   margin-bottom: 25px;
   font-size: 1.5rem;
   font-weight: 700;
   color: #0f172a;
}

.form-group {
   margin-bottom: 20px;
}

.form-group label {
   display: block;
   margin-bottom: 6px;
   font-size: 0.9rem;
   font-weight: 600;
   color: #475569;
}

.input-container {
   position: relative;
}

.input-container i {
   position: absolute;
   left: 12px;
   top: 50%;
   transform: translateY(-50%);
   color: #94a3b8;
}

.input-container input, 
.input-container textarea {
   width: 100%;
   padding: 10px 12px 10px 38px;
   border: 1px solid #e2e8f0;
   border-radius: 10px;
   font-size: 0.95rem;
   transition: all 0.2s;
   background: #fdfdfd;
}

.input-container input:focus, 
.input-container textarea:focus {
   border-color: #3b82f6;
   background: white;
   box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
   outline: none;
}

.input-container textarea {
   min-height: 100px;
   padding-top: 12px;
   resize: none;
}

/* File Upload Enhancement */
.file-upload-wrapper {
   border: 2px dashed #e2e8f0;
   border-radius: 12px;
   padding: 20px;
   text-align: center;
   cursor: pointer;
   transition: all 0.2s;
   background: #f8fafc;
}

.file-upload-wrapper:hover {
   border-color: #3b82f6;
   background: #eff6ff;
}

.file-upload-wrapper.dragging {
   border-color: #3b82f6;
   background: #eff6ff;
   transform: scale(1.02);
}

.file-upload-wrapper i {
   font-size: 1.5rem;
   color: #64748b;
   margin-bottom: 10px;
   display: block;
}

.file-upload-wrapper span {
   font-size: 0.85rem;
   color: #64748b;
   font-weight: 500;
}

.file-upload-wrapper input {
   display: none;
}

#submit-complaint-btn {
   width: 100%;
   padding: 12px;
   background: #3b82f6;
   color: white;
   border: none;
   border-radius: 10px;
   font-size: 1rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s;
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 8px;
}

#submit-complaint-btn:hover {
   background: #2563eb;
   transform: translateY(-2px);
   box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

#submit-complaint-btn:active {
   transform: translateY(0);
}

#submit-complaint-btn:disabled {
   background: #94a3b8;
   cursor: not-allowed;
   transform: none;
   box-shadow: none;
}

/* Responsive adjustments */
@media (max-width: 850px) {
   .modal-content {
      flex-direction: column;
      max-width: 500px;
      margin-top: 20px;
      margin-bottom: 20px;
   }
   .modal-preview-side {
      display: none; /* Hide preview on mobile to save space */
   }
}

/* Leaflet Map Specific Fixes */
#location-map {
    background: #f1f5f9;
    position: relative;
    z-index: 10;
}

.leaflet-container {
    font-family: 'Inter', sans-serif !important;
}

/* Ensure tiles are visible */
.leaflet-tile-pane {
    z-index: 2 !important;
}

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }
.leaflet-map-pane img    { z-index: 300; }
.leaflet-pane { z-index: 400; }

/* Status Message Refinement */
#status-message {
   position: fixed;
   bottom: 100px;
   left: 50%;
   transform: translateX(-50%) translateY(50px);
   z-index: 3000;
   padding: 14px 28px;
   border-radius: 50px;
   font-weight: 600;
   box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
   opacity: 0;
   visibility: hidden;
   transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#status-message.show {
   opacity: 1;
   visibility: visible;
   transform: translateX(-50%) translateY(0);
}

#status-message.status-success {
   background-color: #d4edda;
   color: #155724;
}

#status-message.status-error {
   background-color: #f8d7da;
   color: #721c24;
}

#status-message.show {
   display: block;
}


/* FOOTER STILOVI - Modernizirano */
.main-footer {
   background-color: #111827;
   color: #e5e7eb;
   padding: 3rem 0;
   margin-top: 5rem;
   border-top: 1px solid #374151;
}

.footer-container {
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 2rem;
}

.footer-top {
   display: flex;
   justify-content: center;
   margin-bottom: 2rem;
}

.back-to-top-btn {
   background: #374151;
   color: white;
   width: 45px;
   height: 45px;
   border-radius: 50%;
   display: flex;
   justify-content: center;
   align-items: center;
   text-decoration: none;
   transition: all 0.3s ease;
   border: 1px solid #4b5563;
}

.back-to-top-btn:hover {
   background: #2563eb;
   transform: translateY(-5px);
   box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.footer-content {
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   gap: 2rem;
   flex-wrap: wrap;
}

.footer-legal-links {
   margin-top: 10px;
   font-size: 0.85em;
}

.footer-legal-links a {
   color: #bbb;
   text-decoration: none;
   margin-right: 15px;
   transition: color 0.2s;
}

.footer-legal-links a:hover {
   color: white;
}


.footer-info {
   flex: 1;
   min-width: 300px;
}

.footer-info p {
   margin: 0.5rem 0;
   color: #9ca3af;
   line-height: 1.6;
}

.footer-disclaimer {
   font-size: 0.8rem !important;
   color: #6b7280 !important;
   margin-top: 1rem !important;
   font-style: italic;
   max-width: 600px;
}

.footer-support {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-top: 0.8rem !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-support a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.footer-support a:hover {
    color: #2563eb;
}

.footer-support i {
    color: #2563eb;
}

.footer-social {
   display: flex;
   gap: 1.5rem;
   align-items: center;
   justify-content: flex-end;
}

.footer-social a {
   transition: transform 0.2s ease, opacity 0.2s ease;
   display: block;
   width: 32px;
   height: 32px;
}

.footer-social a img {
   width: 100%;
   height: 100%;
   filter: brightness(0) invert(1);
   /* Pretvara šarene SVG-ove u bijele za tamni footer */
   opacity: 0.8;
   transition: opacity 0.2s, filter 0.2s;
}

.footer-social a:hover {
   transform: scale(1.2);
}

.footer-social a:hover img {
   opacity: 1;
   filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

@media (max-width: 768px) {
   .footer-content {
      flex-direction: column;
      align-items: center;
      text-align: center;
   }

   .footer-social {
      justify-content: center;
      margin-top: 1.5rem;
   }

   .footer-info {
      min-width: 100%;
   }
}


/* MEDIA QUERIES ZA RESPONSIVNI GRID */

/* Standardni desktop i veći (992px i više): 3 kartice po redu (Želja) */
@media (min-width: 992px) {
   .complaint-grid {
      grid-template-columns: repeat(3, 1fr);
   }
}

/* Tableti (768px - 991px): 2 kartice po redu */
@media (min-width: 768px) and (max-width: 991px) {
   .complaint-grid {
      grid-template-columns: repeat(2, 1fr);
   }

   .complaint-card {
      height: auto;
   }
}

/* Mobiteli (manje od 768px): 1 kartica po redu */
@media (max-width: 767px) {
   .container {
      width: 95%;
      padding: 15px;
   }

   .complaint-grid {
      grid-template-columns: 1fr;
      gap: 25px;
   }

   .complaint-card {
      height: auto;
   }

   .card-nameplate {
      height: 40px;
      padding: 0 8px;
   }

   .complaint-title-nameplate {
      font-size: 0.9rem;
   }

   /* FAB gumb za mobitele (mali krug koji se ne širi) */
   #add-complaint-btn {
      width: 50px !important;
      height: 50px !important;
      right: 20px !important;
      left: auto !important;
      bottom: 20px !important;
      font-size: 0.85rem !important;
      padding: 0 !important;
      text-indent: 0 !important;
   }

   #add-complaint-btn .add-icon {
      font-size: 1.3rem !important;
      margin-right: 0px;
   }

   #add-complaint-btn:hover {
      width: 50px !important;
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3) !important;
      transform: scale(1.05);
      text-indent: 0 !important;
      justify-content: center !important;
      padding-left: 0 !important;
   }

   #add-complaint-btn:hover .add-icon {
      margin-right: 0px;
   }
}

/* --- SEARCH & FILTERS --- */
.new-complaint-section {
   display: flex;
   flex-direction: column;
   align-items: center;
   margin-bottom: 40px;
   gap: 20px;
}

.search-form {
   display: flex;
   justify-content: center;
   width: 100%;
   max-width: 580px;
   margin: 0 auto;
}

.search-input-group {
   position: relative;
   width: 100%;
   display: flex;
   align-items: center;
   background: #f0f2f5;
   border-radius: 50px;
   padding: 0 15px;
   transition: all 0.3s ease;
}

.search-input-group:focus-within {
   background: #e4e6eb;
   box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.search-icon {
   color: #65676b;
   font-size: 1rem;
   margin-right: 8px;
}

.search-input {
   width: 100%;
   padding: 12px 0;
   border: none;
   background: transparent;
   font-size: 0.95rem;
   color: #1c1e21;
}

.search-input::placeholder {
   color: #65676b;
}

.search-input:focus {
   outline: none;
}

.clear-search {
   color: #65676b;
   text-decoration: none;
   font-size: 1.1rem;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 24px;
   height: 24px;
   border-radius: 50%;
   transition: background 0.2s;
}

.clear-search:hover {
   background: #e4e6eb;
   color: #1c1e21;
}

/* Hide old search button as it's removed from HTML but kept here for fallback safety if needed elsewhere */
.search-btn {
   display: none;
}

.filter-bar {
   display: flex;
   gap: 12px;
   flex-wrap: wrap;
   justify-content: center;
}

.filter-btn {
   padding: 8px 20px;
   border-radius: 20px;
   background: white;
   border: 1px solid #e2e8f0;
   color: #64748b;
   font-size: 0.9rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.2s;
   text-decoration: none;
}

.filter-btn:hover {
   border-color: #cbd5e1;
   background: #f8fafc;
}

.filter-btn.active {
   background: #2563eb;
   color: white;
   border-color: #2563eb;
   box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

@media (max-width: 640px) {
   .search-form {
      flex-direction: column;
      padding: 0 10px;
   }

   .search-btn {
      padding: 12px;
   }

   .filter-bar {
      gap: 8px;
   }

   .filter-btn {
      padding: 6px 14px;
      font-size: 0.85rem;
   }
}