/* Netvanta - Custom Styles */

/* Global Styles */
:root {
    --primary-color: #667eea;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --sidebar-width: 240px;
    --sidebar-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    font-size: 0.875rem;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: var(--sidebar-width);
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.875rem 1.25rem;
    border-radius: 0.5rem;
    margin: 0.25rem 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    letter-spacing: 0.025rem;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.sidebar .nav-link:hover::before {
    left: 100%;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #fff;
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 18px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.9;
}

.sidebar-heading {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    padding: 1rem 1.25rem 0.5rem;
    margin-top: 0.5rem;
    position: relative;
}

.sidebar-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.25rem;
    right: 1.25rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.sidebar .nav-item .collapse .nav-link,
.sidebar .nav-item .collapsing .nav-link {
    padding-left: 2.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.sidebar .nav-item .collapse .nav-link:hover,
.sidebar .nav-item .collapsing .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
main {
    margin-left: var(--sidebar-width);
    padding: 0;
    transition: margin-left 0.3s ease;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
}

.card-header h5,
.card-header h6 {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--dark-color);
}

/* Border Left Cards */
.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

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

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

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

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

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

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

/* Typography */
.text-xs {
    font-size: 0.7rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

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

/* Buttons */
.btn {
    border-radius: 0.35rem;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #bac8f3;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

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

/* Tables */
.table {
    font-size: 0.875rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.85rem;
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e3e6f0;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.35rem;
    border: 1px solid #d1d3e2;
    background: #fff;
    color: var(--dark-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
}

/* Alerts */
.alert {
    border-radius: 0.35rem;
    border: none;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* Dropdowns */
.dropdown-menu {
    border-radius: 0.35rem;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    font-size: 0.875rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background-color: #f8f9fc;
}

/* Modals */
.modal-content {
    border-radius: 0.35rem;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
}

.modal-footer {
    border-top: 1px solid #e3e6f0;
    padding: 1rem 1.25rem;
}

.modal-title {
    font-weight: 700;
    color: var(--dark-color);
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* Loading Spinner */
#loadingSpinner {
    z-index: 9999;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .btn-toolbar,
    .card-header .btn,
    .no-print {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

/* Responsive Design */
@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
        width: 100%;
        height: auto;
        position: relative;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    main {
        margin-left: 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.75rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.375rem;
        font-size: 0.75rem;
    }
}

/* Custom Utilities */
.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.border-bottom-primary {
    border-bottom: 1px solid var(--primary-color) !important;
}

.bg-gradient-primary {
    background: linear-gradient(180deg, var(--primary-color) 10%, #224abe 100%);
}

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

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

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

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

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

/* Sidebar System Info */
.sidebar .px-3 {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    margin: 0.75rem;
    padding: 1rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .px-3 small {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.75rem;
}

.sidebar .px-3 small div {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
}

.sidebar .px-3 small i {
    margin-right: 0.5rem;
    width: 14px;
    opacity: 0.8;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Status Indicators */
.status-draft {
    background-color: var(--secondary-color);
}

.status-sent {
    background-color: var(--primary-color);
}

.status-accepted {
    background-color: var(--success-color);
}

.status-rejected {
    background-color: var(--danger-color);
}

.status-expired {
    background-color: var(--warning-color);
}

/* Form Validation */
.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: var(--success-color);
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.75rem;
}

.valid-feedback {
    color: var(--success-color);
    font-size: 0.75rem;
}
