/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.2em;
}

.login-header p {
    color: #666;
    font-size: 0.95em;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
}

.demo-credentials {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.demo-credentials h4 {
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 0.95em;
    font-weight: 600;
}

.demo-credentials p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #424242;
}

.demo-credentials strong {
    color: #1976d2;
}

.btn-demo-fill {
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85em;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.btn-demo-fill:hover {
    background: #1976d2;
}

.btn-demo-fill i {
    margin-right: 6px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 38px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.remember-me {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    color: #666;
}

.remember-me input {
    margin-right: 8px;
    width: auto;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.admin-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.85em;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.customer-sidebar {
    background: #34495e;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 1.4em;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #3498db;
}

.sidebar-menu i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    border-top: 1px solid #34495e;
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #e74c3c;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.1);
}

.logout-btn i {
    margin-right: 10px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: #f8f9fa;
}

.dashboard-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2em;
    margin-right: 15px;
    cursor: pointer;
    color: #666;
}

.header-left h1 {
    color: #2c3e50;
    font-size: 1.8em;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    color: #666;
}

.user-info i {
    margin-left: 10px;
    font-size: 1.5em;
    color: #3498db;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease-in;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5em;
}

.stat-info h3 {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #2c3e50;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-card h2 {
    margin-bottom: 10px;
    font-size: 1.8em;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.6em;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85em;
}

/* Tables */
.customers-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
}

.customers-table th,
.customers-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.customers-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.customers-table tr:hover {
    background: #f8f9fa;
}

/* Document Cards */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.document-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.document-card:hover {
    transform: translateY(-2px);
}

.document-icon {
    font-size: 2.5em;
    color: #e74c3c;
    margin-bottom: 15px;
}

.document-info h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.document-info p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.document-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Upload Area */
.upload-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.upload-area {
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e3f2fd;
}

.upload-icon {
    font-size: 3em;
    color: #dee2e6;
    margin-bottom: 20px;
}

.upload-area h3 {
    color: #495057;
    margin-bottom: 10px;
}

.upload-area p {
    color: #6c757d;
    margin-bottom: 20px;
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-info {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.upload-info h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.upload-info ul {
    list-style: none;
}

.upload-info li {
    padding: 5px 0;
    color: #666;
    position: relative;
    padding-left: 20px;
}

.upload-info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Search Box */
.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95em;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Profile Styles */
.profile-container {
    max-width: 800px;
}

.profile-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

.profile-avatar {
    font-size: 4em;
    color: #3498db;
    margin-right: 25px;
}

.profile-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.profile-info p {
    color: #666;
    margin-bottom: 5px;
}

/* Settings Tabs */
.settings-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #dee2e6;
}

.tab-buttons .tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background: none;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-buttons .tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.profile-form,
.password-form,
.notifications-form {
    max-width: 500px;
}

.profile-form .form-group,
.password-form .form-group,
.notifications-form .form-group {
    margin-bottom: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-group input {
    margin-right: 10px;
    width: auto;
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #dc3545;
    transition: all 0.3s ease;
}

.password-strength.weak::after {
    width: 33%;
    background: #dc3545;
}

.password-strength.medium::after {
    width: 66%;
    background: #ffc107;
}

.password-strength.strong::after {
    width: 100%;
    background: #28a745;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease-in;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 25px 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.4em;
}

.close {
    font-size: 2em;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close:hover {
    color: #666;
}

.modal form {
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Recent Activity */
.recent-activity {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.recent-activity h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.activity-list {
    color: #666;
}

.no-activity {
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Settings Form */
.settings-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 600px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block !important;
    }
    
    .upload-container {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        width: 100%;
        margin-top: 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .dashboard-header {
        padding: 15px 20px;
    }
    
    .content-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-tabs {
        flex-direction: column;
    }
    
    .document-actions {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .customers-table-container {
        overflow-x: auto;
    }
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: capitalize;
    display: inline-block;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .modal-content {
        width: 95% !important;
        margin: 10px auto !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .documents-grid {
        grid-template-columns: 1fr !important;
    }
    
    .profile-card {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .tab-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .customers-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .customers-table {
        min-width: 700px;
    }
    
    .document-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .document-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .modal-content {
        width: 98% !important;
        margin: 5px auto !important;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .document-card {
        padding: 15px;
    }
}

/* Prevent caching of dynamic content */
.no-cache {
    cache: none;
    pragma: no-cache;
    expires: 0;
}