/* Custom CSS for Admin Panel */

/* Base Font Configuration for Hindi Support */
* {
    font-family: 'Inter', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

/* Specific classes for Hindi text rendering */
.hindi-text {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Table content with Hindi support */
.table-hindi td,
.table-hindi th {
    font-family: 'Noto Sans Devanagari', 'Inter', sans-serif;
    line-height: 1.6;
}

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

@keyframes pulse-blue {
    0%, 100% { background-color: rgb(239 246 255); }
    50% { background-color: rgb(219 234 254); }
}

@keyframes pulse-green {
    0%, 100% { background-color: rgb(240 253 244); }
    50% { background-color: rgb(220 252 231); }
}

/* Animation Classes */
.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.pulse-blue {
    animation: pulse-blue 2s infinite;
}

.pulse-green {
    animation: pulse-green 2s infinite;
}

/* Filter and Search Highlights */
.filter-highlight {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Custom Scrollbars */
.search-dropdown {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Form Elements */
.form-focus:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toggle Switch Styles */
.toggle-switch {
    transition: all 0.3s ease;
}

.toggle-switch:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.toggle-switch:checked:after {
    transform: translateX(100%);
    background-color: white;
}

.toggle-switch:after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    background-color: #6b7280;
    border-radius: 50%;
    height: 20px;
    width: 20px;
    transition: all 0.3s ease;
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    transform: translateY(-1.5rem) scale(0.875);
    color: #3b82f6;
}

.floating-label {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    background: white;
    padding: 0 0.25rem;
    color: #6b7280;
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Breadcrumb Dividers */
.breadcrumb-divider::before {
    content: '>';
    color: #d1d5db;
    margin: 0 0.5rem;
}

/* Form Cards */
.form-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
}

/* Inline Editing Styles */
.inline-edit-container .suburb-name-display,
.inline-edit-container .city-name-display {
    cursor: pointer;
    transition: all 0.2s ease;
}

.inline-edit-container .suburb-name-display:hover,
.inline-edit-container .city-name-display:hover {
    background-color: rgb(239 246 255);
    border-radius: 0.375rem;
}

.inline-edit-container .suburb-name-edit,
.inline-edit-container .city-name-edit {
    min-width: 200px;
}

.inline-edit-container .suburb-name-input,
.inline-edit-container .city-name-input {
    width: 100%;
    min-width: 200px;
}

/* Button Styles */
.btn-save {
    background-color: #10b981;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.btn-save:hover {
    background-color: #059669;
}

.btn-cancel {
    background-color: #6b7280;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.btn-cancel:hover {
    background-color: #4b5563;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    min-width: 100%;
}

.data-table th {
    background-color: #f9fafb;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table th.sortable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.data-table th.sortable:hover {
    background-color: #f3f4f6;
}

.data-table td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background-color: #f9fafb;
    transition: background-color 0.15s ease;
}

/* Avatar Styles */
.avatar-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.875rem;
    color: white;
}

.avatar-gradient-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.avatar-gradient-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.avatar-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.avatar-gradient-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Status Badge Styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge-active {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-badge-inactive {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot-active {
    background-color: #10b981;
}

.status-dot-inactive {
    background-color: #ef4444;
}

/* Action Button Styles */
.action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn-edit {
    background-color: rgb(219 234 254) !important;
    color: #1d4ed8;
}

.action-btn-edit:hover {
    background-color: rgb(191 219 254) !important;
    transform: translateY(-1px);
}

.action-btn-delete {
    background-color: rgb(254 226 226) !important;
    color: #dc2626;
}

.action-btn-delete:hover {
    background-color: rgb(252 165 165) !important;
    transform: translateY(-1px);
}

.action-btn svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
    transition: transform 0.2s ease;
}

.action-btn:hover svg {
    transform: scale(1.1);
}

/* Stats Card Styles */
.stats-card {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid;
}

.stats-card-blue {
    background: linear-gradient(135deg, rgb(239 246 255), rgb(219 234 254));
    border-color: rgb(191 219 254);
}

.stats-card-green {
    background: linear-gradient(135deg, rgb(240 253 244), rgb(220 252 231));
    border-color: rgb(187 247 208);
}

.stats-card-red {
    background: linear-gradient(135deg, rgb(254 242 242), rgb(254 226 226));
    border-color: rgb(252 165 165);
}

.stats-card-purple {
    background: linear-gradient(135deg, rgb(245 243 255), rgb(237 233 254));
    border-color: rgb(221 214 254);
}

.stats-icon {
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.stats-icon-blue {
    background-color: rgb(191 219 254);
}

.stats-icon-green {
    background-color: rgb(187 247 208);
}

.stats-icon-red {
    background-color: rgb(252 165 165);
}

.stats-icon-purple {
    background-color: rgb(221 214 254);
}

/* Filter Panel Styles */
.filter-panel {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.filter-section-title svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    color: #3b82f6;
}

/* Active Filter Tags */
.filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.filter-tag-search {
    background-color: #dbeafe;
    color: #1e40af;
}

.filter-tag-status {
    background-color: #e9d5ff;
    color: #7c2d12;
}

.filter-tag button {
    margin-left: 0.5rem;
    transition: color 0.2s ease;
}

.filter-tag button:hover {
    color: #dc2626;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

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

/* Toast Notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-info {
    background-color: #3b82f6;
    color: white;
}

.toast-warning {
    background-color: #f59e0b;
    color: white;
}

.toast.show {
    transform: translateX(0);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state svg {
    width: 3rem;
    height: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stats-card {
        padding: 0.75rem;
    }
    
    .filter-panel {
        padding: 1rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 1rem;
    }
    
    .action-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.6875rem;
    }
    
    .inline-edit-container .suburb-name-input,
    .inline-edit-container .city-name-input {
        min-width: 150px;
    }
}

/* Utility Classes */
.text-gradient-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-green {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.border-gradient {
    border: 1px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #e5e7eb, #d1d5db) border-box;
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    .form-card {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
    
    .filter-panel {
        background: #1f2937;
        border-color: #374151;
    }
    
    .data-table th {
        background-color: #1f2937;
        color: #d1d5db;
    }
    
    .data-table tr:hover {
        background-color: #374151;
    }
}