/* CloudDNS Panel - Custom Styles (Tailwind CDN used in layout) */

:root {
  --brand-primary: #4F46E5;
  --brand-secondary: #7C3AED;
  --brand-accent: #06B6D4;
}

/* Smooth transitions */
*, *::before, *::after { transition-property: background-color, border-color, color, opacity; transition-duration: 150ms; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
.dark ::-webkit-scrollbar-track { background: #1e293b; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }

/* Gradient Text */
.gradient-text { background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Gradient Button */
.btn-gradient { background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%); transition: all 0.3s ease; }
.btn-gradient:hover { background: linear-gradient(135deg, #4338CA 0%, #6D28D9 100%); transform: translateY(-1px); box-shadow: 0 10px 25px rgba(79,70,229,0.4); }

/* Card */
.card { background: white; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06); }
.dark .card { background: #1e293b; }
/* Use card-no-bg on cards that have their own bg (gradients, custom colors) */
.card.card-no-bg, .dark .card.card-no-bg { background: none !important; }

/* Sidebar */
.sidebar-link { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; border-radius: 0.5rem; color: #64748b; font-size: 0.875rem; font-weight: 500; }
.sidebar-link:hover { background: #f1f5f9; color: #4F46E5; }
.sidebar-link.active { background: #EEF2FF; color: #4F46E5; }
.dark .sidebar-link { color: #94a3b8; }
.dark .sidebar-link:hover { background: #334155; color: #818cf8; }
.dark .sidebar-link.active { background: #312e81; color: #818cf8; }

/* Status badges */
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-active  { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-suspended { background: #fee2e2; color: #991b1b; }
.badge-expired { background: #f1f5f9; color: #475569; }
.badge-paid    { background: #dcfce7; color: #166534; }
.badge-unpaid  { background: #fee2e2; color: #991b1b; }
.badge-partial { background: #fef9c3; color: #854d0e; }
.dark .badge-active  { background: #14532d; color: #86efac; }
.dark .badge-pending { background: #422006; color: #fde68a; }
.dark .badge-paid    { background: #14532d; color: #86efac; }
.dark .badge-unpaid  { background: #7f1d1d; color: #fca5a5; }

/* Stat Cards */
.stat-card { position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: -2rem; right: -2rem; width: 8rem; height: 8rem; border-radius: 50%; opacity: 0.1; }
.stat-card-blue::before  { background: #3B82F6; }
.stat-card-purple::before { background: #8B5CF6; }
.stat-card-green::before  { background: #10B981; }
.stat-card-orange::before { background: #F59E0B; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 0.75rem 1rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; text-align: left; border-bottom: 1px solid #e2e8f0; }
.data-table td { padding: 1rem; font-size: 0.875rem; border-bottom: 1px solid #f1f5f9; }
.data-table tr:hover td { background: #f8fafc; }
.dark .data-table th { color: #64748b; border-color: #334155; }
.dark .data-table td { border-color: #1e293b; }
.dark .data-table tr:hover td { background: #0f172a; }

/* Form inputs */
.form-input { width: 100%; padding: 0.625rem 0.875rem; border: 1px solid #e2e8f0; border-radius: 0.5rem; font-size: 0.875rem; background: white; color: #0f172a; outline: none; }
.form-input:focus { border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.dark .form-input { background: #0f172a; border-color: #334155; color: #f1f5f9; }
.dark .form-input:focus { border-color: #818cf8; }

/* Notification dot */
.notif-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; border: 2px solid white; }
.dark .notif-dot { border-color: #1e293b; }

/* Loading spinner */
.spinner { border: 2px solid transparent; border-top-color: currentColor; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast alerts */
.alert { padding: 0.875rem 1.25rem; border-radius: 0.625rem; display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; border-left: 4px solid #22c55e; color: #166534; }
.alert-error   { background: #fef2f2; border-left: 4px solid #ef4444; color: #991b1b; }
.alert-warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #92400e; }
.alert-info    { background: #eff6ff; border-left: 4px solid #3b82f6; color: #1e40af; }
.dark .alert-success { background: #052e16; color: #86efac; }
.dark .alert-error   { background: #450a0a; color: #fca5a5; }
.dark .alert-warning { background: #422006; color: #fde68a; }
.dark .alert-info    { background: #172554; color: #93c5fd; }

/* Domain search box */
.domain-search-wrap { background: white; border-radius: 1rem; box-shadow: 0 20px 60px rgba(0,0,0,0.1); padding: 0.375rem; display: flex; }
.dark .domain-search-wrap { background: #1e293b; }
.domain-search-input { flex: 1; padding: 0.75rem 1.25rem; border: none; outline: none; font-size: 1rem; background: transparent; color: #0f172a; }
.dark .domain-search-input { color: #f1f5f9; }
.domain-search-btn { padding: 0.75rem 2rem; border-radius: 0.75rem; font-weight: 600; background: linear-gradient(135deg, #4F46E5, #7C3AED); color: white; }

/* Responsive sidebar */
@media (max-width: 768px) { .sidebar { transform: translateX(-100%); } .sidebar.open { transform: translateX(0); } }

/* Charts */
.chart-container { position: relative; height: 280px; }
