/* Main stylesheet for the Admin Automation application */

/* Import Google Fonts for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --kags-red: #5c070e;
    --kags-red-light: #7a0a12;
    --kags-red-dark: #3d0509;
    --kags-medium-red: #8b0f1a;
    --kags-accent-red: #a01520;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Border radius */
    --border-radius: 0.5rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 1rem;
}

/* General styling */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-100);
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(88, 12, 17, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(88, 12, 17, 0.05) 0%, transparent 50%);
    min-height: 100vh;
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

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; }

/* Header and navbar styling */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.navbar-brand i {
    font-size: 1.75rem;
}

/* Custom red navbar background with gradient */
.bg-kags-red {
    background: linear-gradient(135deg, var(--kags-red) 0%, var(--kags-red-light) 100%) !important;
    box-shadow: var(--shadow-sm);
}

.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-dark .navbar-nav .nav-link.active {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
}

/* Enhanced card styling */
.card {
    margin-bottom: 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background: var(--white);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-bottom: 1px solid var(--gray-300);
    font-weight: 600;
    padding: 1.25rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 0.5rem;
    color: var(--kags-red);
}

/* Enhanced form styling */
.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-control:focus {
    border-color: var(--kags-red);
    box-shadow: 0 0 0 0.2rem rgba(88, 12, 17, 0.25);
    outline: none;
}

.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--kags-red);
    box-shadow: 0 0 0 0.2rem rgba(88, 12, 17, 0.25);
}

/* Enhanced button styling */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--kags-red) 0%, var(--kags-red-light) 100%);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--kags-red-dark) 0%, var(--kags-red) 100%);
    box-shadow: 0 0.5rem 1rem rgba(88, 12, 17, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--kags-red);
    color: var(--kags-red);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--kags-red);
    border-color: var(--kags-red);
    color: var(--white);
}

/* Dashboard specific styling */
.dashboard-card {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2rem rgba(88, 12, 17, 0.15);
}

.dashboard-card .card-body {
    padding: 2rem;
    text-align: center;
    position: relative;
}

.dashboard-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    justify-content: center;
}

.dashboard-card .card-text {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Table enhancements */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border: none;
    font-weight: 600;
    color: var(--gray-700);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: var(--gray-200);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(88, 12, 17, 0.05);
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    border-left: 4px solid;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-left-color: var(--success);
    color: #155724;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: var(--danger);
    color: #721c24;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-left-color: var(--info);
    color: #0c5460;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-left-color: var(--warning);
    color: #856404;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

/* Avatar styling */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--kags-red) 0%, var(--kags-red-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

/* Dropdown enhancements */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: rgba(88, 12, 17, 0.1);
    color: var(--kags-red);
}

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-bottom: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-300);
    padding: 1.5rem;
}

/* Footer styling */
footer {
    background: var(--white);
    border-top: 1px solid var(--gray-300);
    margin-top: 4rem;
    padding: 2rem 0;
    color: var(--gray-600);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .modal,
    footer {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid var(--gray-400) !important;
    }
}

/* Button styling */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Invoice preview */
.invoice-preview {
    border: 1px solid #ddd;
    padding: 20px;
    background-color: white;
}

/* Footer */
footer {
    margin-top: 30px;
    border-top: 1px solid #ddd;
}

/* Custom utilities */
.text-muted {
    color: #6c757d;
}

.border-top {
    border-top: 1px solid #dee2e6;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}
