/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e8ba3 100%);
    min-height: 100vh;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
    transform: perspective(1000px) rotateX(2deg);
    transition: all 0.3s ease;
}

.header:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-5px);
    box-shadow: 
        0 35px 60px rgba(0, 0, 0, 0.2),
        0 15px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.logo i {
    font-size: 2.5rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-profile i {
    font-size: 2rem;
    color: white;
    opacity: 0.9;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.user-profile-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
}

.notification-btn {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(240, 240, 255, 0.8) 100%);
    backdrop-filter: blur(15px);
    border-radius: 25px 25px 0 0;
    padding: 1.5rem;
    gap: 0.75rem;
    border-bottom: 3px solid rgba(102, 126, 234, 0.2);
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
}

.nav-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.nav-tab {
    flex: 1;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(248, 248, 255, 0.6) 100%);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 18px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transform: perspective(1000px) rotateX(2deg);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.nav-tab:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(248, 248, 255, 0.75) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.nav-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: perspective(1000px) rotateX(0deg) translateY(-3px);
    box-shadow: 
        0 12px 20px rgba(102, 126, 234, 0.3),
        0 4px 8px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.nav-tab i {
    font-size: 1.1rem;
}

/* Tab Content */
.tab-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Card Styles */
.card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 255, 0.9) 100%);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    transform: perspective(1000px) rotateX(1deg);
    transition: all 0.3s ease;
}

.card:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-8px);
    box-shadow: 
        0 30px 50px rgba(0, 0, 0, 0.2),
        0 12px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-header h2 i {
    font-size: 1.3rem;
    opacity: 0.9;
}

.card-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
}

.card-header h3 i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.card-body {
    padding: 2rem;
}

/* Form Styles */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 700;
    color: black;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: inline-block;
}

.form-control {
    padding: 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 248, 255, 0.9) 100%);
    font-family: inherit;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.05);
    transform: perspective(1000px) rotateX(1deg);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    border-width: 2px;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 6px rgba(102, 126, 234, 0.15),
        0 8px 16px rgba(102, 126, 234, 0.2);
    transform: perspective(1000px) rotateX(0deg) translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 248, 255, 0.95) 100%);
}

.form-control:hover {
    border-color: #667eea;
    box-shadow: 
        inset 0 3px 6px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 4px 8px rgba(0, 0, 0, 0.08);
    transform: perspective(1000px) rotateX(0deg) translateY(-1px);
}

.form-control::placeholder {
    color: #6c757d;
    font-style: italic;
    opacity: 0.8;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-size: 1.25rem;
}

input[type="date"].form-control,
input[type="time"].form-control {
    cursor: pointer;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator,
input[type="time"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}

/* Required field indicator */
.form-group.required label::after {
    content: '*';
    color: #dc3545;
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Form field states */
.form-control:valid {
    border-color: #28a745;
    box-shadow: inset 0 2px 4px rgba(40, 167, 69, 0.1);
}

.form-control:invalid {
    border-color: #dc3545;
    box-shadow: inset 0 2px 4px rgba(220, 53, 69, 0.1);
}

/* Floating labels */
.form-group.floating-label {
    position: relative;
}

.form-group.floating-label label {
    position: absolute;
    top: 1.25rem;
    left: 1rem;
    font-size: 1rem;
    color: #6c757d;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 0.25rem;
}

.form-group.floating-label .form-control:focus + label,
.form-group.floating-label .form-control:not(:placeholder-shown) + label {
    top: -0.5rem;
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
}

/* Enhanced input groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-control {
    padding-left: 2.5rem;
}

.input-group-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1rem;
    z-index: 1;
    transition: color 0.3s ease;
}

.input-group:focus-within .input-group-icon {
    color: #667eea;
}

/* Search input enhancements */
.search-input {
    padding-left: 3rem;
    background: white url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'/%3e%3cpath d='m21 21-4.35-4.35-9.65 0-9.65 4.35-4.35 9.65 0 9.65-4.35 4.35-9.65 0z'/%3e%3c/svg%3e") no-repeat 1rem center;
    background-size: 1rem;
}

.search-input:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='8'/%3e%3cpath d='m21 21-4.35-4.35-9.65 0-9.65 4.35-4.35 9.65 0 9.65-4.35 4.35-9.65 0z'/%3e%3c/svg%3e");
}

/* File input styling */
input[type="file"].form-control {
    padding: 0.75rem;
    border: 2px dashed #667eea;
    background: #f8f9ff;
    cursor: pointer;
}

input[type="file"].form-control:hover {
    background: #e7f3ff;
    border-style: solid;
}

/* Checkbox and radio styling */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-check:hover {
    background: #f8f9fa;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
}

.form-check-label {
    font-size: 1rem;
    color: #495057;
    user-select: none;
}

/* Progress indicators */
.form-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    min-width: 50px;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* User Profile Badge */
.user-profile-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

/* Checkbox styling */
.form-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-group label:has(input[type="checkbox"]) {
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

/* Form validation */
.form-control:invalid {
    border-color: #dc3545;
    box-shadow: inset 0 2px 4px rgba(220, 53, 69, 0.1);
}

.form-control:valid {
    border-color: #28a745;
    box-shadow: inset 0 2px 4px rgba(40, 167, 69, 0.1);
}

/* Enhanced modal for user form */
.modal-body .form {
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .user-profile {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .user-details {
        align-items: center;
        gap: 0.25rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: white;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recent-activities {
    margin-top: 2rem;
}

.recent-activities h3 {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.activity-title {
    font-weight: 700;
    color: white;
}

.activity-time {
    font-size: 0.85rem;
    color: #6c757d;
}

.activity-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-field {
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
}

.activity-field strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transform: perspective(1000px) rotateX(2deg);
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-3px);
    box-shadow: 
        0 12px 20px rgba(0, 0, 0, 0.2),
        0 5px 10px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: perspective(1000px) rotateX(0deg) translateY(-1px) scale(0.98);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 8px 16px rgba(102, 126, 234, 0.3),
        0 3px 6px rgba(102, 126, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    box-shadow: 
        0 12px 20px rgba(102, 126, 234, 0.4),
        0 5px 10px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3) !important;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 1.25rem 3rem 1.25rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
    background: #f8f9ff;
}

.search-box input::placeholder {
    color: #adb5bd;
    font-style: normal;
    opacity: 0.7;
}

.search-box i {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.search-box:focus-within i {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

/* Enhanced search with clear button */
.search-box-clearable {
    position: relative;
}

.search-box-clearable input {
    padding-right: 3.5rem;
}

.search-clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.search-box-clearable.has-value .search-clear-btn {
    opacity: 1;
    pointer-events: all;
}

.search-clear-btn:hover {
    background: #dc3545;
    transform: translateY(-50%) scale(1.1);
}

/* Data List */
.data-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-item {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.data-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.data-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f8f9fa;
}

.data-item-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.data-item-actions {
    display: flex;
    gap: 0.5rem;
}

.data-item-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.data-item-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-item-label {
    font-weight: 700;
    color: black;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-item-value {
    color: black;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    font-size: 1rem;
    color: #6c757d;
}

/* Photo Section */
.photo-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    background: #f8f9fa;
}

.webcam {
    width: 100%;
    max-width: 400px;
    height: 300px;
    border-radius: 8px;
    background: #000;
}

.photo-canvas {
    display: none;
}

.photo-preview {
    display: none;
    text-align: center;
}

.photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.photo-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Report Tabs */
.report-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.report-tab {
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border: none;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
}

.report-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.report-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.report-content {
    display: none;
}

.report-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Companions Section */
.companions-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.companions-section h5 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.companions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.companion-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

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

.companion-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    position: relative;
}

.companion-item h4 {
    color: #667eea;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remove-companion {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.remove-companion:hover {
    background: #c82333;
    transform: scale(1.1);
}

.companion-photo-section {
    margin-top: 1rem;
    text-align: center;
}

.companion-webcam {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border-radius: 8px;
    background: #000;
}

.companion-photo-canvas {
    display: none;
}

.companion-photo-preview {
    display: none;
    text-align: center;
}

.companion-photo-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.companion-photo-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
}

.notifications-panel.active {
    right: 0;
}

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.panel-content {
    padding: 1rem;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e7f3ff;
    border-left: 4px solid #667eea;
}

.notification-type {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-type.success {
    color: #28a745;
}

.notification-type.warning {
    color: #ffc107;
}

.notification-type.error {
    color: #dc3545;
}

.notification-message {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

.notification-time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.alert.success {
    background: #d4edda;
    color: #155724;
}

.alert.success::before {
    background: #28a745;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
}

.alert.error::before {
    background: #dc3545;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
}

.alert.info::before {
    background: #17a2b8;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-tab {
        padding: 0.75rem 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .data-item-content {
        grid-template-columns: 1fr;
    }
    
    .companions-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .notifications-panel {
        width: 100%;
        right: -100%;
    }
    
    .notifications-panel.active {
        right: 0;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .card-header {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Active Items Styling */
.active-item {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.02) 100%);
}

.active-item .data-item-header {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
}

.active-item .data-item-title {
    color: #155724;
    font-weight: 600;
}

.text-success {
    color: #28a745 !important;
}

/* File Upload Styling */
.file-upload {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

.file-item i {
    color: #667eea;
}

.file-item span {
    flex: 1;
    font-size: 0.9rem;
}

/* Users Report Styling */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.user-avatar {
    border: 2px solid #e9ecef;
}

.user-avatar-placeholder {
    border: 2px solid transparent;
}

.user-profile-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    background: #667eea;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-item-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.filter-box {
    margin-bottom: 1.5rem;
}

.filter-box .form-control {
    max-width: 300px;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

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

.status-badge.active {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.status-badge.inactive {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Report Header Styling */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.report-header .search-box {
    flex: 1;
    max-width: 400px;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Print Styles - Simplificado e Direto */
@media print {
    /* Reset básico */
    * {
        background: transparent !important;
        color: black !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }
    
    /* Mostrar conteúdo principal */
    body, .main-content, .container, .tab-pane.active, .report-content.active {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Ocultar completamente elementos desnecessários */
    .header, .nav-tabs, .report-tabs, .search-box, .filter-box, 
    .card-actions, .report-actions, .data-item-actions, .btn, 
    .empty-state, .notifications-panel, .tab-pane:not(.active), 
    .report-content:not(.active) {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Estilo para cards */
    .card {
        border: 1px solid #000 !important;
        margin-bottom: 1rem !important;
        page-break-inside: avoid;
        background: white !important;
    }
    
    .card-header {
        border-bottom: 1px solid #000 !important;
        padding: 0.5rem !important;
        background: white !important;
    }
    
    .card-body {
        padding: 0.5rem !important;
    }
    
    /* Estilo para itens de dados */
    .data-item {
        border: 1px solid #ccc !important;
        margin-bottom: 0.5rem !important;
        page-break-inside: avoid;
        background: white !important;
    }
    
    .data-item-header {
        border-bottom: 1px solid #ccc !important;
        padding: 0.3rem !important;
        background: #f5f5f5 !important;
    }
    
    .data-item-content {
        padding: 0.3rem !important;
    }
    
    /* Forçar visibilidade de listas */
    .data-list, #ownersList, #tenantsList, #visitorsList, 
    #usersList, #usersReportList, #activeTenantsList, #activeVisitorsList {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Estatísticas */
    .stats-summary {
        border: 1px solid #000 !important;
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        background: white !important;
    }
    
    .stat-item {
        border: 1px solid #ccc !important;
        margin: 0 1% 0.5rem 0 !important;
        padding: 0.5rem !important;
        text-align: center !important;
        display: inline-block !important;
        width: 23% !important;
        background: white !important;
    }
    
    /* Badges */
    .user-profile-badge, .status-badge {
        border: 1px solid #000 !important;
        padding: 0.2rem 0.5rem !important;
        background: white !important;
    }
    
    /* Títulos */
    h2, h3 {
        color: black !important;
        font-size: 14pt !important;
        margin: 1rem 0 !important;
    }
    
    /* Campos */
    .data-item-label {
        font-weight: bold !important;
    }
    
    .data-item-value {
        margin-left: 0.5rem !important;
    }
    
    /* Layout */
    .container {
        max-width: 100% !important;
        padding: 1rem !important;
    }
    
    /* Forçar que tudo seja visível */
    .tab-pane.active *, .report-content.active * {
        visibility: visible !important;
        display: block !important;
    }
    
    .tab-pane.active .data-item, .tab-pane.active .card,
    .report-content.active .data-item, .report-content.active .card {
        visibility: visible !important;
        display: block !important;
    }
    
    .tab-pane.active .data-item-header, .tab-pane.active .data-item-content,
    .report-content.active .data-item-header, .report-content.active .data-item-content {
        display: block !important;
    }
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 12px rgba(102, 126, 234, 0.2);
}

.footer p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
