:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #0f172a;
    --accent: #3b82f6;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --font-family: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-whatsapp-nav {
    background: #25D366;
    color: white;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-whatsapp-nav:hover {
    background: #1faf53;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.brand .accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, #f6f9fc 0%, #eef2ff 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-subtext {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
    border: none;
    padding: 0.85rem 2rem;
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

/* Services */
.services {
    padding: 6rem 0;
    background: #ffffff;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: #ffffff;
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    /* Soft large shadow */
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: 'transparent';
    transition: background 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
}

.service-card:hover::after {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

.icon-box {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 2rem;
    transition: transform 0.3s;
}

.service-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--secondary);
    font-size: 1.5rem;
    font-weight: 700;
}

.service-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Websites Section */
.websites {
    padding: 5rem 0;
    background: white;
}

/* Controls */
.controls-wrapper {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filters {
    display: flex;
    gap: 1rem;
}

select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: white;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    appearance: none;
}

select:focus {
    border-color: var(--primary);
    outline: none;
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    /* Ensure scroll on small */
}

th,
td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary);
    white-space: nowrap;
    user-select: none;
}

th.sortable {
    cursor: pointer;
    transition: background 0.2s;
}

th.sortable:hover {
    background: #e2e8f0;
}

th.sortable i {
    font-size: 0.8em;
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.filter-row td {
    background: #fff;
    padding: 0.5rem 0.5rem;
    border-bottom: 2px solid var(--border);
}

.col-filter {
    width: 100%;
    padding: 0.4rem;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.col-filter:focus {
    border-color: var(--primary);
    outline: none;
}

.btn-xs {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.btn-xs:hover {
    background: #e2e8f0;
}

tbody tr:hover {
    background: #f1f5f9;
}

td a.website-link {
    color: var(--primary);
    font-weight: 500;
}

.price-tag {
    font-weight: 700;
    color: var(--success);
}

.badge {
    padding: 0.25rem 0.75rem;
    background: #e2e8f0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-main);
    display: inline-block;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.page-size select {
    padding: 0.4rem 2rem 0.4rem 0.8rem;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-buttons button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-main);
}

.pagination-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-buttons button:not(:disabled):hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-buttons span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Loading & Error */
.loading-indicator {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.open {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal.open .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-title {
    margin-bottom: 20px;
    color: var(--secondary);
    font-size: 1.5rem;
}

.order-items-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-bottom: 1rem;
}

.order-item-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.item-site {
    font-weight: 700;
    color: var(--primary);
}

.item-base-price {
    font-weight: 600;
}

.site-summary {
    /* Legacy single item style - keeping for fallback or replace dynamically */
    display: none;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.radio-option:hover {
    border-color: var(--primary);
}

.sub-field {
    margin: 0.5rem 0 0.5rem 1.8rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.sub-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-muted);
}

.input-sm {
    padding: 0.5rem !important;
    font-size: 0.9rem !important;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

input[type="radio"]:checked+span {
    color: var(--primary);
    font-weight: 500;
}

/* Bulk Actions */
.checkbox-col {
    width: 40px;
    text-align: center;
}

.row-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.floating-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 900;
    transition: transform 0.3s, opacity 0.3s;
}

.floating-bar.hidden {
    transform: translate(-50%, 100px);
    opacity: 0;
    pointer-events: none;
    /* We use class hidden for display:none usually, but here we want animation */
    /* Check utility class */
}

/* Override utility hidden for animation if needed, but app.js toggles display:none usually. 
   Let's assume app.js toggles class "open" instead for animation? 
   Or just standard hidden class for now. 
*/
.floating-bar.hidden {
    display: none !important;
}

.bulk-info {
    font-weight: 600;
    font-size: 1.1rem;
}

.price-breakdown {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.price-row.total {
    margin-top: 0.5rem;
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.required {
    color: var(--error);
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

.success-message {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.success-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.ref-id {
    font-family: monospace;
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Contact */
.contact {
    background: #f8fafc;
    padding: 5rem 0;
    text-align: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.btn-whatsapp-lg {
    background: #25D366;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-whatsapp-lg:hover {
    background: #1faf53;
}

.btn-gchat-lg {
    background: #4285F4;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-gchat-lg:hover {
    background: #3367d6;
}

/* Mobile Cards */
.mobile-cards {
    display: none;
    /* Desktop default */
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Simpler mobile nav needed or hamburger, but prompt didn't ask for mobile menu explicitly, keeping it simple */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .controls-wrapper {
        flex-direction: column;
    }

    .table-container {
        display: none;
        /* Hide table on mobile */
    }

    .mobile-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        background: white;
        padding: 1.5rem;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }

    .card-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }

    .card-label {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

    .card-value {
        font-weight: 500;
        color: var(--secondary);
    }

    .card-header {
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .card-website {
        font-weight: 700;
        color: var(--primary);
        font-size: 1.1rem;
        display: block;
        margin-bottom: 0.25rem;
    }
}

footer {
    background: var(--secondary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
}