/* ===========================
   FabriqSuite - Modern CSS
   =========================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===========================
   HEADER & NAVIGATION
   =========================== */

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav a:not(.btn):hover {
    color: var(--primary-color);
}

.nav a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav a:not(.btn):hover::after {
    width: 100%;
}

.nav .btn {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.nav .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* TOPBAR (Alternative Navigation) */
.topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.topbar .logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topbar nav {
    display: flex;
    gap: 2rem;
}

.topbar nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s ease;
}

.topbar nav a:hover {
    color: var(--primary-color);
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(124, 58, 237, 0.9));
    color: white;
    text-align: center;
    padding: 6rem 0;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-btn {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 1rem 3rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ===========================
   CARDS & SECTIONS
   =========================== */

.section {
    padding: 3rem 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.card-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-btn:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
}

/* ===========================
   CONTENT AREA
   =========================== */

.content {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.box {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
}

.box h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.box p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ===========================
   FORMS & INPUTS
   =========================== */

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button,
.btn-primary {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover,
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-weight: 600;
}

/* ===========================
   LISTS
   =========================== */

.modern-list {
    list-style: none;
}

.modern-list li {
    margin-bottom: 0.8rem;
}

.modern-list li a {
    display: block;
    padding: 1rem 1.5rem;
    background: var(--light);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.modern-list li a:hover {
    background: white;
    border-left-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

/* ===========================
   PAGE LAYOUT
   =========================== */

.page {
    min-height: calc(100vh - 160px);
    padding: 3rem 0;
}

.page-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

header nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

header nav ul li a:hover,
header nav ul li a.active {
    color: var(--primary-color);
}

/* ===========================
   FOOTER
   =========================== */

footer {
    background: rgba(30, 41, 59, 0.95);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

footer p {
    margin: 0;
    opacity: 0.9;
}

/* ===========================
   LOGIN CARD
   =========================== */

.login-card {
    max-width: 400px;
    margin: 0 auto;
}

.login-card form {
    display: flex;
    flex-direction: column;
}

/* ===========================
   ADMIN PANEL
   =========================== */

.admin-header {
    background: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.admin-nav {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.admin-nav a {
    padding: 0.6rem 1.2rem;
    background: var(--light);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary-color);
    color: white;
}

.table-container {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

table th {
    background: var(--light);
    font-weight: 600;
    color: var(--dark);
}

table tr:hover {
    background: var(--light);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    width: auto;
    display: inline-block;
    margin-right: 0.5rem;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #059669;
}

/* ===========================
   ALERTS
   =========================== */

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--primary-color);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .header-inner,
    .topbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav,
    .topbar nav,
    header nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .box {
        padding: 2rem;
    }

    .admin-nav {
        flex-direction: column;
    }

    table {
        font-size: 0.9rem;
    }

    table th,
    table td {
        padding: 0.6rem;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.box {
    animation: fadeIn 0.5s ease;
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
