/* Global Connect CRM - Custom Styles */

* {
    scrollbar-width: thin;
    scrollbar-color: #374151 #111827;
}

*::-webkit-scrollbar {
    width: 6px;
}

*::-webkit-scrollbar-track {
    background: #111827;
}

*::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

.nav-item {
    color: #9ca3af;
    position: relative;
}

.nav-item:hover {
    color: #e5e7eb;
}

.nav-item.active {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
    border-right: 3px solid #3b82f6;
}

.country-tab {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    color: #9ca3af;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.country-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
}

.country-tab.active {
    background: #2563eb;
    color: white;
}

.stat-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #1e3a5f;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background: #1e293b;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    border-bottom: 1px solid #374151;
}

.data-table thead th:first-child {
    border-radius: 0.5rem 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 0.5rem 0 0;
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #1e293b;
}

.data-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-nano { background: #064e3b; color: #6ee7b7; }
.badge-micro { background: #1e3a5f; color: #93c5fd; }
.badge-macro { background: #4c1d95; color: #c4b5fd; }
.badge-mini { background: #713f12; color: #fcd34d; }
.badge-active { background: #064e3b; color: #6ee7b7; }
.badge-pending { background: #713f12; color: #fcd34d; }
.badge-inactive { background: #7f1d1d; color: #fca5a5; }

.progress-bar {
    height: 6px;
    border-radius: 3px;
    background: #1e293b;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.vetting-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: #0f172a;
    border: 1px solid #1e293b;
    cursor: pointer;
    transition: border-color 0.2s;
}

.vetting-check:hover {
    border-color: #374151;
}

.vetting-check.checked {
    border-color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.toast-show {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Calendar styles */
.calendar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* Alert pulse animation */
@keyframes pulse-alert {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

#alert-badge:not(.hidden) {
    animation: pulse-alert 2s infinite;
}

/* Compare table highlight */
.data-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.5);
}

/* Timeline connector */
.timeline-item {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 1.5rem;
    bottom: -0.5rem;
    width: 1px;
    background: #1e293b;
}

.timeline-item:last-child::before {
    display: none;
}

/* Payment overdue row */
tr.overdue-row {
    border-left: 3px solid #ef4444;
}

/* Export button hover */
button[onclick*="export"]:hover {
    transform: translateY(-1px);
}

/* Country profile cards */
.profile-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid #1e3a5f;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

/* Light Mode */
body.light-mode {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

body.light-mode #sidebar {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-mode #sidebar .nav-item {
    color: #475569;
}

body.light-mode #sidebar .nav-item:hover {
    color: #0f172a;
    background: rgba(59, 130, 246, 0.05);
}

body.light-mode #sidebar .nav-item.active {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.08);
    border-right-color: #2563eb;
}

body.light-mode #sidebar p,
body.light-mode #sidebar .text-gray-500,
body.light-mode #sidebar .text-gray-600 {
    color: #94a3b8 !important;
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #e2e8f0 !important;
}

body.light-mode .bg-gray-900 {
    background: #ffffff !important;
}

body.light-mode .bg-gray-950 {
    background: #f1f5f9 !important;
}

body.light-mode .bg-gray-800,
body.light-mode .bg-gray-800\/50 {
    background: #f8fafc !important;
}

body.light-mode .border-gray-800,
body.light-mode .border-gray-700 {
    border-color: #e2e8f0 !important;
}

body.light-mode .text-gray-100,
body.light-mode .text-white {
    color: #0f172a !important;
}

body.light-mode .text-gray-400,
body.light-mode .text-gray-300 {
    color: #64748b !important;
}

body.light-mode .text-gray-500 {
    color: #94a3b8 !important;
}

body.light-mode .data-table thead th {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-bottom-color: #e2e8f0 !important;
}

body.light-mode .data-table tbody td {
    border-bottom-color: #f1f5f9 !important;
}

body.light-mode .data-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.04) !important;
}

body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #0f172a !important;
}

body.light-mode .country-tab {
    color: #475569;
}

body.light-mode .country-tab.active {
    background: #2563eb;
    color: white;
}

body.light-mode #modal-content {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body.light-mode .progress-bar {
    background: #e2e8f0 !important;
}

body.light-mode h1, body.light-mode h2, body.light-mode h3 {
    color: #0f172a !important;
}
