/*
 * Modern Clean Admin Theme
 * Mobile-first, professional, and user-friendly
 */

:root {
    /* Modern Color Palette */
    --primary-blue: #2563eb;
    --primary-purple: #7c3aed;
    --success-green: #059669;
    --warning-orange: #d97706;
    --danger-red: #dc2626;
    
    /* Neutral Greys */
    --grey-50: #f9fafb;
    --grey-100: #f3f4f6;
    --grey-200: #e5e7eb;
    --grey-300: #d1d5db;
    --grey-400: #9ca3af;
    --grey-500: #6b7280;
    --grey-600: #4b5563;
    --grey-700: #374151;
    --grey-800: #1f2937;
    --grey-900: #111827;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --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);
    
    /* Typography */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Global Styles */
body {
    font-family: var(--font-sans);
    background-color: var(--grey-50);
    color: var(--grey-900);
    line-height: 1.6;
}

/* Modern Card Styling */
.card {
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: white;
    transition: all 0.2s ease;
}

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

.card-header {
    background: var(--grey-50);
    border-bottom: 1px solid var(--grey-200);
    padding: var(--spacing-lg);
    font-weight: 600;
    color: var(--grey-700);
}

.card-body {
    padding: var(--spacing-lg);
}

/* Modern Button Styling */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: white;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Modern Navigation */
.navbar {
    background: white !important;
    border-bottom: 1px solid var(--grey-200);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md) 0;
}

.navbar-brand {
    color: var(--grey-900) !important;
    font-weight: 700;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    color: var(--grey-600) !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-blue) !important;
    background: var(--grey-50);
}

/* Form Controls */
.form-control,
.form-select {
    border: 2px solid var(--grey-200);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    background: white;
}

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

.form-label {
    font-weight: 600;
    color: var(--grey-700);
    margin-bottom: var(--spacing-sm);
}

/* Table Styling */
.table {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: var(--grey-50);
    border-bottom: 2px solid var(--grey-200);
    font-weight: 600;
    color: var(--grey-700);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--grey-100);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--grey-50);
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}

.bg-success {
    background-color: var(--success-green) !important;
}

.bg-warning {
    background-color: var(--warning-orange) !important;
}

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

.bg-info {
    background-color: var(--primary-blue) !important;
}

/* Page Headers */
h1, h2, h3, h4, h5, h6 {
    color: var(--grey-900);
    font-weight: 700;
    line-height: 1.25;
}

h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding: var(--spacing-md);
    }
    
    .card {
        margin-bottom: var(--spacing-lg);
        border-radius: var(--radius-md);
    }
    
    .card-header {
        padding: var(--spacing-md);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    .btn {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Mobile Table - Stack on Small Screens */
    @media (max-width: 768px) {
        .table-responsive {
            border: none;
        }
        
        .table {
            font-size: 0.875rem;
        }
        
        .table thead {
            display: none;
        }
        
        .table tbody,
        .table tbody tr,
        .table tbody td {
            display: block;
            width: 100%;
        }
        
        .table tbody tr {
            background: white;
            border: 1px solid var(--grey-200);
            border-radius: var(--radius-md);
            margin-bottom: var(--spacing-md);
            padding: var(--spacing-md);
            box-shadow: var(--shadow-sm);
        }
        
        .table tbody td {
            border: none;
            padding: var(--spacing-sm) 0;
            position: relative;
            padding-left: 40%;
        }
        
        .table tbody td:before {
            content: attr(data-label) ": ";
            position: absolute;
            left: 0;
            width: 35%;
            font-weight: 600;
            color: var(--grey-600);
        }
    }
    
    /* Mobile Navigation */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-collapse {
        margin-top: var(--spacing-md);
    }
    
    .navbar-nav .nav-link {
        padding: var(--spacing-md);
        margin: var(--spacing-xs) 0;
        background: var(--grey-50);
        border-radius: var(--radius-md);
    }
}

/* Modern Form Layout */
.row .col-md-6 .form-group,
.row .col-md-6 .mb-3 {
    margin-bottom: var(--spacing-lg);
}

/* Action Buttons */
.d-flex.justify-content-between .btn {
    min-width: 120px;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus States for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Toast/Alert Improvements */
.alert {
    border: none;
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left-color: var(--success-green);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: var(--danger-red);
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: var(--warning-orange);
}

/* Clean List Styling */
.list-group-item {
    border: 1px solid var(--grey-200);
    background: white;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: var(--grey-50);
    transform: translateX(4px);
}

.list-group-item-action {
    color: var(--grey-700);
}

.list-group-item-action:hover {
    color: var(--primary-blue);
}

/* Typography Improvements */
.text-muted {
    color: var(--grey-500) !important;
}

code {
    background: var(--grey-100);
    color: var(--grey-800);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* Utility Classes */
.rounded-modern {
    border-radius: var(--radius-lg) !important;
}

.shadow-modern {
    box-shadow: var(--shadow-md) !important;
}

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

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