/* public/css/style.css */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #0ea5e9;
    --dark: #0f172a;
    --light: #ffffff;

    /* Antigravity Dark Theme Colors - Deep Purple Edition */
    --app-bg: #090810;
    --surface: #13121b;
    --surface-hover: #1e1b29;
    --border: rgba(139, 92, 246, 0.15);
    --glass-bg: rgba(19, 18, 27, 0.85);
    --text-main: #ffffff;
    --text-muted: #ffffff;

    --shadow: 0 4px 20px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 40px -3px rgba(0, 0, 0, 0.8);

    --premium-gradient: linear-gradient(135deg, #090810 0%, #1e1b29 100%);
    --premium-accent: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);

    --sidebar-width: 200px;
    --navbar-height: 72px;
}

.bg-surface {
    background-color: var(--surface) !important;
}

.bg-app {
    background-color: var(--app-bg) !important;
}

.text-main {
    color: var(--text-main) !important;
}



.premium-card-header {
    background: var(--premium-gradient);
    position: relative;
    overflow: hidden;
}

.premium-card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--app-bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(219, 39, 119, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(219, 39, 119, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Immersive Background Logic - Global Watermark */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-image: url('../logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40% auto;
    opacity: 0.05;
    /* Soft watermark look */
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.5s ease;
}

body {
    background-blend-mode: overlay;
    transition: background-image 0.5s ease;
}

/* CINEMATIC SWEET SPOT - BALANCED LUMINANCE */
body.bulbs-active {
    background-color: #090810 !important;
    background-image:
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.45) 0px, transparent 70%),
        radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.35) 0px, transparent 70%),
        radial-gradient(at 50% 50%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.35) 0px, transparent 70%),
        radial-gradient(at 0% 100%, rgba(219, 39, 119, 0.35) 0px, transparent 70%),
        radial-gradient(at 80% 25%, rgba(139, 92, 246, 0.2) 0px, transparent 40%),
        radial-gradient(at 25% 75%, rgba(236, 72, 153, 0.2) 0px, transparent 40%);
    background-blend-mode: screen;
}

body.bulbs-active::before {
    opacity: 0.1;
    /* Balanced signature pop */
}

.outfit-font {
    font-family: 'Outfit', sans-serif;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

/* LAYOUT */
/* Layton Update for Sticky Footer */
.app-body {
    padding-top: var(--navbar-height);
    padding-bottom: 60px;
    /* Space for slim sticky footer */
}

/* UNIVERSAL HOLOGRAPHIC GLASS (Footer) */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background: rgba(15, 12, 41, 0.45) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-muted);
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
}

.app-navbar {
    height: var(--navbar-height);
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border) !important;
}

.navbar-toggler {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border) !important;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    color: var(--text-main) !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--surface);
        margin-top: 1rem;
        border-radius: 16px;
        padding: 1rem;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
}

/* UNIVERSAL HOLOGRAPHIC GLASS (Navbar) */
.app-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    background: rgba(15, 12, 41, 0.55) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.navbar-brand,
.nav-link,
.app-navbar .navbar-text {
    color: var(--text-main);
}

.nav-link:hover {
    color: var(--primary) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-muted);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--text-main);
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

@media (min-width: 992px) {
    .app-sidebar {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        bottom: 0;
        width: var(--sidebar-width);
        background: rgba(15, 12, 41, 0.4) !important;
        backdrop-filter: blur(30px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 2rem 0;
        overflow-y: auto;
        z-index: 1020;
    }

    .app-content {
        margin-left: var(--sidebar-width);
        padding: 2rem;
        width: calc(100% - var(--sidebar-width));
    }
}

/* Footer & Sidebar Fixes */
/* Footer Fix */


.footer .text-main {
    color: var(--text-main) !important;
}

/* CARDS */
/* FUTURISTIC iOS-GRADE GLASSMORPISM */
.card,
.glass-card {
    background: rgba(20, 20, 27, 0.4) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px !important;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    position: relative;
    /* overflow: hidden; -- Removed to allow dropdowns to be visible outside the card */
}

.card:hover,
.glass-card:hover {
    background: rgba(30, 30, 40, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-5px) scale(1.005) !important;
    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

/* Internal Glow effect for Cards */
.card::before,
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.02),
            transparent);
    transition: 0.5s;
    pointer-events: none;
}

.card:hover::before,
.glass-card:hover::before {
    left: 100%;
}

.card-header {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1.5rem !important;
}

/* Global Text Color Overrides for Absolute White */
.text-muted,
.text-secondary,
.text-white-50,
.text-dark,
.text-muted-foreground,
span.text-muted,
small.text-muted,
i.text-muted,
p.text-muted {
    color: #ffffff !important;
    opacity: 1 !important;
}

.card .text-muted,
.glass-card .text-muted,
.card .text-secondary,
.glass-card .text-secondary {
    color: #ffffff !important;
    opacity: 1 !important;
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card span,
.card div,
.card label,
.card strong,
.card small,
.card li,
.glass-card h1,
.glass-card h2,
.glass-card h3,
.glass-card h4,
.glass-card h5,
.glass-card h6,
.glass-card span,
.glass-card div,
.glass-card label,
.glass-card strong,
.glass-card small,
.glass-card li {
    color: #ffffff !important;
}

.card .text-primary,
.glass-card .text-primary {
    color: var(--primary) !important;
}

.card .text-success,
.glass-card .text-success {
    color: var(--success) !important;
}

.card .text-danger,
.glass-card .text-danger {
    color: var(--danger) !important;
}

.card .text-warning,
.glass-card .text-warning {
    color: var(--warning) !important;
}

.card .text-info,
.glass-card .text-info {
    color: var(--info) !important;
}

/* BUTTONS */
.btn {
    border-radius: 12px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-light {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: transparent;
    color: #fff;
}

.btn-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.bg-soft-primary {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

/* SIDEBAR NAV */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 14px;
    margin-bottom: 0.35rem;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.85rem;
}

.sidebar-link i {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    width: 24px;
    text-align: center;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.sidebar-link.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
    margin: 1.5rem 0.75rem 0.5rem;
}

/* TABLES */
.table-responsive {
    overflow: visible !important;
}

.table {
    margin-bottom: 0;
    color: var(--text-main) !important;
    background-color: transparent !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03) !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.01) !important;
    --bs-table-border-color: var(--border) !important;
}

.table thead th {
    background: var(--app-bg) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 1.25rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.table tbody td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    color: var(--text-main) !important;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border) !important;
    background-color: transparent !important;
}

.table-hover tbody tr:hover td {
    background-color: var(--surface-hover) !important;
}

.table-hover tbody tr:hover {
    background-color: transparent !important;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* BADGES */
.badge {
    padding: 0.6em 0.9em;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* INPUTS */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-main) !important;
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--primary) !important;
    color: var(--text-main) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

/* LIVE SUPPORT WIDGET */
.support-widget {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 2000;
}

.support-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--premium-accent);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2002;
}

.support-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
}

.support-btn.active {
    transform: rotate(45deg);
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.support-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.5);
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.support-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2001;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.support-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.support-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.support-option:hover {
    background: var(--surface-hover);
    transform: translateX(4px);
    color: white;
}

.support-option:last-child {
    margin-bottom: 0;
}

.support-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1.2rem;
}

.icon-whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
}

.icon-telegram {
    background: rgba(0, 136, 204, 0.1);
    color: #0088cc;
}



/* MOBILE OPTIMIZATIONS */
/* MOBILE OPTIMIZATIONS */
@media (max-width: 991.98px) {
    .app-sidebar {
        display: none;
    }

    .app-content {
        padding: 1rem;
        margin-left: 0;
        width: 100%;
    }

    /* Transform Tables to Cards on Mobile */
    .table-responsive {
        overflow: visible !important;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 1.25rem;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .table td {
        text-align: right;
        /* Default align right for 'value' look */
        padding: 0.5rem 0 !important;
        border: none !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: auto;
    }

    /* First cell (Primary Info) - Make it prominent and full width */
    .table td:first-child {
        text-align: left;
        justify-content: flex-start;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid var(--border) !important;
        padding-bottom: 0.75rem !important;
    }

    /* Last cell (Actions) - Full width button */
    .table td:last-child {
        margin-top: 0.75rem;
        padding-top: 0.75rem !important;
        border-top: 1px solid var(--border) !important;
        justify-content: center;
    }

    .table td:last-child .btn {
        width: 100%;
    }

    .table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: var(--text-muted);
    }

    /* Fix for rows that are already single-cell/layout based (like Details page) */
    .table td[colspan] {
        display: block;
        text-align: left;
        justify-content: normal;
    }

    .table td[colspan]::before {
        display: none;
    }
}

/* Global Gateways Table Layout */
#servicesTable {
    table-layout: fixed;
    width: 100%;
}

#servicesTable th,
#servicesTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    /* white-space: nowrap; - Removed to allow wrapping if preferred, or keep for single line */
    vertical-align: middle;
}

/* Specific column targeting if needed, though inline styles handle percentages now */
#servicesTable td:first-child .text-main {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.dropdown-menu {
    z-index: 9999 !important;
}