/* public/css/style.css - Premium Modern Dark SaaS Theme */

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --color-primary: #6366f1; /* Indigo */
    --color-secondary: #8b5cf6; /* Violet */
    --color-accent: #d946ef; /* Magenta */
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --glass-blur: 12px;
}

/* Base Styles */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #ffffff;
}

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

.bg-gradient-premium {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
}

.bg-gradient-dark {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.15);
}

/* Input Styles */
.form-control, .form-select {
    background-color: rgba(17, 24, 39, 0.8) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Button Customizations */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-light {
    border-color: var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Badges */
.badge-verified {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-weight: 600;
}

.badge-unverified {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-weight: 600;
}

/* Sidebar & Navigation */
.sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.nav-link-custom i {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.nav-link-custom:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

.nav-link-custom.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border-left: 3px solid var(--color-primary);
}

/* Tab Styles */
.nav-tabs-custom {
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs-custom .nav-link {
    color: var(--text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 1rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-tabs-custom .nav-link:hover {
    color: #ffffff;
}

.nav-tabs-custom .nav-link.active {
    color: var(--color-primary);
    background: none;
    border-bottom-color: var(--color-primary);
}

/* Loader Screen Animation */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.loader-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 2rem;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    animation: loading 35s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loading {
    0% { width: 0%; }
    20% { width: 25%; }
    50% { width: 55%; }
    80% { width: 88%; }
    98% { width: 98%; }
    100% { width: 100%; }
}

/* Custom Tree View for Campaigns */
.tree-branch {
    position: relative;
    padding-left: 2rem;
    border-left: 2px dashed var(--border-color);
    margin-left: 1rem;
    margin-top: 1rem;
}

.tree-branch::before {
    content: '';
    position: absolute;
    top: 1.2rem;
    left: 0;
    width: 1.5rem;
    border-top: 2px dashed var(--border-color);
}

.ad-copy-preview {
    background: #1e293b;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.facebook-ad-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.fb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 0.75rem;
}

/* Table Style */
.table-custom {
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-custom th {
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 0.75rem 1rem;
}

.table-custom tr {
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.table-custom tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.table-custom td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.table-custom td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.table-custom td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}
