/* VIN Checker v2 - Custom CSS */

/* Base Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #eab308;
    --info-color: #0ea5e9;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
    --sidebar-bg: #1e293b;
    --header-height: 60px;
    
    /* Role-specific sidebar colors */
    --superadmin-sidebar-bg: #357DED; /* Azure - for Super Admin */
    --admin-sidebar-bg: #5438DC;      /* Palatinate blue - for Admin NARSA */
    --centre-sidebar-bg: #B24C63;     /* China rose - for Centre */
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
    background-color: #f1f5f9;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Sidebar */
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Role-specific sidebar colors */
.sidebar-superadmin {
    background-color: var(--superadmin-sidebar-bg);
}

.sidebar-admin {
    background-color: var(--admin-sidebar-bg);
}

.sidebar-centre {
    background-color: var(--centre-sidebar-bg);
}

/* Role indicators in the user profile section */
.sidebar-superadmin .user-role-indicator {
    background-color: #a6c8ff; /* Light azure */
    color: #1a4490;
}

.sidebar-admin .user-role-indicator {
    background-color: #b8b5ff; /* Light palatinate blue */
    color: #2d1e7e;
}

.sidebar-centre .user-role-indicator {
    background-color: #ffb6c1; /* Light china rose */
    color: #722f41;
}

.sidebar-body {
    padding: 20px 0;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-title {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 20px;
    margin-bottom: 5px;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #cbd5e1;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-link i {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left: 3px solid var(--primary-color);
}

/* Role-specific active link styles */
.sidebar-superadmin .nav-link.active {
    border-left-color: #a6c8ff; /* Light azure */
}

.sidebar-admin .nav-link.active {
    border-left-color: #b8b5ff; /* Light palatinate blue */
}

.sidebar-centre .nav-link.active {
    border-left-color: #ffb6c1; /* Light china rose */
}

.nav-separator {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 10px 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* Cards */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.stats-grid a {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease;
}

.stats-grid a:hover {
    text-decoration: none;
    transform: translateY(-3px);
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stat-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.stat-card.active-filter {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
}

.stat-card .value {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

/* Specific colors for different stat cards when active */
a:nth-child(1) .stat-card.active-filter {
    border-color: var(--dark-color);
    background-color: #f8fafc;
}

a:nth-child(2) .stat-card.active-filter {
    border-color: var(--danger-color);
    background-color: #fef2f2;
}

a:nth-child(3) .stat-card.active-filter {
    border-color: var(--info-color);
    background-color: #f0f9ff;
}

a:nth-child(4) .stat-card.active-filter {
    border-color: var(--success-color);
    background-color: #f0fdf4;
}

a:nth-child(5) .stat-card.active-filter {
    border-color: var(--warning-color);
    background-color: #fffbeb;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
    background-color: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--danger-color);
}

.is-invalid {
    border-color: var(--danger-color);
}

.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #475569;
    border-color: #475569;
    text-decoration: none;
}

.btn-success {
    color: #fff;
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #334155;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    font-weight: 600;
    background-color: #f8fafc;
}

.table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 999px;
}

.badge-primary {
    color: #fff;
    background-color: var(--primary-color);
}

.badge-secondary {
    color: #fff;
    background-color: var(--secondary-color);
}

.badge-success {
    color: #fff;
    background-color: var(--success-color);
}

.badge-danger {
    color: #fff;
    background-color: var(--danger-color);
}

.badge-warning {
    color: #fff;
    background-color: var(--warning-color);
}

.badge-info {
    color: #fff;
    background-color: var(--info-color);
}

.badge-dark {
    color: #fff;
    background-color: var(--dark-color);
}

/* Progress */
.progress {
    display: flex;
    height: 0.5rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e2e8f0;
    border-radius: 9999px;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

.progress-bar.bg-success {
    background-color: var(--success-color);
}

.progress-bar.bg-info {
    background-color: var(--info-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    overflow: auto;
    padding: 20px;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--secondary-color);
}

/* Login Form */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f1f5f9;
    padding: 20px;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

/* Utilities */
.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

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

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

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

.bg-info {
    background-color: var(--info-color);
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.hidden {
    display: none !important;
}

/* Flash Message Enhancements */
.message {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 6px;
    border-width: 2px;
    border-style: solid;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-content {
    flex-grow: 1;
    padding: 0.5rem 0;
    font-weight: 500;
}

.message.success {
    background-color: #e8f7ef;
    color: #0d6832;
    border-color: #34c074;
    box-shadow: 0 2px 8px rgba(52, 192, 116, 0.25);
}

/* Special styling for password reset messages */
.message.success.password-reset {
    font-size: 1.05em;
    border-width: 3px;
    background-color: #dcfce7;
    box-shadow: 0 3px 10px rgba(52, 192, 116, 0.35);
}

/* Password highlight styling */
.password-container {
    display: flex;
    align-items: center;
    margin: 5px 0;
    max-width: 100%;
    flex-wrap: wrap;
}

.highlight-password {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1em;
    border: 1px solid #0d6832;
    display: inline-block;
    margin-right: 8px;
    letter-spacing: 0.5px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #ffffff;
    color: #0d6832;
    border: 1px solid #0d6832;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 5px 0;
}

.copy-btn svg {
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: #f0fdf4;
}

.copy-btn:active {
    transform: translateY(1px);
}

.copy-success {
    background-color: #dcfce7;
    color: #0d6832;
    border-color: #16a34a;
}

.message.error {
    background-color: #fdf0ef;
    color: #b91c1c;
    border-color: #ef4444;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.message.warning {
    background-color: #fffbeb;
    color: #a16207;
    border-color: #f59e0b;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

/* Default info message */
.message:not(.success):not(.error):not(.warning) {
    background-color: #eff6ff;
    color: #1e40af;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.close-btn {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.close-btn:hover {
    opacity: 1;
}

.w-100 {
    width: 100%;
}

/* Animations */
.animate-spin {
    animation: spin 1s linear infinite;
}

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