/* --- GLOBAL WRAPPER & TYPOGRAPHY --- */
.me-tool-wrapper, .me-dashboard-wrapper {
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    font-family: inherit;
    position: relative;
    box-sizing: border-box;
}

.me-step { display: none; }
.me-step.active { display: block; animation: fadeIn 0.4s ease; }

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

/* --- FORM ELEMENTS --- */
.me-form-group {
    margin-bottom: 25px;
    position: relative;
}

.me-form-group label {
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #333;
    font-weight: 400; 
}

.me-form-group label strong {
    font-weight: 700;
    color: #000;
}

.me-desc {
    color: #333;
    margin-bottom: 20px;
    font-size: 0.95em;
}

input[type="email"], input[type="text"], select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: #fafafa;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: #e63946;
    background: #fff;
}

.me-input-disabled {
    background-color: #eee !important;
    color: #888;
    cursor: not-allowed;
}

/* --- VALIDATION & MESSAGES --- */
.me-error-border {
    border-color: #e63946 !important;
    background-color: #fff8f8 !important;
}

.me-error-msg {
    color: #e63946;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
    font-weight: 600;
}

.me-otp-success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9em;
    border: 1px solid #c3e6cb;
    text-align: center;
}

/* --- PROGRESS BAR --- */
.me-progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-bottom: 30px;
    overflow: hidden;
    max-width: 100%;
}

.me-progress-fill {
    height: 100%;
    background: #e63946; 
    border-radius: 4px;
    transition: width 0.3s ease;
    max-width: 100%;
}

/* --- RADIO CARDS --- */
.me-radio-cards label {
    display: block;
    padding: 15px;
    border: 2px solid #eee;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.me-radio-cards label:hover { border-color: #ddd; }
.me-radio-cards input:checked + span { font-weight: bold; color: #e63946; }
.me-radio-cards input[type="radio"] { margin-right: 10px; }

/* --- BUTTONS --- */
.me-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px; 
}

button.me-btn-next, button.me-btn-submit, #me-btn-verify, #me-btn-dash-login {
    background: #e63946;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 18px; 
    transition: background 0.2s;
}

button.me-btn-next:hover { background: #d62839; }

button.me-btn-prev {
    background: #eee;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 18px; 
}

button:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- DASHBOARD STYLES --- */
.me-dashboard-login {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

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

.me-user-info {
    font-size: 0.95em;
    color: #555;
}

#me-btn-logout {
    margin-left: 15px;
    color: #e63946;
    text-decoration: none;
    font-weight: 600;
}

.me-empty-state {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #777;
}

.me-entry-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.me-entry-card:hover { transform: translateY(-2px); }

.me-entry-card.paid { border-left: 5px solid #2a9d8f; }
.me-entry-card.unpaid { border-left: 5px solid #e9c46a; }

.me-card-main h3 { margin: 0 0 5px 0; font-size: 1.1em; color: #333; }
.me-meta { font-size: 0.85em; color: #888; display: block; }

.me-status-badge {
    display: inline-block;
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 5px;
}
.me-status-badge.paid { background: #e0fbf6; color: #2a9d8f; }
.me-status-badge.free { background: #d4edda; color: #155724; }
.me-status-badge.unpaid { background: #fff8e1; color: #d4a017; }

.me-card-actions {
    display: flex;
    align-items: center;
}

.me-card-actions button {
    font-size: 0.85em;
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}

.me-btn-view { background: #2a9d8f; color: white; }
.me-btn-view:hover { opacity: 0.9; }

.me-btn-resume { background: #f0f0f0; color: #999; cursor: not-allowed; }

.me-btn-delete { 
    background: white; 
    color: #e63946; 
    border: 1px solid #e63946 !important; 
    font-size: 1.2em; 
    padding: 4px 10px !important; 
    line-height: 1; 
}
.me-btn-delete:hover { background: #e63946; color: white; }

/* --- MODAL --- */
#me-contract-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.98);
    z-index: 9999;
    overflow-y: auto;
    padding: 60px 20px;
}

#me-close-modal {
    position: fixed;
    top: 20px; right: 20px;
    background: #333; color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    z-index: 10000;
    border-radius: 4px;
    font-weight: bold;
}

#me-modal-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .me-tool-wrapper, .me-dashboard-wrapper { padding: 20px; }
    .me-entry-card { flex-direction: column; align-items: flex-start; }
    .me-card-actions { margin-top: 15px; width: 100%; display: flex; justify-content: space-between; }
    .me-card-actions button { margin-left: 0; }
    .me-dashboard-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    #me-btn-logout { margin-left: 0; }
}

/* --- FREE TOOL RESULT STYLES --- */
.me-free-tool-result {
    animation: fadeIn 0.4s ease;
}

.me-free-tool-result .me-download-pdf-btn {
    background: #2a9d8f;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(42, 157, 143, 0.3);
}

.me-free-tool-result .me-download-pdf-btn:hover {
    background: #238276;
    transform: translateY(-2px);
}

.me-free-tool-result .me-download-pdf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}