/**
 * WELLl.NET — Enterprise Cloud Hosting & SaaS Design System
 * Unified Design Tokens, Components, Glassmorphism, and Responsive Layouts
 */

:root {
    /* Color Tokens */
    --canvas-bg: #030712;
    --canvas-alt: #0a0f1d;
    --surface-card: rgba(15, 23, 42, 0.80);
    --surface-elevated: #131c31;
    --surface-input: #080d1a;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-glow: rgba(0, 245, 155, 0.35);

    /* Accents */
    --accent-emerald: #00f59b;
    --accent-emerald-dark: #059669;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;

    /* Text Colors */
    --text-pure: #ffffff;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00f59b 0%, #06b6d4 50%, #3b82f6 100%);
    --gradient-card: linear-gradient(180deg, rgba(19, 28, 49, 0.7) 0%, rgba(10, 15, 29, 0.9) 100%);
    --gradient-glow: radial-gradient(circle at 50% 0%, rgba(0, 245, 155, 0.15), transparent 70%);

    /* Shadows & Radii */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 25px rgba(0, 245, 155, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #030712;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00f59b;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--canvas-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphic Cards & Panels */
.glass-panel {
    background: var(--surface-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: var(--border-hover);
}

.card {
    background: var(--surface-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(0, 245, 155, 0.3);
    box-shadow: 0 12px 30px -10px rgba(0, 245, 155, 0.15);
}

/* Unified Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #00f59b 0%, #06b6d4 100%);
    color: #030712 !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 245, 155, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 245, 155, 0.4);
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.7);
    color: var(--text-primary) !important;
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--border-hover);
    color: #ffffff !important;
}

.btn-danger {
    background: rgba(244, 63, 94, 0.15);
    color: #fda4af !important;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
    background: rgba(244, 63, 94, 0.3);
    color: #ffffff !important;
}

.btn-block {
    width: 100%;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-pure);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-emerald);
    box-shadow: 0 0 0 3px rgba(0, 245, 155, 0.15);
    background: #0b1122;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.alert-error,
.alert-danger {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fb7185;
}

/* Customer Portal / Dashboard Layout Bridge */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 180px);
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .dashboard-container {
        flex-direction: row;
        padding: 32px 24px;
        gap: 32px;
    }
}

.dashboard-sidebar {
    width: 100%;
    background: var(--surface-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .dashboard-sidebar {
        width: 280px;
        flex-shrink: 0;
        position: sticky;
        top: 100px;
    }
}

.dashboard-sidebar h3 {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-emerald);
    margin-bottom: 16px;
    padding-left: 8px;
}

.dashboard-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dashboard-sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dashboard-sidebar ul li a:hover,
.dashboard-sidebar ul li a.active {
    background: rgba(0, 245, 155, 0.12);
    color: #ffffff;
    border-left: 3px solid var(--accent-emerald);
    font-weight: 600;
}

.dashboard-main {
    flex: 1;
    min-width: 0;
}

.dashboard-main h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.dashboard-main p.text-muted {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

/* Authentication Containers */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 75vh;
    padding: 40px 16px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--surface-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-card h2 {
    font-size: 1.85rem;
    font-weight: 900;
    color: #ffffff;
    text-align: center;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-emerald);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Clean Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

table th {
    background: rgba(10, 15, 29, 0.9);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-active,
.badge-paid {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pending,
.badge-unpaid {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-suspended,
.badge-cancelled {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Metrics & Stats */
.price {
    font-size: 2.25rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.03em;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
