/* ============================================
   Zapoteca Employee Records — Frontend Styles
   Designed to complement the Kadence/Thorne theme
   ============================================ */

/* --- Dashboard Layout --- */
.zap-dashboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

.zap-dashboard-header {
    margin-bottom: 24px;
}

.zap-dashboard-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

.zap-dashboard-subtitle {
    font-size: 15px;
    color: #646970;
    line-height: 1.6;
}

/* --- Progress Section --- */
.zap-progress-section {
    margin-bottom: 32px;
}

.zap-progress-bar-container {
    background: #e8e8e8;
    border-radius: 12px;
    height: 24px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}

.zap-progress-bar {
    background: linear-gradient(90deg, #4a9d5b, #3a8a4a);
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
    min-width: 3%;
}

.zap-progress-text {
    margin-top: 8px;
    font-size: 14px;
    color: #646970;
}

/* --- Sections --- */
.zap-section {
    margin-bottom: 32px;
}

.zap-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e8e8;
}

/* --- Item Card Grid --- */
.zap-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.zap-item-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.zap-item-card:hover {
    border-color: #c0c0c0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.zap-card-complete {
    background: #f0faf0;
    border-color: #b8e6b8;
}

.zap-card-review {
    background: #fef9e7;
    border-color: #f0d26e;
}

.zap-card-locked {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Card Status Icon --- */
.zap-card-status {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zap-status-icon {
    font-size: 24px;
    line-height: 1;
}

/* --- Card Content --- */
.zap-card-content {
    flex: 1;
}

.zap-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 6px;
    line-height: 1.3;
}

.zap-card-meta {
    font-size: 13px;
    color: #646970;
    margin: 6px 0;
    line-height: 1.5;
}

.zap-review-notice {
    color: #856404;
    font-style: italic;
}

/* --- Tier Badge --- */
.zap-tier-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.zap-tier-badge.tier-1 {
    background: #fef3cd;
    color: #856404;
}

/* --- Method Badge --- */
.zap-method-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.zap-method-badge.manual_override { background: #d1ecf1; color: #0c5460; }
.zap-method-badge.paper_import    { background: #e2d5f1; color: #563d7c; }

/* --- Buttons --- */
.zap-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.4;
    margin-top: 8px;
}

.zap-btn:active { transform: scale(0.98); }

.zap-btn-primary {
    background: #1d2327;
    color: #ffffff;
}

.zap-btn-primary:hover {
    background: #32373c;
    color: #ffffff;
}

.zap-btn-primary:disabled {
    background: #a0a5aa;
    cursor: not-allowed;
}

.zap-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
}

.zap-btn-secondary:hover {
    background: #e0e0e0;
    color: #1d2327;
}

.zap-btn-review {
    background: #f0b849;
    color: #1d2327;
}

.zap-btn-review:hover {
    background: #e5a830;
}

.zap-btn-override {
    background: #d1ecf1;
    color: #0c5460;
    font-size: 12px;
    padding: 6px 12px;
}

.zap-btn-override:hover {
    background: #b8daff;
}

/* --- Notices --- */
.zap-notice {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.zap-notice-info    { background: #e8f4fd; color: #0c5460; border: 1px solid #bee5eb; }
.zap-notice-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.zap-notice-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.zap-notice-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- Acknowledge Page --- */
.zap-acknowledge-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

.zap-version-label {
    font-size: 13px;
    color: #a0a5aa;
    margin-bottom: 20px;
}

.zap-item-content {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    line-height: 1.7;
    font-size: 15px;
}

.zap-document-link {
    margin: 20px 0;
}

.zap-acknowledge-form {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
}

.zap-acknowledge-checkbox {
    margin-bottom: 20px;
}

.zap-acknowledge-checkbox label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
}

.zap-acknowledge-checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

#zap-acknowledge-result {
    margin-top: 16px;
}

/* --- Modal (Manager Override) --- */
.zap-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zap-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.zap-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.zap-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.zap-modal-header h3 { margin: 0; }

.zap-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    padding: 4px 8px;
}

.zap-modal-body {
    padding: 24px;
}

.zap-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.zap-form-group {
    margin-bottom: 16px;
}

.zap-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.zap-form-group input,
.zap-form-group select,
.zap-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
}

.zap-form-group textarea {
    resize: vertical;
}

.zap-field-help {
    font-size: 12px;
    color: #a0a5aa;
    margin-top: 4px;
}

#zap-override-result {
    padding: 0 24px 16px;
}

/* --- Mobile responsive --- */
@media (max-width: 600px) {
    .zap-item-grid {
        grid-template-columns: 1fr;
    }

    .zap-dashboard-header h2 {
        font-size: 22px;
    }

    .zap-item-card {
        padding: 16px;
    }

    .zap-modal-content {
        width: 95%;
        margin: 16px;
    }
}

/* --- Upload Section --- */
.zap-upload-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.zap-upload-section h4 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.zap-upload-instructions {
    font-size: 13px;
    color: #646970;
    margin-bottom: 12px;
}

.zap-upload-dropzone {
    border: 2px dashed #c0c0c0;
    border-radius: 10px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    background: #fafafa;
}

.zap-upload-dropzone:hover,
.zap-upload-dropzone.zap-dragover {
    border-color: #4a9d5b;
    background: #f0faf0;
}

.zap-upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.zap-upload-dropzone p {
    margin: 0;
    font-size: 14px;
    color: #646970;
}

.zap-upload-link {
    color: #1d2327;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.zap-upload-preview {
    background: #f0faf0;
    border: 1px solid #b8e6b8;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.zap-file-name {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
}

.zap-file-size {
    font-size: 13px;
    color: #646970;
}

.zap-btn-remove-file {
    background: none;
    border: 1px solid #dc3232;
    color: #dc3232;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
}

.zap-btn-remove-file:hover {
    background: #dc3232;
    color: #fff;
}

/* --- Signature Field --- */
.zap-signature-section {
    margin: 20px 0;
}

.zap-signature-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.zap-signature-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    font-size: 16px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    border: 1px solid #c0c0c0;
    border-radius: 6px;
    border-bottom: 2px solid #1d2327;
    background: #fafafa;
    transition: border-color 0.2s;
}

.zap-signature-input:focus {
    outline: none;
    border-color: #4a9d5b;
    border-bottom-color: #4a9d5b;
    background: #fff;
}

/* --- Agreement Page --- */
.zap-agreement-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
}

.zap-agreement-instructions {
    font-size: 15px;
    color: #646970;
    margin-bottom: 24px;
}

.zap-agreement-preview {
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 40px;
    margin: 20px 0 32px;
    max-height: 600px;
    overflow-y: auto;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.06);
    font-family: 'Times New Roman', Times, serif;
    font-size: 12pt;
    line-height: 1.5;
}

.zap-agreement-signing {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #1d2327;
}

.zap-agreement-signing h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* --- Intake Form (Mobile-First) --- */
.zap-login-box {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.zap-login-box label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #1d2327;
}

.zap-login-box input[type="text"],
.zap-login-box input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.zap-login-box input[type="submit"] {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: #1d2327;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.zap-login-box input[type="submit"]:hover {
    background: #32373c;
}

.zap-login-box p.forgetmenot {
    margin-top: 12px;
}

/* --- Intake Form (Mobile-First) continued --- */
.zap-intake-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
}

.zap-intake-subtitle {
    font-size: 15px;
    color: #646970;
    margin-bottom: 24px;
}

.zap-intake-group {
    margin-bottom: 16px;
}

.zap-intake-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #1d2327;
}

.zap-intake-group input,
.zap-intake-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}

.zap-intake-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23646970' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.zap-intake-group input:focus,
.zap-intake-group select:focus {
    outline: none;
    border-color: #4a9d5b;
    box-shadow: 0 0 0 2px rgba(74, 157, 91, 0.15);
}

.zap-intake-row {
    display: flex;
    gap: 12px;
}

.zap-intake-half {
    flex: 1;
}

.zap-btn-full {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 8px;
}

.zap-required {
    color: #dc3232;
}

@media (max-width: 480px) {
    .zap-intake-row {
        flex-direction: column;
        gap: 0;
    }

    .zap-intake-page {
        padding: 0 12px;
    }
}

/* --- Policy Directory --- */
.zap-policy-directory {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

.zap-policy-category {
    margin-bottom: 32px;
}

.zap-policy-category h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8e8e8;
}

.zap-policy-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zap-policy-link {
    display: block;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #1d2327;
    text-decoration: none;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.zap-policy-link:hover {
    border-color: #4a9d5b;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    color: #1d2327;
}

.zap-policy-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}
