/* ============================================================================
   Dashboard 頂部卡片統一樣式
   用於「基本資訊」和「個人照片」兩個卡片
   ============================================================================ */

/* 卡片容器 */
.top-card-box {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 標題區塊 - 置中對齊 */
.top-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #e8f4f8 0%, #f5f9fc 100%);
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #d0e8f2;
    border-radius: 12px 12px 0 0;
}

.top-card-header i {
    font-size: 1.5rem;
    color: #2C5F8D;
}

.top-card-header span {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2C5F8D;
    margin: 0;
}

/* 內容區域 */
.top-card-content {
    flex: 1;
    padding: 0;
}

/* 資訊行 */
.top-card-content .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.top-card-content .info-row:last-child {
    border-bottom: none;
}

.top-card-content .info-row:hover {
    background: #f8f9fa;
}

.top-card-content .info-label {
    color: #6c757d;
    font-size: 0.95rem;
}

.top-card-content .info-value {
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: right;
}

/* 操作按鈕區域 */
.top-card-actions {
    padding: 1rem 1.25rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.top-card-actions .btn {
    min-width: 160px;
}

/* 底部提示區域 */
.top-card-footer {
    padding: 0.75rem 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.top-card-footer i {
    margin-right: 0.25rem;
    color: #6c757d;
}

/* ============================================================================
   頭像上傳專用樣式
   ============================================================================ */

/* 頭像內容區域 */
.avatar-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem !important;
}

/* 頭像預覽 - 使用 label 讓整個區域可點擊 */
.avatar-preview {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #2C5F8D;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: block;
}

.avatar-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(44, 95, 141, 0.3);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover 遮罩層 */
.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(44, 95, 141, 0.85);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-preview:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay i {
    font-size: 2rem;
}

.avatar-overlay span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* 上傳表單 */
.avatar-form {
    width: 100%;
    text-align: center;
}

/* 檔案資訊顯示 */
.file-info-display {
    display: none;
    padding: 0.75rem;
    background: rgba(44, 95, 141, 0.08);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #2C5F8D;
    font-weight: 500;
}

/* 按鈕區域 */
.avatar-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.avatar-buttons .btn {
    min-width: 160px;
}

/* ============================================================================
   響應式設計
   ============================================================================ */

@media (max-width: 768px) {
    .top-card-header {
        padding: 0.875rem 1rem;
    }
    
    .top-card-header i {
        font-size: 1.25rem;
    }
    
    .top-card-header span {
        font-size: 1.1rem;
    }
    
    .top-card-content .info-row {
        padding: 0.75rem 1rem;
    }
    
    .avatar-preview {
        width: 140px;
        height: 140px;
    }
    
    .avatar-content {
        padding: 1rem !important;
    }
}
