@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Light Theme Palette */
    --bg-color: #f8fafc;
    /* Slate 50 - Clean white background */
    --card-bg: #ffffff;
    /* Pure white cards */
    --text-color: #475569;
    /* Slate 600 - Readable body text */
    --heading-color: #0f172a;
    /* Slate 900 - Strong headings */
    --text-muted: #64748b;
    /* Slate 500 - Secondary text */
    --primary-color: #3b82f6;
    /* Blue 500 - Primary actions */
    --accent-color: #2563eb;
    /* Blue 600 - Hover states */
    --border-color: #e2e8f0;
    /* Slate 200 - Subtle borders */
    --input-bg: #f1f5f9;
    /* Slate 100 - Input backgrounds */
    --font-main: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(147, 51, 234, 0.03), transparent 25%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-top: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 3rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Login/Action Buttons in Nav */
.btn-login {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    background-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    text-align: center;
    padding: 4rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.08), transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(135deg, #1e293b, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   CATALOG / CARDS GRID
   ======================================== */
.catalog {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-img {
    height: 160px;
    background-color: var(--input-bg);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.15rem;
    color: var(--heading-color);
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.btn-demo:hover {
    background: var(--accent-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* ========================================
   FORMS & INPUTS
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--heading-color);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--heading-color);
    box-sizing: border-box;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-submit {
    width: 100%;
    padding: 0.85rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--accent-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* ========================================
   ADMIN STYLES
   ======================================== */
.admin-layout {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.admin-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-card h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--input-bg);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    width: fit-content;
}

.tab-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.tab-link.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.tab-link:hover:not(.active) {
    background: var(--card-bg);
    color: var(--heading-color);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: var(--input-bg);
    color: var(--heading-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

tr:hover {
    background-color: var(--input-bg);
}

/* Badges */
.badge {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.badge-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

.badge-inactive {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.2);
}

/* Action Icons */
.action-icon {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    text-decoration: none;
    color: var(--text-muted) !important;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.action-icon:hover {
    color: var(--primary-color) !important;
    background: var(--input-bg);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    text-align: left;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 500;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.2);
}

/* ========================================
   VIEW DEMO PAGE
   ======================================== */
.demo-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.demo-container h1 {
    margin-bottom: 0.5rem;
}

.demo-container p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.demo-frame {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-container {
    max-width: 420px;
    margin: 5rem auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    text-align: center;
    padding: 3rem;
    background: var(--input-bg);
    color: var(--text-muted);
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin: 0;
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin-bottom: 1.5rem;
}

.close {
    color: var(--text-muted);
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close:hover {
    color: var(--heading-color);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .logo {
        font-size: 0.95rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero {
        padding: 2rem 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .catalog {
        padding: 1.5rem;
        grid-template-columns: 1fr;
    }

    .admin-layout {
        padding: 0 1rem;
    }

    .admin-card {
        padding: 1.5rem;
    }

    .demo-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .modal-content {
        margin: 10% 1rem;
        padding: 1.5rem;
    }
}