/* License Admin Web Interface - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
}

.container {
    flex: 1;
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-brand i {
    margin-right: 8px;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-link.active {
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

.btn i {
    margin-right: 5px;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-text {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.alert i {
    margin-right: 8px;
}

/* Login Page */
.card.shadow {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Dashboard Stats Cards */
.card.text-center i {
    opacity: 0.8;
}

.card.text-center h3 {
    font-weight: 700;
    font-size: 2.5rem;
    margin: 1rem 0 0.5rem 0;
}

/* Code blocks */
code {
    color: #d63384;
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.font-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

footer a {
    color: #6c757d;
    text-decoration: none;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Loading Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table {
        font-size: 0.875rem;
    }
    
    .card.text-center h3 {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

/* Status indicators */
.status-online {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--success-color);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.status-offline {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--danger-color);
    border-radius: 50%;
    margin-right: 8px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Empty state styling */
.text-center.py-5 i {
    opacity: 0.5;
}

/* Input group adjustments */
.input-group .form-control:focus {
    z-index: 2;
}

/* Card hover effects for action cards */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
}

/* License code display */
.license-code-display {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* Success state */
.success-checkmark {
    color: var(--success-color);
    font-size: 4rem;
    animation: checkmark-pop 0.5s ease;
}

@keyframes checkmark-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Utility classes */
.text-uppercase {
    text-transform: uppercase !important;
}

.cursor-pointer {
    cursor: pointer;
}

.border-dashed {
    border-style: dashed !important;
}

/* Timeline styles for activation history */
.timeline {
    position: relative;
}

.timeline-event {
    position: relative;
    padding-left: 0;
}

.timeline-event:not(:last-child) {
    border-left: 2px solid #e9ecef;
    margin-left: 0.75rem;
    padding-left: 2rem;
}

.timeline-event:last-child {
    padding-left: 2rem;
    margin-left: 0.75rem;
}

.timeline-event .bi {
    position: absolute;
    left: -0.875rem;
    background-color: white;
    padding: 0.25rem;
    border-radius: 50%;
}

.timeline-event h6 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.timeline-event p {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

/* Modal improvements for history */
.modal-lg {
    max-width: 800px;
}

#historyTimeline {
    max-height: 400px;
    overflow-y: auto;
}

/* Scrollbar styling for timeline */
#historyTimeline::-webkit-scrollbar {
    width: 8px;
}

#historyTimeline::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#historyTimeline::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#historyTimeline::-webkit-scrollbar-thumb:hover {
    background: #555;
}
