/* ===========================================
   REFERENCES DETAIL PAGE GLOBAL CSS
   Responsif Mobile & Desktop
   Card size: Compact & Modern
   =========================================== */

/* ===========================================
   DETAIL CONTAINER
   =========================================== */
.detail-container {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 1rem 0;
    color: #212529;
}

/* ===========================================
   DETAIL CARDS - COMPACT SIZE
   =========================================== */
.detail-card {
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
    background: white;
}

.detail-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.detail-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.875rem 1.25rem;
    border: none;
}

.detail-card-header h5,
.detail-card-header h6 {
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.detail-card-header i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.detail-card-body {
    padding: 1.25rem;
    color: #212529;
    background: white;
}

/* Card Header (Alternative Style) */
.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.875rem 1.25rem;
}

.card-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.card-body {
    padding: 1.25rem;
    color: #212529;
    background: white;
}

/* ===========================================
   INFO GRID & ITEMS - COMPACT
   =========================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.875rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
    transition: all 0.2s ease;
}

.info-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.375rem;
}

.info-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
    word-break: break-word;
}

.info-value .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
}

/* Override Bootstrap Badge Colors untuk Visibility - LIGHT THEME */
.detail-container .badge-info,
.badge-info {
    background-color: #d1ecf1 !important;
    color: #0c5460 !important;
    border: 1px solid #bee5eb !important;
}

.detail-container .badge-success,
.badge-success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.detail-container .badge-secondary,
.badge-secondary {
    background-color: #e2e3e5 !important;
    color: #383d41 !important;
    border: 1px solid #d6d8db !important;
}

.detail-container .badge-danger,
.badge-danger {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 1px solid #f5c6cb !important;
}

.detail-container .badge-warning,
.badge-warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7 !important;
}

.detail-container .badge-primary,
.badge-primary {
    background-color: #cfe2ff !important;
    color: #084298 !important;
    border: 1px solid #b6d4fe !important;
}

/* Info Row (Alternative Layout) */
.info-row {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #212529;
}

.info-row:last-child {
    border-bottom: none;
}

/* ===========================================
   PROFILE PHOTO CONTAINER - COMPACT
   =========================================== */
.profile-photo-container {
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.profile-photo-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.25rem;
    margin: 0 auto 0.75rem;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.profile-photo-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Photo Container (Alternative) */
.photo-container {
    text-align: center;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.photo-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    margin-bottom: 0.75rem;
}

.photo-placeholder-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.25rem;
    margin: 0 auto 0.75rem;
}

/* ===========================================
   STATUS BADGES - COMPACT
   =========================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Badge Variants */
.badge-modern {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-success-custom {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-danger-custom {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.badge-info-custom {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.badge-secondary-custom {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* ===========================================
   ACTION BUTTONS - COMPACT
   =========================================== */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.125rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    text-decoration: none;
}

.action-btn i {
    margin-right: 0.375rem;
    font-size: 0.875rem;
}

.action-btn.edit {
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: white;
}

.action-btn.export {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.action-btn.delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.action-btn.back {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

/* Button Variants */
.btn-action {
    padding: 0.625rem 1.125rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    font-size: 0.8rem;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-secondary-custom {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary-custom:hover {
    background: #e5e7eb;
    color: #374151;
}

.btn-danger-custom {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    color: white;
}

.btn-custom {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    margin: 0.25rem;
    font-size: 0.8rem;
}

/* ===========================================
   STATISTICS CARDS - COMPACT
   =========================================== */
.stats-card {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin-bottom: 0.875rem;
}

.stats-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.stats-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.875rem;
    margin-bottom: 0.875rem;
}

.stat-mini {
    background: white;
    border-radius: 8px;
    padding: 0.875rem;
    text-align: center;
    color: #212529;
}

.stat-mini-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 0.25rem;
}

.stat-mini-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
}

/* Stat Item */
.stat-item {
    display: flex;
    align-items: center;
    padding: 0.875rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.stat-icon {
    margin-right: 0.875rem;
    font-size: 1.25rem;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.25rem;
}

/* ===========================================
   SPECIAL CARDS - COMPACT
   =========================================== */
.quick-actions {
    position: sticky;
    top: 1.5rem;
}

.sidebar-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.875rem;
    background: white;
}

.sidebar-card .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.875rem 1.25rem;
}

.sidebar-card .card-body {
    padding: 1.25rem;
    color: #212529;
}

.ketua-card {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 0.875rem;
}

.ketua-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    margin: 0 auto 0.75rem;
}

/* Member Card */
.member-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.625rem;
    border-left: 3px solid #007bff;
}

.member-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    margin-right: 0.625rem;
}

.member-info h6 {
    margin: 0;
    color: #212529;
    font-weight: 600;
    font-size: 0.85rem;
}

.member-info small {
    color: #6c757d;
    font-size: 0.7rem;
}

/* ===========================================
   UTILITIES
   =========================================== */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #dee2e6 50%, transparent 100%);
    margin: 1.25rem 0;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner i {
    font-size: 1.75rem;
    color: #007bff;
    margin-bottom: 0.75rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =========================================== */

/* Small Mobile (< 576px) */
@media (max-width: 575.98px) {
    .detail-container {
        padding: 0.75rem 0;
    }
    
    .detail-card-body,
    .card-body {
        padding: 0.875rem;
    }
    
    .detail-card-header,
    .card-header {
        padding: 0.75rem 1rem;
    }
    
    .detail-card-header h5,
    .detail-card-header h6,
    .card-header h6 {
        font-size: 0.875rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }
    
    .info-item,
    .info-row {
        padding: 0.625rem;
        margin-bottom: 0.5rem;
    }
    
    .info-label {
        font-size: 0.65rem;
    }
    
    .info-value {
        font-size: 0.8rem;
    }
    
    .profile-photo-container,
    .photo-container {
        padding: 1rem;
    }
    
    .profile-photo,
    .profile-photo-placeholder,
    .photo-large,
    .photo-placeholder-large {
        width: 80px;
        height: 80px;
    }
    
    .profile-photo-placeholder,
    .photo-placeholder-large {
        font-size: 1.875rem;
    }
    
    .action-buttons {
        gap: 0.5rem;
    }
    
    .action-btn,
    .btn-action,
    .btn-custom {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
    
    .quick-actions {
        position: static;
        margin-top: 1rem;
    }
    
    .stats-card {
        padding: 0.875rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-label {
        font-size: 0.7rem;
    }
    
    .stat-mini {
        padding: 0.75rem;
    }
    
    .stat-mini-number {
        font-size: 1.25rem;
    }
    
    .stat-item {
        padding: 0.625rem;
    }
    
    .stat-icon {
        font-size: 1rem;
        margin-right: 0.625rem;
    }
    
    .stat-number {
        font-size: 1.125rem;
    }
    
    .ketua-card {
        padding: 1rem;
    }
    
    .ketua-avatar {
        width: 55px;
        height: 55px;
        font-size: 1.375rem;
    }
    
    .member-card {
        padding: 0.625rem;
    }
    
    .member-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
}

/* Tablet (576px - 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .info-label {
        flex: 0 0 40%;
    }
    
    .info-value {
        flex: 1;
        text-align: right;
    }
}

/* Desktop (≥ 768px) */
@media (min-width: 768px) {
    .detail-container {
        padding: 1.5rem 0;
    }
    
    .info-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .info-label {
        flex: 0 0 30%;
    }
    
    .info-value {
        flex: 1;
        text-align: right;
    }
    
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {
    .btn, .action-btn, .action-buttons, .card-header, .modal {
        display: none !important;
    }
    
    .detail-card,
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .info-item,
    .info-row {
        border-bottom: 1px solid #eee;
        padding: 10px 0;
    }
}

