/* Computer Information Management - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;

    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);

    --transition-base: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    --transition-transform: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-shadow: box-shadow 0.2s ease-in-out;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Enhanced Cards */
.card {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition-base), var(--transition-transform), var(--transition-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.95);
}

/* Enhanced Forms */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    transform: translateY(-1px);
}

.form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

/* Enhanced Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition-base), var(--transition-transform), var(--transition-shadow);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #4285f4);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0b5ed7, #3367d6);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #20c997);
    border: none;
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #fd7e14);
    border: none;
    color: var(--dark-color);
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger-color), #e74c3c);
    border: none;
}

/* Enhanced Navigation */
.navbar {
    box-shadow: var(--box-shadow);
    background: rgba(255, 255, 255, 0.98);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    transition: transform 0.2s ease-in-out;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Enhanced Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background: linear-gradient(135deg, #d1edff, #e7f5e7);
    color: var(--success-color);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #fdcbcb);
    color: var(--danger-color);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: var(--info-color);
}

/* Enhanced Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: white;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Enhanced Badges */
.badge {
    border-radius: 50px;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Custom Components */
.stats-card {
    transition: var(--transition-base), var(--transition-transform), var(--transition-shadow);
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.icon-circle {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s ease-in-out;
}

.icon-circle:hover {
    transform: scale(1.1);
}

/* List Group Enhancements */
.list-group-item {
    border: none;
    transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
    margin-bottom: 0.25rem;
    border-radius: var(--border-radius);
}

.list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateX(5px);
}

/* Input Group Enhancements */
.input-group-text {
    border: 1px solid #ced4da;
    background-color: rgba(255, 255, 255, 0.8);
    transition: border-color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 50px;
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 50px;
    background: linear-gradient(45deg, var(--primary-color), #4285f4);
    animation: progressAnimation 1s ease-out;
}

@keyframes progressAnimation {
    from {
        width: 0%;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        border-radius: var(--border-radius);
    }

    .stats-card {
        margin-bottom: 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0.5rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .btn {
        font-size: 0.9rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {

    .btn,
    .navbar,
    .alert,
    .card-footer,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }

    body {
        color: #000 !important;
        background: white !important;
    }
}

/* Focus Management */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), #4285f4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0b5ed7, #3367d6);
}

/* Modal stability */
.modal-open {
    overflow: hidden !important;
}

.modal {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    display: block !important;
}

/* Selection Styles */
::selection {
    background-color: rgba(13, 110, 253, 0.3);
    color: var(--dark-color);
}

::-moz-selection {
    background-color: rgba(13, 110, 253, 0.3);
    color: var(--dark-color);
}

/* Custom Confirmation Modal Styles */
#customConfirmModal .modal-dialog {
    max-width: 450px;
}

#customConfirmModal .modal-content {
    border-radius: 12px;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

#customConfirmModal .modal-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0.02) 100%);
    border-bottom: 2px solid rgba(220, 53, 69, 0.1);
}

#customConfirmModal .modal-header .modal-title {
    font-size: 1.25rem;
    color: #dc3545;
}

#customConfirmModal .modal-header .bi-exclamation-triangle {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

#customConfirmModal .modal-body {
    padding: 2rem 1.5rem;
    line-height: 1.8;
    font-weight: 500;
}

html[data-bs-theme="light"] #customConfirmModal .modal-body {
    color: #495057;
}

html[data-bs-theme="dark"] #customConfirmModal .modal-body {
    color: #e9ecef;
}

#customConfirmModal #confirmMessage {
    display: block;
    word-break: break-word;
}

#customConfirmModal .modal-footer {
    padding: 1.25rem 1.5rem;
    gap: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

html[data-bs-theme="light"] #customConfirmModal .modal-footer {
    background-color: #f8f9fa;
}

html[data-bs-theme="dark"] #customConfirmModal .modal-footer {
    background-color: #343a40;
}

#customConfirmModal .btn {
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s ease-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

#customConfirmModal .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

#customConfirmModal .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#customConfirmModal .btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

#customConfirmModal .btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #ae2a2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

#customConfirmModal .btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2);
}

#customConfirmModal .bi {
    vertical-align: -0.125em;
}

/* Modal animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Ensure proper modal stacking */
#customConfirmModal {
    z-index: 1060;
}

#customConfirmModal .modal-backdrop {
    z-index: 1050;
}