/**
 * Blood Donors Manager - Frontend Styles
 * Version: 1.0.0
 */

/* ========================================
   General Styles
   ======================================== */
.blood-donors-statistics,
.blood-donors-list,
.blood-donor-profile,
.blood-donors-dashboard {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ========================================
   Statistics Cards
   ======================================== */
.bdm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.bdm-stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid;
}

.bdm-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.bdm-stat-card.bdm-stat-primary {
    border-left-color: #2271b1;
}

.bdm-stat-card.bdm-stat-success {
    border-left-color: #00a32a;
}

.bdm-stat-card.bdm-stat-danger {
    border-left-color: #d63638;
}

.bdm-stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.bdm-stat-label {
    font-size: 16px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Blood Types Grid
   ======================================== */
.bdm-blood-types {
    margin: 40px 0;
}

.bdm-blood-types h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.bdm-blood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.bdm-blood-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.bdm-blood-type:hover {
    transform: scale(1.05);
}

.bdm-blood-icon {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
}

.bdm-blood-count {
    font-size: 16px;
    margin: 10px 0;
    opacity: 0.9;
}

.bdm-blood-percent {
    font-size: 20px;
    font-weight: bold;
}

/* ========================================
   RH Factor
   ======================================== */
.bdm-rh-factor {
    margin: 40px 0;
}

.bdm-rh-factor h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.bdm-rh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.bdm-rh-card {
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bdm-rh-positive {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.bdm-rh-negative {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bdm-rh-symbol {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 15px;
}

.bdm-rh-count {
    font-size: 18px;
    margin: 10px 0;
}

.bdm-rh-percent {
    font-size: 28px;
    font-weight: bold;
}

/* ========================================
   Donors List Table
   ======================================== */
.blood-donors-list {
    margin: 30px 0;
}

.bdm-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bdm-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bdm-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.bdm-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.bdm-table tbody tr:hover {
    background-color: #f8f9fa;
}

.bdm-table tbody tr:last-child {
    border-bottom: none;
}

.bdm-table td {
    padding: 15px;
    color: #333;
}

.bdm-blood-badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* ========================================
   Donor Profile
   ======================================== */
.blood-donor-profile {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.1);
}

.bdm-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f0f0f0;
}

.bdm-profile-header h2 {
    margin: 0;
    color: #333;
    font-size: 32px;
}

.bdm-profile-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 15px 30px;
    border-radius: 30px;
}

.bdm-blood-type {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.bdm-profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.bdm-info-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.bdm-info-card h3 {
    margin-top: 0;
    color: #667eea;
    font-size: 20px;
    margin-bottom: 20px;
}

.bdm-info-card p {
    margin: 10px 0;
    color: #555;
}

.bdm-status-idoneo {
    color: #00a32a;
    font-weight: bold;
}

.bdm-status-temporaneamente_non_idoneo {
    color: #ff8c00;
    font-weight: bold;
}

.bdm-status-non_idoneo {
    color: #d63638;
    font-weight: bold;
}

.bdm-donations-total {
    font-size: 18px;
    color: #333;
}

.bdm-donations-list {
    margin-top: 20px;
}

.bdm-donation-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: white;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.bdm-donation-date {
    font-weight: bold;
    color: #667eea;
}

.bdm-donation-type {
    color: #666;
    font-style: italic;
}

.bdm-more-donations {
    text-align: center;
    color: #999;
    font-style: italic;
    margin-top: 15px;
}

/* ========================================
   Dashboard
   ======================================== */
.blood-donors-dashboard {
    padding: 20px;
}

.blood-donors-dashboard h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #333;
}

.bdm-dashboard-grid {
    display: grid;
    gap: 30px;
}

.bdm-overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.bdm-dash-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.bdm-dash-card:hover {
    transform: translateY(-5px);
}

.bdm-dash-card.bdm-card-blue {
    border-left: 5px solid #2271b1;
}

.bdm-dash-card.bdm-card-red {
    border-left: 5px solid #d63638;
}

.bdm-dash-card.bdm-card-green {
    border-left: 5px solid #00a32a;
}

.bdm-card-icon {
    font-size: 48px;
}

.bdm-card-content {
    flex: 1;
}

.bdm-card-number {
    font-size: 42px;
    font-weight: bold;
    color: #333;
}

.bdm-card-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Chart Section
   ======================================== */
.bdm-chart-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bdm-chart-section h3 {
    margin-top: 0;
    color: #333;
    font-size: 22px;
    margin-bottom: 25px;
}

.bdm-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bdm-bar-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    gap: 15px;
}

.bdm-bar-label {
    font-weight: bold;
    color: #667eea;
    font-size: 18px;
    text-align: right;
}

.bdm-bar-container {
    background: #f0f0f0;
    border-radius: 10px;
    height: 40px;
    position: relative;
    overflow: hidden;
}

.bdm-bar-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
    transition: width 0.5s ease;
}

.bdm-bar-value {
    color: white;
    font-weight: bold;
    font-size: 16px;
}

/* ========================================
   Donation Types
   ======================================== */
.bdm-donation-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.bdm-type-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.bdm-type-label {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.bdm-type-count {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.bdm-type-percent {
    font-size: 18px;
    opacity: 0.9;
}

/* ========================================
   Messages
   ======================================== */
.bdm-message {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 16px;
}

.bdm-message.bdm-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.bdm-message.bdm-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .bdm-stats-grid,
    .bdm-blood-grid,
    .bdm-rh-grid,
    .bdm-profile-info,
    .bdm-overview-cards,
    .bdm-donation-types {
        grid-template-columns: 1fr;
    }

    .bdm-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .bdm-stat-number,
    .bdm-card-number {
        font-size: 36px;
    }

    .blood-donor-profile,
    .bdm-chart-section {
        padding: 20px;
    }

    .bdm-bar-item {
        grid-template-columns: 60px 1fr;
    }

    .bdm-bar-label {
        font-size: 14px;
    }

    .bdm-table {
        font-size: 14px;
    }

    .bdm-table th,
    .bdm-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .bdm-stat-number {
        font-size: 32px;
    }

    .bdm-blood-icon {
        font-size: 36px;
    }

    .blood-donors-dashboard h2 {
        font-size: 24px;
    }

    .bdm-profile-header h2 {
        font-size: 24px;
    }
}
