@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* Color Variables and Design Tokens - Indigo & Slate */
:root {
    --bg-primary: #030712;
    --bg-secondary: #080b11;
    --card-bg: rgba(17, 24, 39, 0.55);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-border-glow: rgba(99, 102, 241, 0.12);
    
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-error: #ef4444;

    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset and Scrollbars */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(8, 11, 17, 0.6) 0px, transparent 80%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Global Floating Sticky Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 2rem;
    transition: var(--transition-normal);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-link-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}
.nav-link-item:hover, .nav-link-item.active {
    color: var(--text-primary);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Main Container spacing under navbar */
main {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    position: relative;
}

/* Glassmorphic Page Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 3rem;
    border: 1px solid var(--card-border);
    box-shadow: 
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        0 1px 3px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -0.5px;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

p {
    margin-bottom: 1.25rem;
    font-size: 0.975rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

strong {
    color: var(--text-primary);
}

/* Navigation Grid */
.nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.nav-link {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    transition: var(--transition-normal);
}

.nav-link:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(99, 102, 241, 0.05);
}

.nav-link small {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    font-family: var(--font-body);
}

/* Forms Layout */
form {
    margin: 1.5rem 0;
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

form input, form select, form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    background: rgba(3, 7, 18, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    font-family: inherit;
}

form input:hover, form select:hover, form textarea:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

form input:focus, form select:focus, form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(3, 7, 18, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.15rem;
    padding-right: 2.5rem;
}

/* Action Buttons */
.btn, form button, form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: var(--transition-normal);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    border: none;
    cursor: pointer;
}

.btn:hover, form button:hover, form input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

/* Tables and Container grids */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(17, 24, 39, 0.3);
}

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

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

th {
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-primary);
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

td {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.015);
    transition: var(--transition-fast);
}

/* Badges / Pill Tags */
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
}

.tag-primary {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.tag-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.tag-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.tag-info {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    color: #c084fc;
}

/* Stat Cards */
.stat-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-primary);
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-card-success::before { background: var(--accent-success); }
.stat-card-warning::before { background: var(--accent-warning); }
.stat-card-danger::before { background: var(--accent-error); }
.stat-card-info::before { background: var(--accent-primary); }

.stat-card .stat-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inner card boxes */
.inner-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.panel-success {
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.panel-info {
    background: rgba(99, 102, 241, 0.02);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

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

.text-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-error {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Drag & Drop Upload field */
.file-upload-wrapper {
    position: relative;
    width: 100%;
}

.file-upload-wrapper input[type="file"] {
    position: relative;
    padding: 1.25rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    background: rgba(3, 7, 18, 0.3);
    border-radius: 10px;
    transition: var(--transition-fast);
    cursor: pointer;
    color: var(--text-secondary);
}

.file-upload-wrapper input[type="file"]:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(3, 7, 18, 0.45);
}

/* Layout Alignments */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 1rem; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Footers */
footer {
    background: rgba(3, 7, 18, 0.9);
    border-top: 1px solid var(--card-border);
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

footer a:hover {
    color: var(--accent-primary);
}

/* Alert boxes */
.alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #a7f3d0;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

/* Keyframe animations */
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.slide-in {
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive breakdowns */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .nav-menu {
        display: none; /* Can add dropdown logic if needed, simple items for now */
    }
    
    main {
        margin: 1.5rem auto;
    }
    
    .card {
        padding: 1.75rem;
    }
    
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}
