/* Color Palette */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --info-color: #06b6d4;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --bg-card: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Navbar Enhancements */
.navbar {
    background: var(--bg-dark) !important;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: 0.75rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: var(--bg-card);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Main Container */
.container {
    flex: 1;
    padding: 2rem 1rem;
}

/* Full width sections that break out of container */
main > section.hero-section,
main > section.features-section,
main > section.cta-section,
main > section.quick-access-section {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: 100vw;
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

/* Cards */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--bg-card);
    margin-bottom: 1.5rem;
}

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

.card-body {
    padding: 1.5rem;
}

.card-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Statistics Cards */
.stat-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    color: white;
}

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

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

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Forms */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}

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

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Tables */
.table {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.table thead {
    background: var(--bg-secondary);
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-secondary);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

/* Login Page */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--bg-card);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-welcome {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

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

.quick-actions {
    margin-top: 2rem;
}

.quick-actions h4 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.action-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
    cursor: pointer;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-top-color: var(--accent-color);
}

.action-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.action-card h5 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.action-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--bg-dark) !important;
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Timeline */
.timeline {
    position: relative;
    margin-left: 20px;
    border-left: 3px solid var(--primary-color);
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: 50%;
    position: absolute;
    left: -10px;
    top: 4px;
    box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 6px var(--primary-color);
}

.timeline-content {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.timeline-time {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.timeline-status {
    margin-top: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-comment {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-left: 3px solid var(--border-color);
    padding-left: 1rem;
}

/* Item Block */
.item-block {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alerts */
.alert {
    border-radius: 0.75rem;
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h2 {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .login-card {
        padding: 2rem 1.5rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

/* Gap utility for flex containers */
.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* Button outline variant */
.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Landing Page Styles */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-content {
    padding: 2rem 0;
}

.hero-logo {
    display: inline-block;
}

.hero-icon {
    font-size: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-image {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration i {
    position: absolute;
    font-size: 4rem;
    opacity: 0.1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

.hero-illustration i:nth-child(1) {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0s;
}

.hero-illustration i:nth-child(2) {
    bottom: 0;
    left: 0;
    animation-delay: 0.5s;
}

.hero-illustration i:nth-child(3) {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: 1s;
}

.hero-illustration i:nth-child(4) {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    animation-delay: 1.5s;
}

/* Features Section */
.features-section {
    background: var(--bg-card);
}

.feature-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

.feature-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: var(--bg-secondary);
}

.cta-card {
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    box-shadow: var(--shadow-xl);
    border-top: 4px solid;
    border-image: var(--gradient-primary) 1;
}

.cta-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Quick Access Section */
.quick-access-section {
    background: var(--bg-secondary);
}

.quick-access-card {
    background: var(--bg-card);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--border-color);
    height: 100%;
}

.quick-access-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.quick-access-card i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.quick-access-card h5 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive adjustments for landing page */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .hero-illustration {
        width: 300px;
        height: 300px;
    }

    .hero-illustration i {
        font-size: 3rem;
    }

    .cta-card {
        padding: 2rem 1.5rem;
    }

    .cta-card h2 {
        font-size: 2rem;
    }
}