* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.logo-container h1 {
    color: #4a69bd;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.logo-container p {
    color: #666;
    font-size: 1.1em;
}

.login-tabs {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tab-btn {
    padding: 15px 30px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn.active {
    background: #4a69bd;
    color: white;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    display: none;
}

.login-form.active {
    display: block;
}

.login-form h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #4a69bd;
    font-size: 1.5em;
}

.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #4a69bd;
}

.login-form button {
    width: 100%;
    padding: 15px;
    background: #4a69bd;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-form button:hover {
    background: #3c5aa6;
}

/* Header */
.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.header h2 {
    color: #4a69bd;
    font-size: 1.5em;
    display: flex;
    align-items: center;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.client-info-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.client-info-card h3 {
    color: #4a69bd;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a69bd;
}

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item .value {
    font-size: 1.1em;
    color: #333;
    margin-top: 5px;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { background: #fff3cd; color: #856404; }
.status-review { background: #cce5ff; color: #004085; }
.status-additional { background: #f8d7da; color: #721c24; }
.status-submitted { background: #d4edda; color: #155724; }
.status-interview { background: #e2e3e5; color: #383d41; }
.status-approved { background: #d1ecf1; color: #0c5460; }
.status-rejected { background: #f5c6cb; color: #721c24; }
.status-hold { background: #ffeaa7; color: #6c757d; }

.priority-high { color: #e74c3c; font-weight: bold; }
.priority-urgent { color: #c0392b; font-weight: bold; animation: pulse 2s infinite; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.photo-container {
    text-align: center;
    margin: 20px 0;
}

.passport-photo {
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid #4a69bd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.documents-list {
    margin-top: 20px;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.document-item:hover {
    background: #e9ecef;
}

.document-item i {
    margin-right: 10px;
    color: #4a69bd;
}

/* Admin Content */
.admin-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.control-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: #4a69bd;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #3c5aa6;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-container input {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 250px;
}

.search-container button {
    padding: 10px 15px;
    background: #4a69bd;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.search-container button:hover {
    background: #3c5aa6;
}

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

.data-controls button {
    padding: 10px 15px;
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.data-controls button:hover {
    background: #138496;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.client-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.client-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.client-photo {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    border: 2px solid #4a69bd;
}

.client-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.client-id {
    color: #666;
    font-size: 0.9em;
    margin-top: 2px;
}

.client-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.client-actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    flex: 1;
    transition: background 0.3s ease;
}

.btn-edit:hover {
    background: #218838;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-content.large {
    max-width: 1000px;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: #4a69bd;
    color: white;
    padding: 20px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5em;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

#clientForm {
    padding: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a69bd;
}

.form-group input[readonly] {
    background: #f8f9fa;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #545b62;
}

.file-preview {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-item {
    position: relative;
    display: inline-block;
}

.preview-img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        flex-direction: column;
    }

    .search-container input {
        width: 100%;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .header-content {
        padding: 0 15px;
    }

    .dashboard-content,
    .admin-content {
        padding: 20px 15px;
    }
}

/* Error States */
.error {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 5px;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a69bd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Payment Status */
.payment-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
}

.payment-paid {
    background: #d4edda;
    color: #155724;
}

.payment-partial {
    background: #fff3cd;
    color: #856404;
}

.payment-pending {
    background: #f8d7da;
    color: #721c24;
}