:root {
    --primary: #0f172a;
    --primary-light: #1e3a8a;
    --secondary: #0284c7;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.5;
}

/* Navigace */
nav {
    background-color: var(--primary);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: white;
}

.nav-user {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-light), #0369a1);
    color: white;
    padding: 3.5rem 2rem;
    text-align: center;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.05rem;
    color: #e2e8f0;
    max-width: 760px;
    margin: 0 auto 1.5rem auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1000px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Karty */
.card {
    background: var(--card-bg);
    padding: 1.75rem;
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.75rem;
    border: 1px solid var(--border-color);
    display: block;
    text-decoration: none;
    color: var(--text-main);
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

h2 {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.section-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.quick-card {
    margin-bottom: 0;
}

.quick-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Filtrační tlačítka */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.filter-btn {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Checklist */
.checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.todo-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 15px;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.todo-item.cat-volby { border-left-color: var(--accent); }
.todo-item.cat-skolstvi { border-left-color: #a855f7; }
.todo-item.cat-odpady { border-left-color: var(--success); }
.todo-item.cat-majetek { border-left-color: #64748b; }

.todo-item form {
    display: contents;
}

.todo-checkbox {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    accent-color: var(--secondary);
    margin-top: 2px;
}

.todo-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
    margin-bottom: 0.15rem;
}

.todo-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.todo-meta strong {
    color: var(--text-main);
}

.todo-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-urgent { background: #fee2e2; color: var(--danger); }
.badge-info { background: #e0f2fe; color: var(--secondary); }
.badge-warning { background: #fef3c7; color: #d97706; }

.todo-item.completed {
    opacity: 0.6;
    border-left-color: #cbd5e1 !important;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
}

/* Dotace */
.subsidy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.subsidy-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--secondary);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sub-provider {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-title {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--primary);
    margin: 0.25rem 0 0.75rem 0;
    line-height: 1.3;
}

.sub-details {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    background: white;
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.sub-details p {
    margin-bottom: 0.25rem;
}

.sub-details p:last-child { margin-bottom: 0; }

.btn-apply {
    display: block;
    background: var(--primary-light);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-apply:hover { background: var(--secondary); }

/* Galerie inspirace */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-card {
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.gallery-img-container {
    position: relative;
    height: 160px;
    background: #e2e8f0;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
}

.gallery-info {
    padding: 1.15rem;
}

.gallery-info h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gallery-info p {
    font-size: 0.86rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.gallery-funding {
    font-size: 0.78rem;
    background: #f0fdf4;
    color: #166534;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
}

/* Kalendář */
.calendar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.calendar-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-control h3 {
    font-size: 1.05rem;
    color: var(--primary);
    font-weight: 700;
}

.calendar-btn {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    margin-bottom: 1rem;
}

.cal-day-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 4px 0;
}

.cal-day {
    font-size: 0.82rem;
    padding: 8px 2px;
    background: var(--light-bg);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day.empty {
    background: transparent;
    cursor: default;
}

.cal-day.has-event-volby::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.cal-day.has-event-schuze::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; background: var(--secondary); border-radius: 50%; }
.cal-day.has-event-vystavba::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; background: var(--success); border-radius: 50%; }
.cal-day.has-event-jine::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; background: var(--text-muted); border-radius: 50%; }

.cal-day.selected {
    background: var(--primary-light) !important;
    color: white;
    font-weight: 700;
}

.event-box {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.event-list-sidebar {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-sidebar-item {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    background: white;
    border-radius: 4px;
    border-left: 3px solid var(--secondary);
}

/* Aktuality */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-feed-item {
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color);
}

.news-feed-item:last-child { border-bottom: none; padding-bottom: 0; }

.news-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.news-h3 {
    font-size: 0.92rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.news-p {
    font-size: 0.84rem;
    line-height: 1.4;
}

/* Formuláře */
.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.75rem;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.75rem;
}

.form-card label {
    font-weight: 600;
    margin-top: 10px;
    font-size: 0.9rem;
}

.form-card input,
.form-card select,
.form-card textarea {
    padding: 9px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-card button {
    margin-top: 16px;
    align-self: flex-start;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500 !important;
    margin-top: 0 !important;
}

/* Tlačítka */
.button, button {
    display: inline-block;
    background: var(--primary-light);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
}

.button:hover, button:hover {
    background: var(--secondary);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.button-link {
    background: none;
    color: var(--danger);
    padding: 0;
    font-size: 0.85rem;
    text-decoration: underline;
}

.button-link:hover {
    background: none;
    color: #991b1b;
}

/* Flash zprávy */
.flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.flash-success {
    background: #e6f4ea;
    color: #1f7a4d;
    border: 1px solid #b7dcc4;
}

.flash-error {
    background: #fbe9e7;
    color: var(--danger);
    border: 1px solid #f0b8b3;
}

.flash ul {
    margin: 0;
    padding-left: 20px;
}

/* Tabulky */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

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

.data-table th {
    background: var(--light-bg);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Vlákna diskuze */
.thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
}

.thread-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
}

.thread-meta {
    margin: 0 0 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-footer {
    padding: 20px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.contact-section {
    text-align: center;
}

.contact-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.contact-item:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.contact-icon {
    font-size: 1.1rem;
}
