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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #4472C4;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4472C4;
}

.captcha-group .captcha-input-wrapper {
    display: flex;
    gap: 10px;
}

.captcha-image {
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #4472C4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #3457A8;
}

.error-message {
    background: #FEE;
    color: #C33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* Dashboard */
.dashboard {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-admin {
    padding: 8px 16px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-admin:hover {
    background: #5a67d8;
}

.btn-logout {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s;
}

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

/* Upload Section */
.upload-section {
    margin-bottom: 30px;
}

.upload-section h3 {
    margin-bottom: 15px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    transition: border-color 0.3s;
}

.upload-area:hover {
    border-color: #4472C4;
}

.upload-area p {
    color: #666;
}

.btn-browse {
    color: #4472C4;
    cursor: pointer;
    font-weight: 500;
}

.upload-hint {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-upload {
    padding: 12px 24px;
    background: #4472C4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    align-self: flex-start;
}

/* Resume List */
.resume-list-section {
    margin-top: 30px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.list-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.list-filters label {
    font-size: 14px;
    color: #666;
}

.list-filters select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    outline: none;
}

.list-filters select:focus {
    border-color: #4472C4;
}

.list-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-parse, .btn-export, .btn-refresh {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-parse:hover:not(:disabled), .btn-export:hover, .btn-refresh:hover {
    background: #f5f5f5;
}

.btn-parse:disabled, .btn-export:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-parse { background: #4472C4; color: #fff; border-color: #4472C4; }
.btn-export { background: #28a745; color: #fff; border-color: #28a745; }

.resume-table {
    width: 100%;
    border-collapse: collapse;
}

.resume-table th,
.resume-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.resume-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.resume-table tbody tr:hover {
    background: #fafafa;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending { background: #FFF3CD; color: #856404; }
.status-processing { background: #CCE5FF; color: #004085; }
.status-success { background: #D4EDDA; color: #155724; }
.status-failed { background: #F8D7DA; color: #721C24; }

.badge-exported {
    display: inline-block;
    background: #E8E8E8;
    color: #666;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.tags-cell {
    color: #e67e22;
    font-weight: 500;
}

.btn-parse-one, .btn-view {
    padding: 6px 12px;
    background: #4472C4;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
}

.btn-delete {
    padding: 6px 12px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

#messageArea {
    margin: 15px 0;
}

.message {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
}

.message.success {
    background: #D4EDDA;
    color: #155724;
}

.message.error {
    background: #F8D7DA;
    color: #721C24;
}

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

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.result-table {
    width: 100%;
    margin-top: 20px;
}

.result-table th {
    width: 120px;
    text-align: left;
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.result-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}
/* Admin Panel */
.admin-section {
    margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-create {
    padding: 10px 20px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-create:hover {
    background: #5a67d8;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.admin-table tbody tr:hover {
    background: #fafafa;
}

.role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.role-badge.admin {
    background: #667eea;
    color: #fff;
}

.role-badge.user {
    background: #e2e8f0;
    color: #666;
}

.btn-action {
    padding: 6px 12px;
    background: #e2e8f0;
    color: #333;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 5px;
}

.btn-action:hover {
    background: #cbd5e1;
}

.btn-action.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-action.btn-danger:hover {
    background: #c82333;
}

.btn-back {
    padding: 8px 16px;
    background: #e2e8f0;
    color: #333;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-back:hover {
    background: #cbd5e1;
}

/* Form Section */
.form-section {
    max-width: 500px;
    margin: 0 auto;
}

.admin-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-submit {
    padding: 12px 24px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #5a67d8;
}

.btn-cancel {
    padding: 12px 24px;
    background: #e2e8f0;
    color: #333;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #cbd5e1;
}

/* Selected files display */
.selected-files {
    margin-top: 10px;
}

.selected-files-list {
    background: #e8f4fd;
    border: 1px solid #b8d4e8;
    border-radius: 6px;
    padding: 10px 15px;
    margin-top: 10px;
    font-size: 13px;
    color: #2c5e7a;
    word-break: break-all;
}
