
:root {
    --admin-primary: #2c3e50;
    --admin-accent: #3498db;
}

.sidebar { background-color: var(--admin-primary); }
button { background-color: var(--admin-accent); }

.finance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--admin-accent);
}

.summary h3 { font-size: 28px; margin-top: 10px; color: var(--admin-primary); }
.summary p { color: #7f8c8d; font-size: 14px; }

.status-badge { padding: 5px 10px; border-radius: 20px; font-size: 12px; font-weight: bold; }
.status-badge.active { background: #e8f8f5; color: #2ecc71; }
.status-badge.pending { background: #fef9e7; color: #f1c40f; }
.status-badge.locked { background: #fdedec; color: #e74c3c; }

.status-select {
    padding: 6px 10px;
    width: 120px; 
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid transparent;
    cursor: pointer;
    outline: none;
    
    appearance: none;
    -webkit-appearance: none;
    
    text-align: center;
    text-align-last: center; 
    -ms-text-align-last: center;
    
    padding-left: 25px; 
    padding-right: 25px;
    
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px auto;
    transition: all 0.3s ease;
}

.status-select.active {
    background-color: #e8f8f5;
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.status-select.pending {
    background-color: #fef9e7;
    color: #f1c40f;
    border: 1px solid #f1c40f;
}

.status-select.locked {
    background-color: #fdedec;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.status-select:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.plan-select {
    padding: 6px 10px;
    width: 130px; 
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    border: 1px solid transparent;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    text-transform: uppercase;
    
    text-align: center;
    text-align-last: center;
    padding-left: 20px;
    padding-right: 20px;
    
    transition: all 0.3s ease;
}

/* Hiệu ứng Hover */
.plan-select:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.plan-select.monthly {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.plan-select.quarterly {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.plan-select.yearly {
    background-color: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.plan-select.trial {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

tr.row-unpaid {
    background-color: #fff5f5 !important;
}
tr.row-unpaid:hover {
    background-color: #fee2e2 !important;
}

tr.row-paid {
    background-color: #f0fdf4 !important;
}
tr.row-paid:hover {
    background-color: #dcfce7 !important;
}

.expired-tag {
    display: inline-block;
    background: #c0392b;
    color: white;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 2s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.payment-select {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    width: 140px;
}

.payment-select.paid {
    color: #15803d;
    border: 1px solid #86efac;
    background-color: rgba(255,255,255,0.6);
}

.payment-select.unpaid {
    color: #b91c1c;
    border: 1px solid #fca5a5;
    background-color: rgba(255,255,255,0.6);
}

.ai-stats-group {
    display: flex;
    gap: 15px;
}
.ai-stat-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-width: 100px;
}
.ai-stat-card span { font-size: 11px; color: #888; text-transform: uppercase; }
.ai-stat-card strong { font-size: 18px; color: var(--admin-primary); }

.ai-select {
    padding: 8px 10px;
    width: 140px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    border: 2px solid transparent;
    outline: none;
    text-align: center;
    text-align-last: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Màu sắc từng gói */
.ai-select.free {
    background-color: #f5f5f5;
    color: #7f8c8d;
    border-color: #bdc3c7;
}

.ai-select.plus {
    background-color: #e8eaf6;
    color: #3f51b5;
    border-color: #c5cae9;
}

.ai-select.pro {
    background-color: #fff8e1;
    color: #d35400;
    border-color: #ffcc80;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.2);
}

.ai-specs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.spec-tag {
    font-size: 11px;
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 4px 8px;
    border-radius: 4px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
}
.spec-tag i { color: var(--admin-accent); font-size: 10px; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online { background-color: #2ecc71; box-shadow: 0 0 5px #2ecc71; }
.status-dot.offline { background-color: #95a5a6; }

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: #1f2a37;
    color: white;

    display: flex;
    flex-direction: column;
}

.sidebar-top {
    padding: 24px;
    flex: 1; /* ⭐ đẩy bottom xuống đáy */
}

.sidebar-bottom {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu li {
    margin: 12px 0;
}



.admin-name {
    font-size: 14px;
    opacity: 0.85;
}

.logout-btn {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;

    background: #2563eb;
    color: white;
}


.logout-btn:hover {
    background: #1d4ed8;
}

.dashboard-row {
    grid-column: 1 / -1;   /* ⭐ QUAN TRỌNG: chiếm toàn bộ hàng */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}
.finance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.summary {
    background: #fff;
    padding: 20px 22px;
    border-radius: 14px;
    min-height: 110px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
}

.summary h3 {
    font-size: 24px;
    font-weight: 700;
}


.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 10px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
}

.chart-box {
    height: 300px;
}

/* Responsive cho màn nhỏ */
@media (max-width: 1024px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}
.main-content {
    padding: 24px 32px;
    max-width: 1200px;
    margin: 0 auto;
}
