/**
 * Styly pro správu tenantů
 */

/* ==========================================================================
   Formulář pro vytvoření tenanta
   ========================================================================== */

.tenant-form-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px; /* OPRAVENO: z 16px na 20px - podle specifikace */
    color: #212529;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.form-section-title i {
    margin-right: 0.5rem;
}

.section-tenant i {
    color: #B1D235;
}

.section-company i {
    color: #95B11F;
}

.section-admin i {
    color: #6c757d;
}

.form-label-custom {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px; /* OPRAVENO: z 13px na 16px - podle specifikace */
    color: #212529;
    margin-bottom: 0.5rem;
}

.form-control-custom {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px; /* OPRAVENO: z 13px na 16px - podle specifikace */
    padding: 0.75rem 1.25rem !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   Page header - sjednoceno s client formulářem  
   ========================================================================== */

.page-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.75rem; /* 28px */
    color: #212529;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 0;
}

/* ==========================================================================
   Card header - sjednoceno s klientským designem
   ========================================================================== */

.card-header h5 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 20px !important; /* Podle specifikace pro nadpisy */
    color: #212529 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Tenant seznam - statistiky
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.stats-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.stats-number {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 4px;
}

.stats-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #6c757d;
}

/* ==========================================================================
   Tenant seznam - tabulka
   ========================================================================== */

.table-modern {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.table-modern thead th {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    padding: 1rem 0.75rem;
}

.table-modern tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f8f9fa;
}

.table-modern tbody tr:hover {
    background-color: rgba(177, 210, 53, 0.05);
}

/* ==========================================================================
   NOVÉ: Styly pro neaktivní tenanty
   ========================================================================== */

.data-row.tenant-inactive {
    background-color: #f8f9fa !important;
    color: #6c757d;
}

.data-row.tenant-inactive:hover {
    background-color: #e9ecef !important;
}

.data-row.tenant-inactive .company-name strong {
    color: #6c757d !important;
}

.data-row.tenant-inactive .badge {
    opacity: 0.7;
}

.data-row.tenant-inactive .text-muted {
    color: #adb5bd !important;
}

/* ==========================================================================
   OPRAVA: Zlepšení viditelnosti badges v hlavní tabulce
   ========================================================================== */

.badge-primary-custom {
    background-color: #B1D235;
    color: #212529;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.badge-neutral {
    background-color: #6c757d;
    color: white;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* ==========================================================================
   NOVÉ: Styly pro rozbalitelné detaily tenantů
   ========================================================================== */

.tenant-row {
    transition: background-color 0.2s ease;
}

.tenant-expand-icon {
    transition: transform 0.3s ease !important;
    font-size: 0.8rem !important;
    color: #B1D235 !important;
}

.tenant-details-row {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.tenant-details-cell {
    padding: 0 !important;
    border-bottom: 2px solid #e9ecef;
}

.tenant-details-content {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.detail-section {
    margin-bottom: 1.5rem; /* ZVĚTŠENO z 1rem na 1.5rem */
}

.detail-section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.detail-item {
    margin-bottom: 1rem; /* ZVĚTŠENO z 0.75rem na 1rem */
    font-size: 13px;
}

.detail-item strong {
    color: #B1D235; /* ZMĚNĚNO na zelenou */
    font-weight: 600; /* ZMĚNĚNO z 500 na 600 (tučnější) */
    display: block;
    margin-bottom: 0.125rem; /* ZMENŠENO z 0.25rem na 0.125rem */
}

.detail-item span {
    color: #212529;
    line-height: 1.4;
}

.detail-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Animace pro rozbalení */
.tenant-details-row {
    transition: opacity 0.3s ease;
}

/* Hover efekty pro rozbalitelné řádky */
.tenant-row:hover .tenant-expand-icon {
    color: #95B11F !important;
}

/* Responsivní úpravy pro detaily */
@media (max-width: 768px) {
    .tenant-details-content .row > div {
        margin-bottom: 1.5rem;
    }
    
    .detail-stats {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .stat-item {
        flex: 1;
        min-width: calc(50% - 0.25rem);
    }
}

/* ==========================================================================
   Tenant detaily
   ========================================================================== */

.tenant-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: rgba(177, 210, 53, 0.1);
}

.tenant-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tenant-stat-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

/* ==========================================================================
   Tlačítka a akce
   ========================================================================== */

.btn-primary-custom {
    background: linear-gradient(135deg, #B1D235 0%, #95B11F 100%);
    border: none;
    color: #212529;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #95B11F 0%, #7a9b1f 100%);
    color: #212529;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(177, 210, 53, 0.3);
}

.btn-secondary-custom {
    background: #6c757d;
    border: none;
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-secondary-custom:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* ==========================================================================
   Akce na řádku
   ========================================================================== */

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    border: 1px solid;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn-primary {
    background: #B1D235;
    border-color: #B1D235;
    color: #212529;
}

.action-btn-primary:hover {
    background: #95B11F;
    border-color: #95B11F;
    color: #212529;
}

.action-btn-success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.action-btn-success:hover {
    background: #218838;
    border-color: #218838;
    color: white;
}

.action-btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.action-btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    color: white;
}

/* ==========================================================================
   Status badges
   ========================================================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    gap: 0.25rem;
}

.status-badge-active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge-inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* ==========================================================================
   Help sekce
   ========================================================================== */

.help-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.help-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px; /* OPRAVENO: z 16px na 20px - podle specifikace */
    color: #212529;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.help-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px; /* Menší než hlavní nadpis */
    margin-bottom: 0.5rem;
}

.help-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px; /* OPRAVENO: z 13px na 16px - podle specifikace */
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.help-alert {
    background: linear-gradient(135deg, #fff3cd 0%, #fdf6d8 100%);
    border: 1px solid #B1D235;
    border-radius: 6px;
    padding: 1rem;
}

.help-alert-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px; /* OPRAVENO: z 13px na 16px */
    color: #212529;
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
}

/* ==========================================================================
   Animace pro DIČ pole
   ========================================================================== */

#dic-row {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* ==========================================================================
   CSS fix pro ARES spinner animaci
   ========================================================================== */

.spinner-rotate {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive úpravy
   ========================================================================== */

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-title {
        font-size: 1.5rem; /* 24px */
    }
    
    .form-section-title {
        font-size: 18px; /* Menší na mobilu */
    }
    
    .form-section .form-label {
        font-size: 15px !important; /* Trochu menší na mobilu */
    }
    
    .form-section .form-control {
        font-size: 16px !important; /* Zachovat čitelnost */
    }
}