/* C:\Users\Korisnik\Desktop\CLAUDE\DGU\app\style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0b0f19;
    --bg-card: #131a26;
    --bg-header: rgba(19, 26, 38, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card-glow: rgba(59, 130, 246, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

nav a:hover, nav a.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Container & Grid Layout */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Main Dashboard Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

/* Cards & Sections */
.section-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.75rem;
    margin-bottom: 2rem;
}

/* Global Search Bar */
.search-container {
    margin-bottom: 2.5rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem 1.25rem 1rem 3rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-family: inherit;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-secondary);
    font-size: 1.25rem;
}

/* Table Style */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.02);
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

td a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

td a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.badge-purple {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.badge-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

/* List details */
.details-list {
    list-style: none;
}

.details-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.details-list li:last-child {
    border-bottom: none;
}

.details-list .label {
    color: var(--text-secondary);
}

.details-list .val {
    font-weight: 500;
}

/* Map page layout */
.map-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: 750px;
    gap: 1.5rem;
    height: 750px;
}

@media (max-width: 900px) {
    .map-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.map-sidebar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.map-sidebar-list {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.list-item {
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.list-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.list-item.active {
    background-color: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

.list-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.list-item-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Map wrapper */
.map-container-wrapper {
    position: relative;
    height: 100%;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#map {
    width: 100%;
    height: 100%;
    min-height: 750px;
    background-color: #0b0f19;
}

/* Map details box overlay */
.map-overlay-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    width: 320px;
    background-color: rgba(19, 26, 38, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    display: none;
}

.map-overlay-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.15rem;
}

.map-overlay-close:hover {
    color: var(--text-primary);
}

/* Custom leaflet style override */
.leaflet-bar {
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
}

.leaflet-bar a {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    transition: var(--transition);
}

.leaflet-bar a:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.leaflet-container {
    font-family: inherit !important;
}

.leaflet-tooltip.ulica-label {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 3px #000;
    pointer-events: none;
}

.leaflet-tooltip.ulica-label::before {
    display: none;
}

/* Input/Form controls */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.select-control {
    width: 100%;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.select-control:focus {
    border-color: var(--accent-blue);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
}

.pagination a, .pagination span {
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.pagination a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--text-secondary);
}

.pagination span.current {
    color: var(--text-primary);
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    font-weight: 600;
}

/* DataTables dark theme integration */
.dataTables_wrapper {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dt-search,
.dt-length {
    margin-bottom: 1rem;
}

.dt-search input,
.dt-length select {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-family: inherit;
    margin-left: 0.4rem;
}

.dt-search input:focus,
.dt-length select:focus {
    outline: none;
    border-color: var(--accent-blue);
}

table.dataTable th,
table.dataTable td {
    border-bottom: 1px solid var(--border-color);
}

.dt-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-top: 1rem;
}

.dt-paging .dt-paging-button {
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.75rem !important;
    margin: 0 0.15rem;
    background: transparent !important;
}

.dt-paging .dt-paging-button:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: var(--text-secondary) !important;
}

.dt-paging .dt-paging-button.current {
    color: var(--text-primary) !important;
    background: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
}

.dt-paging .dt-paging-button.disabled {
    opacity: 0.4;
}
