/* ========================================= */
/* 1. CORE VARIABLES & RESET                 */
/* ========================================= */
:root {
    --primary-color: #2563eb;    /* SaaS Blue */
    --primary-hover: #1d4ed8;
    --secondary-color: #1e293b;  /* Dark Slate */
    --accent-color: #10b981;     /* Success Green */
    --bg-color: #f8fafc;
    --text-color: #334155;
    --light-text: #94a3b8;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================= */
/* 2. TYPOGRAPHY & BUTTONS                   */
/* ========================================= */
h1, h2, h3, h4 { 
    color: var(--secondary-color); 
    font-weight: 800; 
    letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }

.btn {
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-primary { 
    background: var(--primary-color); 
    color: var(--white); 
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover { 
    background: var(--primary-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

/* FIX: The "View Live Site" Button Visibility */
.btn-view-site {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: var(--primary-color) !important;
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
}

.btn-view-site:hover {
    background: var(--secondary-color) !important;
    transform: translateY(-2px);
}

/* ========================================= */
/* 3. LAYOUT & ADMIN COMPONENTS              */
/* ========================================= */

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand { 
    font-size: 1.5rem; 
    font-weight: 900; 
    color: var(--secondary-color);
    letter-spacing: -1px;
}

.nav-links a { 
    margin: 0 1.2rem; 
    font-weight: 600; 
    font-size: 0.95rem;
    color: var(--text-color); 
}

.nav-links a:hover { color: var(--primary-color); }

/* SaaS Admin Cards & Forms */
.admin-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
    transition: var(--transition);
}

.admin-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--light-text);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.6rem;
}

/* Modern Input and Select Styling */
.form-control, .form-select {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-color) !important;
    color: var(--secondary-color);
    font-size: 1rem;
    transition: var(--transition);
    display: block;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    background: var(--white) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Custom Select Dropdown Arrow */
.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

textarea.form-control {
    min-height: 160px;
    resize: vertical;
}

/* Grid for Side-by-Side Admin Inputs */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* ========================================= */
/* 4. UTILITIES & ANIMATIONS                 */
/* ========================================= */

.text-gradient {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .navbar { padding: 1rem 5%; }
    .nav-links { display: none; } 
    
    .form-row { grid-template-columns: 1fr; } 
    .admin-card { padding: 1.5rem; }
    
    section { padding: 40px 5%; }
    h1 { font-size: 2.2rem !important; }
}

/* RTL Specifics */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .btn { flex-direction: row-reverse; }