/* =============================
   GeoTracker – style globalne
   ============================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface2: #273549;
    --border: #334155;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --success: #22c55e;
    --error: #ef4444;
    --warn: #f59e0b;
    --radius: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,.4);
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ---- Nav ---- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: .5px;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 24px;
    font-size: .95rem;
    transition: color .2s;
}

    .nav-links a:hover {
        color: var(--accent);
    }

/* ---- Layout ---- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: .82rem;
    border-top: 1px solid var(--border);
}

/* ---- Hero ---- */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
}

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .hero p {
        color: var(--muted);
        margin-bottom: 28px;
    }

    .hero a {
        color: var(--accent);
    }

/* ---- Buttons ---- */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-weight: 600;
}

    .btn-primary:hover {
        background: var(--accent-hover);
    }

    .btn-primary:active {
        transform: scale(.97);
    }

    .btn-primary:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

/* ---- Status ---- */
.status-box {
    margin: 20px auto;
    max-width: 600px;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: .95rem;
}

.status-info {
    background: #1e3a5f;
    border: 1px solid #3b82f6;
    color: #93c5fd;
}

.status-success {
    background: #14532d;
    border: 1px solid #22c55e;
    color: #86efac;
}

.status-error {
    background: #450a0a;
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.status-warn {
    background: #431407;
    border: 1px solid #f59e0b;
    color: #fcd34d;
}

.hidden {
    display: none !important;
}

/* ---- Card ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin: 28px auto;
    max-width: 760px;
    box-shadow: var(--shadow);
}

    .card h2 {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

/* ---- Info table (single record) ---- */
.info-table {
    width: 100%;
    border-collapse: collapse;
}

    .info-table th, .info-table td {
        padding: 10px 14px;
        text-align: left;
        border-bottom: 1px solid var(--border);
    }

    .info-table th {
        color: var(--muted);
        font-weight: 500;
        width: 160px;
    }

    .info-table td {
        font-family: monospace;
        font-size: .95rem;
    }

.saved-info {
    margin-top: 16px;
    color: var(--success);
    font-size: .9rem;
}

/* ---- Map containers ---- */
.map-container {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin: 20px auto;
    max-width: 760px;
    height: 360px;
}

.map-fullpage {
    max-width: 100%;
    height: 500px;
    margin: 0 0 24px;
    border-radius: var(--radius);
}

/* ---- Page header ---- */
.page-header {
    margin-bottom: 24px;
}

    .page-header h1 {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }

    .page-header p {
        color: var(--muted);
    }

/* ---- Data table ---- */
.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

    .data-table thead th {
        background: var(--surface2);
        padding: 10px 12px;
        text-align: left;
        color: var(--muted);
        font-weight: 600;
        border-bottom: 2px solid var(--border);
        white-space: nowrap;
    }

    .data-table tbody tr {
        border-bottom: 1px solid var(--border);
        transition: background .15s;
    }

        .data-table tbody tr.log-row {
            cursor: pointer;
        }

        .data-table tbody tr:hover {
            background: var(--surface2);
        }

    .data-table td {
        padding: 9px 12px;
        vertical-align: top;
    }

.addr-cell {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--muted);
}

.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 32px 0;
}

    .empty-state a {
        color: var(--accent);
    }
