﻿/* file: login.css */
:root {
    --bg-color: #f4f7f9;
    --card-bg: #ffffff;
    --text-color: #333;
    --text-color-light: #6c757d; 
    --primary-color: #007bff;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --border-color: #e9ecef; 
    --border-radius: 8px;
}

body.login-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 20px;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.profile-container {
    text-align: center;
    background-color: rgba(255,255,255,0.8);
    padding: 40px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.profile-container h1 {
    color: var(--primary-color);
}

.profile-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.profile-card-wrapper {
    position: relative;
}

.profile-card {
    width: 150px;
    text-decoration: none;
    color: var(--text-color-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.profile-card:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: var(--border-radius);
    background-color: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(0,0,0,0.1);
}

.profile-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.profile-card-wrapper:hover .profile-avatar::after {
    background-color: rgba(0,0,0,0.4);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-icon-fallback {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.profile-card.add-new {
    border: none;
    background: none;
    font-size: 1rem;
}

.profile-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.profile-actions {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.profile-card-wrapper:hover .profile-actions {
    opacity: 1;
    transform: translateY(0);
}

.profile-actions .action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: none;
}

.profile-actions .action-btn i {
    margin: 0;
}

.profile-actions .action-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

/* Modal Styling (chung cho cả 2 trang) */
.modal { display: flex; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.modal.show { opacity: 1; visibility: visible; }
@keyframes modal-fade-in { from { transform: translateY(-20px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal.show .modal-content { animation: modal-fade-in 0.3s ease-out forwards; }
.modal-content { background-color: var(--card-bg); padding: 30px; border-radius: var(--border-radius); width: 90%; max-width: 500px; position: relative; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 28px; cursor: pointer; color: #aaa; }
.modal-close:hover { color: #333; }
.modal-content h2 { margin-top: 0; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); color: var(--primary-color); }
.modal-content label { font-weight: 500; margin-bottom: 5px; display: block; }
.modal-content textarea, .modal-content input, .modal-content select { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 5px; margin-bottom: 15px; box-sizing: border-box; font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s; }
.modal-content textarea:focus, .modal-content input:focus, .modal-content select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); }
.modal-content button { width: 100%; margin-top: 10px; padding: 10px 15px; font-weight: 600; }
.btn-primary { background-color: var(--primary-color); color: white; }
.error-message { color: var(--danger-color); margin-top: 10px; font-size: 14px; }
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; }
.toast { padding: 15px 20px; border-radius: 5px; color: white; font-weight: 500; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 0; transform: translateX(100%); transition: all 0.4s ease; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.btn-success { background-color: var(--success-color); }
.toast.btn-danger { background-color: var(--danger-color); }