/* Modern Dashboard Styles */

/* Dashboard Wrapper - Special container for dashboard pages */
.dashboard-wrapper {
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
    min-height: 100vh;
}

/* Dashboard Header */
.modern-dashboard-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 1.5rem 0;
    margin: 0 0 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.modern-dashboard-header .dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.modern-dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-dashboard-header h1 i {
    color: white;
    opacity: 0.9;
    font-size: 1.5rem;
}

.modern-dashboard-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

/* Dashboard Container */
.dashboard-container {
    padding: 0 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Stats Grid - Ultra Compact */
.modern-stats-grid {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.modern-stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.modern-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.stat-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.stat-card-icon.active {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
}

.stat-card-icon.recent {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card-icon.total {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-card-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1;
    display: inline;
}

.stat-card-label {
    font-size: 0.625rem;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1;
    font-weight: 500;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    font-size: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
    color: #6b7280;
    margin-left: 0.25rem;
}

.stat-card-trend.up {
    color: #10b981;
}

/* Compact stat card content layout */
.stat-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stat-card-body {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    line-height: 1;
}

/* Search Section */
.modern-search-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    width: 100%;
}

.modern-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modern-search-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-search-title i {
    color: #4f46e5;
}

.modern-search-form .input-group {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.modern-search-form .input-group:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modern-search-form input {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #1f2937;
}

.modern-search-form input::placeholder {
    color: #9ca3af;
}

.modern-search-form .input-group-append button {
    background: #4f46e5;
    border: none;
    padding: 0 1.5rem;
    color: white;
    transition: all 0.2s ease;
}

.modern-search-form .input-group-append button:hover {
    background: #4338ca;
}

/* Visitor Section */
.modern-visitor-section {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    width: 100%;
}

.modern-visitor-header {
    background: #f9fafb;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modern-visitor-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-visitor-title i {
    color: #4f46e5;
}

.modern-visitor-badge {
    background: #4f46e5;
    color: white;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.modern-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.modern-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
    background: #f9fafb;
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

/* Visitor Photo in Table */
.visitor-photo-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.visitor-photo-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

/* Modern Buttons */
.btn-modern {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-modern-primary {
    background: #4f46e5;
    color: white;
}

.btn-modern-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.btn-modern-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-modern-danger {
    background: #ef4444;
    color: white;
}

.btn-modern-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Empty State */
.modern-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.modern-empty-icon {
    font-size: 4rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.modern-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.modern-empty-description {
    color: #6b7280;
    margin: 0;
}

/* Base Table Styles */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.75rem;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    color: #4b5563;
}

/* Fix checkbox alignment */
.checkbox-item {
    margin: 0 !important;
    vertical-align: middle !important;
}

/* Fix select dropdown alignment */
#bulk_actions select.form-control {
    height: calc(1.5em + .75rem + 2px) !important;
    padding: .375rem .75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: #495057 !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid #ced4da !important;
    border-radius: .25rem !important;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    display: inline-block !important;
    width: auto !important;
    vertical-align: middle !important;
}

/* Fix form inline alignment */
#bulk_actions .form-inline {
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* Fix checkout button */
#bulk_actions .btn-warning {
    vertical-align: middle !important;
    margin-left: 1rem !important;
}

/* DataTables Styling */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem !important;
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    box-sizing: border-box !important;
    display: inline-block !important;
    min-width: 1.5em !important;
    padding: 0.5em 1em !important;
    margin-left: 2px !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    color: #333 !important;
    border: 1px solid transparent !important;
    border-radius: 2px !important;
    background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: white !important;
    border: 1px solid #4f46e5 !important;
    background: #4f46e5 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: white !important;
    border: 1px solid #4f46e5 !important;
    background: #4f46e5 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    cursor: default !important;
    color: #666 !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    opacity: 0.5 !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length {
    padding: 0.5rem 0 !important;
    margin: 0 !important;
}

.dataTables_wrapper .row {
    margin: 0 !important;
}

.dataTables_wrapper .col-sm-12,
.dataTables_wrapper .col-md-5,
.dataTables_wrapper .col-md-7 {
    padding: 0 !important;
}

/* Visitor info styling */
.visitor-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.visitor-name {
    font-weight: 600;
    color: #1f2937;
}

.visitor-details {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Badge styling */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .modern-stats-grid {
        gap: 0.5rem;
    }
    
    .stat-card-value {
        font-size: 0.75rem;
    }
    
    .stat-card-label {
        font-size: 0.45rem;
    }
    
    .modern-dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .modern-dashboard-header p {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .modern-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    

    .modern-search-header {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-visitor-header {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-table {
        font-size: 0.875rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 0.75rem 0.5rem;
    }
}

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

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

/* Remove old container padding rules */

/* Premium Stats Cards */
.premium-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

.premium-stat-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.premium-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.stat-card-background {
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200%;
    height: 200%;
    opacity: 0.03;
    background: radial-gradient(circle, currentColor 1%, transparent 1%);
    background-size: 20px 20px;
    transform: rotate(-15deg);
    transition: opacity 0.3s ease;
}

.premium-stat-card:hover .stat-card-background {
    opacity: 0.06;
}

.stat-card-content {
    position: relative;
    z-index: 1;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.active-visitors .stat-icon-wrapper {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.checked-out .stat-icon-wrapper {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.total-today .stat-icon-wrapper {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
}

.premium-stat-card:hover .stat-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.04);
}

.stat-trend.up {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.stat-trend.down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.stat-trend i {
    font-size: 0.75rem;
}

.stat-badge {
    background: #1e293b;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-body {
    margin-bottom: 1.25rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}

.stat-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
}

.stat-indicator.active::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.stat-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.stat-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
}

/* Responsive Stats */
@media (max-width: 768px) {
    .premium-stats-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .premium-stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

