/* Contact Directory Layout Fix */

/* Navigation Bar - Make it horizontal */
.navigation-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.nav-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #3b82f6;
}

/* Stats Row - Make it horizontal */
.stats-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-mini i {
    font-size: 20px;
    color: #6b7280;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* Controls Section */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.controls-left {
    flex: 1;
    max-width: 400px;
}

.controls-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Search Box */
.search-box {
    position: relative;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
    z-index: 2;
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 45px !important;  /* Force left padding to prevent overlap */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;  /* Ensure text is dark in light mode */
    transition: all 0.2s;
    text-indent: 0 !important;  /* Reset any text-indent that might be applied */
}

#searchInput {
    padding-left: 45px !important;  /* Specific override for search input */
}

.search-box input::placeholder {
    color: #9ca3af;
    padding-left: 0;  /* Ensure placeholder doesn't have extra padding */
}

.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    padding-left: 45px !important;  /* Maintain padding on focus */
}

.clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: all 0.2s;
    z-index: 2;
}

.clear-search:hover {
    color: #374151;
    background: rgba(107, 114, 128, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: white;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.btn-outline:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* File Upload Label */
.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

/* Table Styles */
#standardTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#standardTable thead th {
    background: #f9fafb;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

#standardTable tbody td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
}

#standardTable tbody tr:hover {
    background: #f9fafb;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #f3f4f6;
}

.view-btn-action {
    color: #3b82f6;
    border-color: #bfdbfe;
}

.view-btn-action:hover {
    background: #eff6ff;
}

.card-btn-action {
    color: #10b981;
    border-color: #a7f3d0;
}

.card-btn-action:hover {
    background: #f0fdf4;
}

.delete-btn {
    color: #ef4444;
    border-color: #fecaca;
}

.delete-btn:hover {
    background: #fef2f2;
}

/* Dark Theme Support */
body.theme-dark .navigation-bar,
body.theme-dark .controls,
body.theme-dark .table-container {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.theme-dark .nav-btn {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

body.theme-dark .nav-btn:hover {
    background: rgba(71, 85, 105, 0.9);
}

body.theme-dark .nav-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-color: #3b82f6;
}

body.theme-dark .stat-mini {
    background: rgba(51, 65, 85, 0.8);
    border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark .stat-number {
    color: #f1f5f9;
}

body.theme-dark .stat-label {
    color: #94a3b8;
}

body.theme-dark .search-box input {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.3);
    color: #ffffff !important;  /* Changed to pure white for better visibility */
}

body.theme-dark .search-box input::placeholder {
    color: #cbd5e1 !important;  /* Lighter placeholder text for better visibility */
}

body.theme-dark .search-box i {
    color: #cbd5e1 !important;  /* Lighter search icon */
}

body.theme-dark .clear-search {
    color: #94a3b8;  /* Visible clear button */
}

body.theme-dark .clear-search:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.2);
}

/* Report search input - dark theme */
body.theme-dark #reportSearchInput {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(148, 163, 184, 0.3);
    color: #ffffff !important;  /* White text for visibility */
}

body.theme-dark #reportSearchInput::placeholder {
    color: #cbd5e1 !important;  /* Lighter placeholder */
}

body.theme-dark .report-search i {
    color: #cbd5e1 !important;  /* Lighter icon */
}

body.theme-dark #standardTable thead th {
    background: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
    border-bottom-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark #standardTable tbody td {
    color: #cbd5e1;
    border-bottom-color: rgba(148, 163, 184, 0.1);
}

body.theme-dark #standardTable tbody tr:hover {
    background: rgba(51, 65, 85, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navigation-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-row {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls-left {
        width: 100%;
        max-width: none;
    }
    
    .controls-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
    }
}