/**
 * CTV Portal - Cards Styles
 * Modern Glassmorphism Design
 * 
 * Updated: January 2026
 */

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Stat Card - Reference Design */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.12);
}

/* Remove side accents to match reference clean look, or keep if preferred. Reference uses sparklines. */
.stat-card::before {
    display: none;
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

/* Trend indicator styles */
.metric-trend {
    font-size: 13px;
    color: var(--text-secondary);
}

.metric-trend span {
    font-weight: 600;
}

.metric-trend .up {
    color: var(--success);
}

.metric-trend .down {
    color: var(--danger);
}

/* Card Component - Reference Design */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 24px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.card-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Badge-style Header for prominent sections */
.card-header h3.badge-header {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 20px 24px;
}

/* Commission Item */
.commission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: background 0.2s ease;
}

.commission-item:last-child {
    border-bottom: none;
}

.commission-item:hover {
    background: rgba(255, 255, 255, 0.4);
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
    border-radius: 8px;
}

.commission-item .left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.commission-item .level-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-blue);
}

.commission-item .info {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.commission-item .date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.commission-item .amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--success);
}

/* Tooltip remains similar */
.commission-tooltip {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10;
    margin-bottom: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.commission-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
}

.commission-item:hover .commission-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Phone Check Card */
.phone-check-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--glass-shadow);
}

.phone-check-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.phone-check-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.phone-check-row input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.phone-check-row input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: var(--primary-blue);
}

.phone-check-row .result {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

.phone-check-row .result.trung {
    background: #fee2e2;
    color: #dc2626;
}

.phone-check-row .result.khong-trung {
    background: #dcfce7;
    color: #22c55e;
}

/* Booking Page Phone Input Row */
.phone-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.phone-input-row input {
    flex: 1;
    min-width: 150px;
}

.btn-check-phone {
    padding: 10px 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-check-phone:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.phone-check-result {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    min-width: 100px;
}

.phone-check-result.trung {
    background: #fee2e2;
    color: #dc2626;
}

.phone-check-result.khong-trung {
    background: #dcfce7;
    color: #22c55e;
}

.phone-check-result.warning {
    background: #fef3c7;
    color: #d97706;
}

.phone-check-result.checking {
    background: #e0f2fe;
    color: #0284c7;
}

