/* =============================================
   RtbsVoice — White-Green Neon Theme
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
    /* Primary Green Neon */
    --primary-neon: #00e676;
    --primary-neon-rgb: 0, 230, 118;
    --primary-dark: #00c853;
    --primary-darker: #009624;

    /* Secondary Teal */
    --secondary-neon: #00bfa5;
    --secondary-neon-rgb: 0, 191, 165;

    /* Accent */
    --accent-cyan: #00e5ff;
    --accent-lime: #76ff03;

    /* Neon Glows */
    --neon-glow: 0 0 10px rgba(0, 230, 118, 0.4), 0 0 20px rgba(0, 230, 118, 0.2);
    --neon-glow-strong: 0 0 15px rgba(0, 230, 118, 0.6), 0 0 30px rgba(0, 230, 118, 0.3);
    --neon-glow-teal: 0 0 10px rgba(0, 191, 165, 0.4), 0 0 20px rgba(0, 191, 165, 0.2);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Neutrals */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
}

/* ===================== Base ===================== */
body {
    font-family: 'Noto Sans Thai', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.03) 0%, #f8fafc 40%, rgba(0, 191, 165, 0.03) 100%);
    min-height: 100vh;
    color: var(--slate-800);
}

/* ================ Scrollbar ================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 230, 118, 0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 230, 118, 0.6); }

/* ============= Glassmorphism ============= */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

.glass-panel-neon {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 230, 118, 0.18);
    box-shadow: 0 8px 32px rgba(0, 230, 118, 0.04), 0 0 15px rgba(0, 230, 118, 0.04);
}

/* ============= Neon Text ============= */
.text-neon-green {
    color: var(--primary-neon);
    text-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}
.text-neon-teal {
    color: var(--secondary-neon);
    text-shadow: 0 0 8px rgba(0, 191, 165, 0.3);
}

/* ============= Neon Borders ============= */
.neon-border {
    border-color: rgba(0, 230, 118, 0.4);
    box-shadow: var(--neon-glow);
}
.neon-border-teal {
    border-color: rgba(0, 191, 165, 0.4);
    box-shadow: var(--neon-glow-teal);
}

/* ============= Buttons ============= */
.neon-button-green {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.35);
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.neon-button-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 230, 118, 0.5), 0 0 12px rgba(0, 230, 118, 0.2);
}
.neon-button-green:active {
    transform: translateY(0);
}

.neon-button-teal {
    background: linear-gradient(135deg, #00897b 0%, #00bfa5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 191, 165, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.neon-button-teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 191, 165, 0.5);
}

.neon-button-outline {
    background: transparent;
    color: var(--primary-dark);
    border: 1.5px solid rgba(0, 230, 118, 0.5);
    transition: all 0.3s ease;
    font-weight: 600;
    cursor: pointer;
}
.neon-button-outline:hover {
    background: rgba(0, 230, 118, 0.08);
    border-color: var(--primary-neon);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.15);
}

.neon-button-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #fc5c65 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.neon-button-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(229, 62, 62, 0.45);
}

/* ============= Sidebar ============= */
.sidebar-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0; top: 0;
    height: 100%; width: 0;
    background: var(--primary-neon);
    transition: width 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 230, 118, 0.5);
}
.sidebar-link:hover::before,
.sidebar-link.active::before {
    width: 4px;
}
.sidebar-link:hover {
    background: rgba(0, 230, 118, 0.06);
    color: var(--primary-dark) !important;
    padding-left: 1.5rem !important;
}
.sidebar-link.active {
    background: rgba(0, 230, 118, 0.1);
    color: var(--primary-dark) !important;
    font-weight: 600;
}

/* ============= Form Inputs ============= */
.neon-input {
    border: 1.5px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    font-size: 0.875rem;
    color: var(--slate-800);
}
.neon-input:focus {
    outline: none;
    border-color: var(--primary-neon);
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.15), 0 0 10px rgba(0, 230, 118, 0.08);
}
.neon-input::placeholder {
    color: var(--slate-400);
}

.neon-select {
    border: 1.5px solid var(--slate-200);
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    font-size: 0.875rem;
    color: var(--slate-800);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}
.neon-select:focus {
    outline: none;
    border-color: var(--primary-neon);
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.15), 0 0 10px rgba(0, 230, 118, 0.08);
}

/* ============= Stat Cards ============= */
.stat-card-green {
    background: white;
    border-left: 4px solid var(--primary-neon);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}
.stat-card-green:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 230, 118, 0.12), 0 0 10px rgba(0, 230, 118, 0.06);
}

.stat-card-teal {
    background: white;
    border-left: 4px solid var(--secondary-neon);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}
.stat-card-teal:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 191, 165, 0.12);
}

.stat-card-cyan {
    background: white;
    border-left: 4px solid var(--accent-cyan);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}
.stat-card-cyan:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 229, 255, 0.12);
}

/* ============= Pulsing Dot ============= */
.pulse-dot-green {
    width: 8px; height: 8px;
    background-color: var(--primary-neon);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
    animation: pulse-green 1.5s infinite;
    display: inline-block;
}
@keyframes pulse-green {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

/* ============= Animations ============= */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out;
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* ============= Table ============= */
.neon-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.neon-table thead th {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.08), rgba(0, 191, 165, 0.05));
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-600);
    text-align: left;
    border-bottom: 2px solid rgba(0, 230, 118, 0.2);
}
.neon-table tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: var(--slate-700);
    border-bottom: 1px solid var(--slate-100);
    vertical-align: middle;
}
.neon-table tbody tr {
    transition: all 0.2s ease;
}
.neon-table tbody tr:hover {
    background: rgba(0, 230, 118, 0.04);
}

/* ============= Badge / Tag ============= */
.badge-green {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(0, 230, 118, 0.12);
    color: #00a152;
    border: 1px solid rgba(0, 230, 118, 0.25);
}
.badge-teal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(0, 191, 165, 0.12);
    color: #00897b;
    border: 1px solid rgba(0, 191, 165, 0.25);
}
.badge-amber {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.badge-red {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.badge-slate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(100, 116, 139, 0.1);
    color: var(--slate-600);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* ============= Modal Overlay ============= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-content {
    background: white;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 30px rgba(0, 230, 118, 0.06);
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
    width: 100%;
}

/* ============= Login Card ============= */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 230, 118, 0.15);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.08),
        0 0 40px rgba(0, 230, 118, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-radius: 1.5rem;
}

/* ============= Rating Stars ============= */
.rating-star {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--slate-300);
    transition: all 0.2s ease;
}
.rating-star:hover,
.rating-star.active {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
    transform: scale(1.15);
}

/* ============= Responsive Cards ============= */
.responsive-card {
    display: none;
}

@media (max-width: 768px) {
    .responsive-table { display: none !important; }
    .responsive-card  { display: block !important; }

    .responsive-card .card-item {
        background: white;
        border-radius: 1rem;
        padding: 1.25rem;
        margin-bottom: 0.75rem;
        border: 1px solid var(--slate-100);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        transition: all 0.3s ease;
    }
    .responsive-card .card-item:hover {
        box-shadow: 0 4px 16px rgba(0, 230, 118, 0.1);
    }
}

/* ============= Print ============= */
@media print {
    .no-print { display: none !important; }
}
