/* AgriDroneX Professional Agricultural Theme - DJI Inspired */

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

:root {
    /* Agricultural Color Palette */
    --agri-primary: #2d5016;
    --agri-primary-light: #4a7c2a;
    --agri-primary-dark: #1a3009;
    --agri-secondary: #8b6f47;
    --agri-accent: #6b8e23;
    --agri-earth: #8b7355;
    --agri-gold: #d4af37;
    
    /* Neutral Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a1a1a;
    --bg-card: #ffffff;
    
    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    --text-muted: #adb5bd;
    
    /* Accent Colors */
    --success: #2d5016;
    --info: #4a7c2a;
    --warning: #d4af37;
    --danger: #dc3545;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-agri: 0 4px 20px rgba(45, 80, 22, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Typography - DJI Style: Clean and Minimal */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 { font-size: 3rem; font-weight: 600; }
h2 { font-size: 2.5rem; font-weight: 600; }
h3 { font-size: 2rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 500; }
h5 { font-size: 1.25rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Navigation - Professional Dark Theme */
.navbar {
    background: var(--bg-dark) !important;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-light) !important;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-normal);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-brand i {
    color: var(--agri-accent);
    font-size: 1.75rem;
}

/* Brand Text - Montserrat Semi-Bold with Two-Tone Colors */
.brand-text {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #4A8A3A;
    display: inline-block;
}

/* The "X" at the end - lighter yellowish green */
.brand-x {
    color: #6FBF4B !important;
}

/* Footer brand text */
footer .brand-text {
    color: #4A8A3A;
}

footer .brand-x {
    color: #6FBF4B !important;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--agri-accent);
    transition: transform var(--transition-normal);
}

.navbar-nav .nav-link:hover {
    color: var(--text-light) !important;
    background: rgba(255, 255, 255, 0.05);
}

.navbar-nav .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-nav .nav-link.active {
    color: var(--agri-accent) !important;
}

.navbar-nav .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

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

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

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

.dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.badge.bg-success {
    background: var(--agri-primary) !important;
}

.badge.bg-danger {
    background: var(--danger) !important;
}

/* Cards - Professional Design */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    background: var(--bg-card);
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(135deg, var(--agri-primary) 0%, var(--agri-primary-light) 100%);
    color: var(--text-light);
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

.card-img-top {
    transition: transform var(--transition-slow);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Buttons - Professional Style */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-normal);
    letter-spacing: 0.01em;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-success {
    background: linear-gradient(135deg, var(--agri-primary) 0%, var(--agri-primary-light) 100%);
    color: var(--text-light);
    box-shadow: var(--shadow-agri);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(45, 80, 22, 0.25);
    color: var(--text-light);
}

.btn-outline-success {
    border: 2px solid var(--agri-primary);
    color: var(--agri-primary);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--agri-primary);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-agri);
}

.btn-light {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-light:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    background: transparent;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-light);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Forms - Professional Inputs */
.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--agri-primary);
    box-shadow: 0 0 0 4px rgba(45, 80, 22, 0.1);
    outline: none;
    background: var(--bg-primary);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.input-group-text {
    background: var(--bg-secondary);
    border: 2px solid #e9ecef;
    border-right: none;
    color: var(--text-secondary);
}

/* Alerts - Professional Style */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.1) 0%, rgba(74, 124, 42, 0.1) 100%);
    color: var(--agri-primary-dark);
    border-left: 4px solid var(--agri-primary);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(212, 175, 55, 0.1);
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(74, 124, 42, 0.1);
    color: var(--agri-primary-dark);
    border-left: 4px solid var(--agri-primary-light);
}

/* Tables - Professional Design */
.table {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.table tbody td {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    vertical-align: middle;
}

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

/* Hero Section - Professional Agricultural Theme */
.hero-section {
    background: linear-gradient(135deg, var(--agri-primary-dark) 0%, var(--agri-primary) 50%, var(--agri-primary-light) 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(107, 142, 35, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1,
.hero-section .lead {
    color: var(--text-light);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Feature Icons */
.feature-icon,
.category-icon {
    background: linear-gradient(135deg, var(--agri-primary) 0%, var(--agri-primary-light) 100%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-agri);
    transition: all var(--transition-normal);
}

.feature-icon:hover,
.category-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(45, 80, 22, 0.3);
}

.category-icon {
    width: 60px;
    height: 60px;
}

/* Hover Effects */
.hover-card {
    transition: all var(--transition-normal);
    cursor: pointer;
}

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

/* Stats Section */
.stat-item {
    padding: 2rem 0;
    text-align: center;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-light) 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer - Professional Dark Theme */
footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer h5,
footer h6 {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all var(--transition-fast);
}

footer a:hover {
    color: var(--agri-accent);
    transform: translateX(4px);
}

footer p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0 1rem;
}

/* Pagination */
.pagination .page-link {
    border-radius: var(--radius-sm);
    margin: 0 0.125rem;
    border: 2px solid #e9ecef;
    color: var(--agri-primary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination .page-link:hover {
    background: var(--bg-secondary);
    border-color: var(--agri-primary);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--agri-primary);
    border-color: var(--agri-primary);
    color: var(--text-light);
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--agri-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--agri-primary-dark);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* Hide scrollbar completely */
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(45, 80, 22, 0.3);
    border-radius: 50%;
    border-top-color: var(--agri-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Section Backgrounds */
.bg-light {
    background: var(--bg-secondary) !important;
}

.bg-success {
    background: linear-gradient(135deg, var(--agri-primary) 0%, var(--agri-primary-light) 100%) !important;
}

.bg-dark {
    background: var(--bg-dark) !important;
}

/* Text Colors */
.text-success {
    color: var(--agri-primary) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Admin Dashboard Styles */
.border-left-primary {
    border-left: 0.25rem solid var(--agri-primary) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--agri-primary-light) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--agri-primary-light) !important;
}

.text-gray-300 {
    color: #adb5bd !important;
}

.text-gray-800 {
    color: var(--text-primary) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .display-4 { font-size: 2rem; }
    .display-5 { font-size: 1.75rem; }
    .display-6 { font-size: 1.5rem; }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .stat-item h3 {
        font-size: 2.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
}
}

/* Print Styles */
@media print {
    .navbar, .btn, footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

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

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

/* Utility Classes */
.shadow-agri {
    box-shadow: var(--shadow-agri) !important;
}

.text-agri {
    color: var(--agri-primary) !important;
}

.bg-agri {
    background: var(--agri-primary) !important;
}
