/* /home/epik/Development/farma/style.css */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --bg-color: #f5f6fa;
    --text-color: #2c3e50;
    --white: #ffffff;
    --border-radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.site-logo {
    height: 32px;
    width: auto;
    vertical-align: middle;
    margin-right: 10px;
}

header a {
    color: var(--white);
    text-decoration: none;
    font-weight: bold;
}

header .main-nav {
    display: flex;
    gap: 15px;
    margin-left: 30px;
}
header .main-nav a {
    font-size: 1.5rem;
    text-decoration: none;
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s;
}
header .main-nav a:hover {
    opacity: 1;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h2 {
    margin-top: 0;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
    color: var(--secondary-color);
}

/* Grid pro seznamy */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.grid-item {
    background: var(--white);
    border: 1px solid #e1e1e1;
    border-radius: var(--border-radius);
    padding: 15px;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--accent-color);
}

.grid-item h3 {
    margin: 0 0 10px 0;
    color: var(--accent-color);
}

/* Tabulky */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background-color: #f1f1f1;
}

.amount-positive { color: green; }
.amount-negative { color: #e74c3c; }

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn:hover {
    background-color: #2980b9;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    background-color: #e1e1e1;
    color: #555;
}

.badge.active {
    background-color: #2ecc71;
    color: white;
}

/* Vertikální seznam */
.vertical-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vertical-list .grid-item {
    width: 100%;
    box-sizing: border-box;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.account-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.account-nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
}

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

.btn-small {
    padding: 2px 8px;
    font-size: 0.8rem;
    border-radius: 3px;
    background-color: #95a5a6;
    color: white;
    text-decoration: none;
    margin-left: 5px;
}

.btn-small:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #7f8c8d;
    color: white;
}

.btn-secondary:hover {
    background-color: #6c7a7b;
}

/* Kompaktní vzhled */
.compact-table th, .compact-table td {
    padding: 4px 8px; /* Menší padding */
    font-size: 0.9rem;
}

.account-header-compact {
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.horses-list {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.selected-row {
    background-color: #fff3cd !important;
}

.actions-bar {
    margin-bottom: 10px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.loader {
    text-align: center;
    padding: 20px;
    color: #666;
    display: none;
}

.transaction-row {
    cursor: pointer;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumbs {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}
.breadcrumbs a {
    color: #666;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}

.btn-icon {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 1.1rem;
    line-height: 30px;
}

/* Bublinové odkazy */
.bubble-link {
    display: inline-block;
    padding: 3px 10px;
    background-color: #f0f2f5;
    color: #555;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid #e1e1e1;
}

.bubble-link:hover {
    background-color: #e1e1e1;
    color: #333;
    text-decoration: none;
}

.bubble-link:visited {
    color: #555;
}

@media (max-width: 768px) {
    .container {
        padding: 5px;
    }
    .card {
        padding: 10px;
    }
    .account-header-compact {
        padding: 10px;
    }
    .compact-table th, .compact-table td {
        padding: 4px 2px;
        font-size: 0.85rem;
    }
}

/* Search */
.search-container {
    position: relative;
    width: 250px;
    margin-left: 20px;
}

#searchInput {
    width: 100%;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #44586d;
    color: white;
}
#searchInput::placeholder {
    color: #aaa;
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-group {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #888;
    padding: 8px 12px 4px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    border-top: 1px solid #eee;
}
.search-result-group:first-child {
    border-top: none;
}
.search-result-group.inactive-group {
    background-color: #fdf5e6;
    color: #c09853;
}

.search-result-item {
    display: block;
    padding: 8px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}
.search-result-item:hover {
    background-color: #f1f1f1;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item strong {
    display: block;
    color: var(--primary-color);
}
.search-result-item small {
    font-size: 0.85rem;
    color: #777;
}

.search-result-item.inactive-item strong,
.search-result-item.inactive-item small {
    color: #999;
}

.search-no-results {
    padding: 15px;
    text-align: center;
    color: #888;
}

.recurring-dot {
    color: #2980b9;
    font-size: 1.5em;
    line-height: 0.5;
    vertical-align: middle;
    margin-right: 5px;
}

.month-header td {
    background-color: #e2e6ea;
    font-weight: bold;
    color: var(--secondary-color);
    padding: 8px 12px;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-bottom: 2px solid #adb5bd;
    border-top: 1px solid #dee2e6;
}

.month-stats {
    float: right;
    font-weight: normal;
    font-size: 0.85rem;
    text-transform: none;
}

.month-income { color: #27ae60; margin-left: 15px; }
.month-expense { color: #c0392b; margin-left: 15px; }


.dashboard-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
}
.stat-card {
    background: #fff;
    padding: 15px;
    flex: 1;
    min-width: 100px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
    color: #e74c3c;
}
.stat-card .stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.dashboard-search-container {
    position: relative;
    margin-bottom: 20px;
}

#dashboardSearchInput {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

#dashboardSearchInput:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

#dashboardSearchResults {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item-wrapper {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
}
.search-result-item-wrapper:last-child { border-bottom: none; }
.search-result-item-wrapper .search-result-item { flex-grow: 1; border-bottom: none; }
.search-result-action-btn {
    padding: 12px 15px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: background-color 0.2s;
}
.search-result-action-btn:hover { background-color: #2ecc71; }

.income-summary-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 992px) {
    .income-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Větší oddělení dashboard prvků */
.dashboard-stats,
.container > .card {
    margin-bottom: 30px;
}

/* Kalendář práce */
.work-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.work-day {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    min-height: 100px;
}
.work-day.is-today {
    border-color: var(--accent-color);
    background-color: #eaf5ff;
}
.work-day-header {
    padding: 5px;
    background-color: #e9ecef;
    text-align: center;
    font-size: 0.8rem;
    border-radius: 4px 4px 0 0;
}
.work-day-header strong {
    display: block;
}
.work-day.is-today .work-day-header {
    background-color: var(--accent-color);
    color: white;
}
.work-day-content {
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.work-bubble {
    display: block;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 3px 6px;
    font-size: 0.8rem;
    cursor: default;
}
.work-bubble-line1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.work-bubble-line2 {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.work-bubble-horse {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 5px;
}
.work-bubble-time {
    color: #27ae60;
    font-weight: bold;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .work-calendar {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.horse-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
}
@media (max-width: 900px) {
    .horse-details-grid {
        grid-template-columns: 1fr;
    }
}
