/* ZÁKLADNÍ STYLY */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

/* PŘIHLÁŠENÍ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.login-header {
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
}

.login-header i {
    font-size: 48px;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.login-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

/* HLAVNÍ APLIKACE */
.app-container {
    min-height: 100vh;
}

/* HLAVIČKA */
.app-header {
    background: white;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
}

.logo i {
    font-size: 24px;
    color: #2563eb;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.year-selector {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
}

.user-dropdown a:hover {
    background: #f5f5f5;
}

/* SIDEBAR */
.app-sidebar {
    width: 250px;
    background: white;
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    border-right: 1px solid #eee;
    padding: 20px 0;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-title {
    padding: 0 20px 10px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.menu-link:hover,
.menu-link.active {
    background: #f0f7ff;
    color: #2563eb;
}

.menu-link i {
    width: 20px;
    text-align: center;
}

/* HLAVNÍ OBSAH */
.app-main {
    margin-left: 250px;
    margin-top: 70px;
    padding: 30px;
    min-height: calc(100vh - 70px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

/* KARTY */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: #f0f7ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #2563eb;
    font-size: 24px;
}

.card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* TABULKA */
.data-table {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 15px 20px;
    text-align: left;
    background: #f9f9f9;
    border-bottom: 2px solid #eee;
    font-weight: 600;
    color: #666;
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* RESPONZIVNÍ */
@media (max-width: 768px) {
    .app-sidebar {
        display: none;
    }
    
    .app-main {
        margin-left: 0;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}
/* ===== PARTNERS PAGE SPECIFIC STYLES ===== */

/* Filter bar */
.filter-bar {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Partner status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* Partner type badges */
.type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-700);
}

.type-supplier {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.type-customer {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.type-both {
    background: rgba(168, 85, 247, 0.1);
    color: #8b5cf6;
}

/* Partner cards */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.partner-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.partner-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.partner-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.partner-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.partner-icons {
    display: flex;
    gap: 0.5rem;
}

.partner-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-600);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.partner-icon-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.partner-details {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.detail-icon {
    width: 20px;
    color: var(--gray-500);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.detail-text {
    font-size: 0.875rem;
    color: var(--gray-700);
    flex: 1;
}

.detail-label {
    font-weight: 500;
    color: var(--gray-600);
    min-width: 80px;
}

.detail-value {
    color: var(--gray-800);
}

.partner-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Partner form */
.partner-form-container {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-title i {
    color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-full-width {
    grid-column: 1 / -1;
}

.form-address-grid {
    display: grid;
    grid-template-columns: 1fr 200px 150px;
    gap: 1rem;
}

/* Contact persons */
.contact-person-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.contact-person-card:hover {
    background: var(--gray-100);
}

.contact-person-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-person-name {
    font-weight: 600;
    color: var(--gray-900);
}

.contact-person-details {
    display: grid;
    gap: 0.5rem;
}

.contact-person-phone,
.contact-person-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    text-align: center;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.quick-action-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.quick-action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.quick-action-btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--gray-400);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-address-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partner-card-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .partner-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-action-btn {
        width: 100%;
        justify-content: center;
    }
}