/* css/profile.css */

/* Nhật Hạn Palace Highlight */
.palace-box.nhat-han-highlight {
    border: 3px solid #ef4444 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
    z-index: 10;
    position: relative;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.nguyet-van.nhat-han-badge {
    background: #ef4444;
    color: white;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Profile Page - works with main-layout sidebar offset */
.profile-main {
    padding: 15px;
    box-sizing: border-box;
}

/* Daily Limit Widget */
.daily-limit-widget {
    background: linear-gradient(135deg, #fef2f2 0%, #fff1f2 50%, #ffffff 100%);
    border: 2px solid #fecaca;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.daily-limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.daily-limit-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #b91c1c;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.date-controls button {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.2s;
}

.date-controls button:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

.daily-score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    flex-shrink: 0;
    transition: background 0.3s;
}

/* Form */
.profile-form-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.profile-form-section h2 {
    margin-top: 0;
    color: #1f2937;
}

.input-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Weight Section */
.weight-section {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.weight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.weight-item label {
    font-size: 12px;
    color: #6b7280;
    display: block;
    margin-bottom: 3px;
}

.weight-item input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.chart-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #374151;
    text-align: center;
}

.chart-card-highlight {
    border: 2px solid #ec4899;
    background: linear-gradient(135deg, #fdf2f8, #ffffff);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.15);
}

.chart-wrapper {
    width: 100%;
    height: 300px;
    position: relative;
}

/* Responsive */
@media (max-width: 900px) {
    .input-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wrapper {
        height: 280px;
    }

    .daily-limit-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-controls {
        width: 100%;
        justify-content: space-between;
    }

    .profile-main {
        padding: 10px;
    }

    .input-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
}