/* ============================================================
   AutoIntel v1.5 - Custom Styles
   ============================================================ */

/* ePlus Brand Colors */
:root {
    --eplus-blue: #0066CC;
    --eplus-dark-blue: #004C99;
    --eplus-light-blue: #3385D6;
    --eplus-gray: #F5F7FA;
    --eplus-dark-gray: #2D3748;
    --eplus-border: #E2E8F0;
    --eplus-success: #10B981;
    --eplus-warning: #F59E0B;
    --eplus-error: #EF4444;
    --eplus-info: #3B82F6;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--eplus-gray);
    color: var(--eplus-dark-gray);
}

/* ePlus Button Styles */
.btn-primary {
    background-color: var(--eplus-blue);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--eplus-dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: white;
    color: var(--eplus-blue);
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 2px solid var(--eplus-blue);
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--eplus-gray);
}

.btn-danger {
    background-color: var(--eplus-error);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #DC2626;
}

/* Input Styles */
.input-field {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--eplus-border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background-color: white;
}

.input-field:focus {
    outline: none;
    border-color: var(--eplus-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.input-field.error {
    border-color: var(--eplus-error);
}

/* Card Styles */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid var(--eplus-border);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--eplus-border);
    background-color: #FAFBFC;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--eplus-border);
    background-color: #FAFBFC;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-error {
    background-color: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.badge-gray {
    background-color: #F3F4F6;
    color: #374151;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left-color: var(--eplus-success);
}

.toast.error {
    border-left-color: var(--eplus-error);
}

.toast.warning {
    border-left-color: var(--eplus-warning);
}

.toast.info {
    border-left-color: var(--eplus-info);
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    animation: fadeIn 0.2s ease-out;
}

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

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--eplus-border);
    border-top-color: var(--eplus-blue);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 0.8s linear infinite;
}

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

.spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Navigation */
.nav-header {
    background: white;
    border-bottom: 1px solid var(--eplus-border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.nav-link {
    padding: 0.75rem 1rem;
    color: var(--eplus-dark-gray);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--eplus-gray);
    color: var(--eplus-blue);
}

.nav-link.active {
    background-color: var(--eplus-blue);
    color: white;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: #FAFBFC;
    border-bottom: 2px solid var(--eplus-border);
}

.table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--eplus-border);
}

.table tbody tr:hover {
    background-color: var(--eplus-gray);
}

/* Form Group */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--eplus-dark-gray);
}

.form-error {
    color: var(--eplus-error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #6B7280;
}

.text-error {
    color: var(--eplus-error);
}

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

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .modal {
        max-width: 95vw;
    }
    
    .toast {
        right: 0.5rem;
        left: 0.5rem;
        min-width: auto;
    }
}
