/* ===================================
   COMPONENTS CSS
   Wiederverwendbare Component-Styles
   =================================== */

/* === MEDICAL STAT CARDS (used) === */
.md-stat-card {
    border: 1px solid var(--md-border, #E5E7EB);
    border-radius: 12px;
    background: var(--md-white, #fff);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.md-stat-card__body {
    padding: 14px 16px;
}

.md-stat-card__icon {
    font-size: 22px;
    opacity: 0.9;
}

.md-stat-card__label {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--md-text-light, #6B7C93);
}

.md-stat-card__value {
    margin: 4px 0 0 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--md-text, #1A1F2E);
}

.md-stat-card--center .md-stat-card__icon {
    font-size: 26px;
    opacity: 0.35;
    margin-top: 8px;
}

.md-stat-card__footer {
    padding: 10px 16px;
    border-top: 1px solid var(--md-border, #E5E7EB);
    background: transparent;
}

.md-stat-card__footer a {
    color: var(--md-blue, #0F78A5);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.md-stat-card__footer a:hover {
    color: var(--md-blue-hover, #0B5E82);
    text-decoration: underline;
}

/* === Legacy Creative-Tim button class shims (until fully migrated) === */
.btn-round {
    border-radius: 10px !important;
}
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-icon.btn-icon-mini,
.btn-icon-mini {
    padding: 0.25rem 0.45rem !important;
    line-height: 1 !important;
}
.btn-neutral {
    box-shadow: none !important;
}

/* === SYSTEM CARDS === */
.system-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.system-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.system-card .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--md-text);
}

.system-card .card-title i {
    margin-right: 0.5rem;
}

/* === CONTRACT CARDS === */
.contract-card {
    border-left: 4px solid var(--md-blue);
    transition: all 0.2s ease;
}

.contract-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contract-card .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
}

/* === EMPTY STATES === */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    color: #9A9A9A;
}

.empty-state h5 {
    color: var(--md-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.empty-state-image {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.empty-state:hover .empty-state-image {
    opacity: 1;
}

/* === MODALS === */
.modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background: var(--md-gray-50);
    border-bottom: 1px solid var(--md-border);
    border-radius: 8px 8px 0 0;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: var(--md-text);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background: var(--md-gray-50);
    border-top: 1px solid var(--md-border);
    border-radius: 0 0 8px 8px;
    padding: 1rem 1.5rem;
}

/* Modal Header Semantic Variants */
.modal-header--edit {
    background: linear-gradient(135deg, var(--md-primary, #2E86AB) 0%, var(--md-primary-dark, #1A5276) 100%);
    color: #fff;
}
.modal-header--edit .modal-title,
.modal-header--edit .btn-close {
    color: #fff;
}

.modal-header--create,
.modal-header--success {
    background: linear-gradient(135deg, var(--md-success, #27AE60) 0%, #1E8449 100%);
    color: #fff;
}
.modal-header--create .modal-title,
.modal-header--create .btn-close,
.modal-header--success .modal-title,
.modal-header--success .btn-close {
    color: #fff;
}

.modal-header--delete,
.modal-header--danger {
    background: linear-gradient(135deg, var(--md-danger, #E74C3C) 0%, #C0392B 100%);
    color: #fff;
}
.modal-header--delete .modal-title,
.modal-header--delete .btn-close,
.modal-header--danger .modal-title,
.modal-header--danger .btn-close {
    color: #fff;
}

.modal-header--warning {
    background: linear-gradient(135deg, var(--md-warning, #F39C12) 0%, #D68910 100%);
    color: #fff;
}
.modal-header--warning .modal-title,
.modal-header--warning .btn-close {
    color: #fff;
}

.modal-header--info,
.modal-header--view {
    background: linear-gradient(135deg, var(--md-info, #3498DB) 0%, #2471A3 100%);
    color: #fff;
}
.modal-header--info .modal-title,
.modal-header--info .btn-close,
.modal-header--view .modal-title,
.modal-header--view .btn-close {
    color: #fff;
}

/* Modal title icon styling */
.modal-header .modal-title i {
    margin-right: 0.5rem;
    opacity: 0.9;
}

/* === BADGES === */
.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.room-badge {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
}

.room-badge i {
    margin-right: 0.25rem;
}

/* === BREADCRUMBS === */
.breadcrumb {
    background: transparent;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    border-radius: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

.breadcrumb-item a {
    color: var(--md-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--md-blue-hover);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* === ACTION BUTTONS (actions-dropdown) === */
.actions-buttons {
    gap: 0.375rem !important;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--md-border, #d1d3e2);
    border-radius: 6px;
    background: var(--md-white, #ffffff);
    color: var(--md-text-muted, #5a5c69);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    border-color: var(--md-blue, #0F78A5);
    color: var(--md-blue, #0F78A5);
    background: var(--md-gray-50, #f8f9fc);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn-delete {
    border-color: var(--md-border, #e3e6f0);
}

.action-btn-delete:hover {
    border-color: var(--md-danger, #e74a3b);
    color: var(--md-danger, #e74a3b);
    background: rgba(231, 74, 59, 0.06);
}

/* Default icon hints (hover inherits) */
.action-btn i.fa-eye { color: var(--md-blue, #0F78A5); }
.action-btn i.fa-edit { color: var(--md-warning, #f6c23e); }
.action-btn i.fa-trash { color: var(--md-danger, #e74a3b); }
.action-btn:hover i { color: inherit; }

/* === LOADING SKELETON === */
.skeleton-card,
.skeleton-table,
.skeleton-list-item {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line,
.skeleton-button,
.skeleton-icon {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-line {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 15px;
}

.skeleton-text {
    width: 100%;
}

.skeleton-button {
    height: 36px;
    width: 100px;
    margin-top: 10px;
}

.skeleton-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-stat {
    height: 14px;
    width: 80%;
    margin-bottom: 5px;
}

.skeleton-number {
    height: 28px;
    width: 50%;
}

.skeleton-table-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.skeleton-table-row .skeleton-line {
    flex: 1;
}

.skeleton-list-item {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* === UTILITIES === */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.h-100 {
    height: 100% !important;
}

/* === RESPONSIVE === */
@media (max-width: 767px) {
    .card-stats .icon-big {
        font-size: 2em;
    }
    
    .card-stats .card-title {
        font-size: 24px;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state i {
        font-size: 3rem !important;
    }
}

