/* Import Inter Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #3B82F6;
    --primary-gradient: linear-gradient(135deg, #3B82F6 0%, #7C3AED 100%);
    --secondary-color: #7C3AED;
    --bg-color: #F8FAFC;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 5px 15px -8px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 40px -5px rgba(59, 130, 246, 0.12), 0 10px 20px -8px rgba(124, 58, 237, 0.08);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: #1E293B;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Gradient Text and Backgrounds */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

/* Navbar Styling */
.navbar-custom {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link-custom {
    font-weight: 500;
    color: #475569;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link-custom:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

/* Cards with Soft Shadow & Hover Effects */
.card-custom {
    background: #ffffff;
    border: 1px solid rgba(241, 245, 249, 0.9);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(59, 130, 246, 0.2);
}

.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

/* Custom Buttons */
.btn-primary-custom {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    transition: var(--transition);
}

.btn-primary-custom:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    transform: scale(1.02);
    color: white;
}

.btn-secondary-custom {
    background: #ffffff;
    color: #475569;
    border: 1px solid #E2E8F0;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    transition: var(--transition);
}

.btn-secondary-custom:hover {
    background: #F1F5F9;
    color: #1E293B;
    transform: scale(1.02);
}

.btn-danger-custom {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
    transition: var(--transition);
}

.btn-danger-custom:hover {
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
    transform: scale(1.02);
    color: white;
}

/* Feature Cards Grid (Home Page) */
.feature-card {
    padding: 2.5rem 2rem;
    height: 100%;
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--primary-gradient);
    color: white;
}

/* Hero Section */
.hero-section {
    padding: 8rem 0 6rem;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.04) 0%, rgba(124, 58, 237, 0.04) 90%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(50px);
}

.hero-title {
    font-weight: 800;
    font-size: 3.5rem;
    letter-spacing: -1.5px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #475569;
    font-weight: 400;
}

/* Form Styles */
.form-control-custom {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid #E2E8F0;
    transition: var(--transition);
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Badges */
.badge-custom {
    padding: 0.5em 0.85em;
    border-radius: 8px;
    font-weight: 600;
}

/* Scan logs and Tables */
.table-custom {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-custom tr {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.table-custom td, .table-custom th {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.table-custom tbody tr {
    background: white;
    border-radius: 8px;
    transition: var(--transition);
}

.table-custom tbody tr:hover {
    background: #F8FAFC;
    transform: scale(1.005);
}

.table-custom tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table-custom tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Dashboard Sidebar / Layout */
.dashboard-card-stat {
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid rgba(241, 245, 249, 0.9);
    box-shadow: var(--card-shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Chat Styles */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #F1F5F9;
    border-radius: 12px;
}

.chat-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    position: relative;
    word-break: break-word;
}

.chat-bubble.sent {
    background: var(--primary-gradient);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    background: white;
    color: #1E293B;
    align-self: flex-start;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    border: 1px solid #E2E8F0;
}

.chat-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-align: right;
}

/* Print Utilities */
@media print {
    body * {
        visibility: hidden;
    }
    .print-area, .print-area * {
        visibility: visible;
    }
    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .no-print {
        display: none !important;
    }
}
