/* --- ESD DASHBOARD BASE STYLES --- */
body.esd-dashboard-body {
    background-color: #f4f6f8 !important;
    font-family: 'Montserrat', 'Arial', sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
}

.esd-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.esd-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.esd-icon-success {
    font-size: 48px;
    color: #2ec4b6;
    margin-bottom: 20px;
}

.esd-card h1 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.esd-card p {
    color: #666666;
    font-size: 15px;
    line-height: 1.6;
}

.esd-btn-logout {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #e63946;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.esd-btn-logout:hover {
    background-color: #d62828;
}

/* --- ESD AUTH FORM STYLES (UPGRADED UI) --- */
.esd-auth-wrapper {
    max-width: 520px;
    margin: 60px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    font-family: 'Montserrat', sans-serif;
}
.esd-auth-form h2 {
    margin-top: 0;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 5px;
    font-size: 28px;
    font-weight: 800;
}
.esd-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

/* Toggle Slider */
.esd-toggle-container {
    display: flex;
    position: relative;
    background-color: #f1f3f5;
    border-radius: 50px;
    padding: 5px;
    margin-bottom: 25px;
}
.esd-toggle-container input[type="radio"] {
    display: none;
}
.esd-toggle-btn {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
    margin: 0;
}
.esd-toggle-slider {
    position: absolute;
    top: 5px;
    left: 5px;
    width: calc(50% - 5px);
    height: calc(100% - 10px);
    background-color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}
#type-supplier:checked ~ .esd-toggle-slider {
    transform: translateX(100%);
}
#type-customer:checked ~ label[for="type-customer"],
#type-supplier:checked ~ label[for="type-supplier"] {
    color: #1a1a1a;
}

/* Hidden Utility */
.esd-hidden {
    display: none !important;
}

/* Inputs */
.esd-input-group {
    margin-bottom: 20px;
}
.esd-input-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    color: #444;
}
.esd-input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fafafa;
}
.esd-input-group input:focus {
    outline: none;
    border-color: #e63946;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

/* Plan Selection Cards */
.esd-section-label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 15px;
    text-align: center;
    color: #1a1a1a;
}
.esd-plan-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}
.esd-plan-wrapper {
    cursor: pointer;
}
.esd-plan-wrapper input[type="radio"] {
    display: none;
}
.esd-plan-card {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 15px;
    background: #ffffff;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-sizing: border-box;
}
.esd-plan-card strong {
    display: block;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 5px;
}
.esd-price {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}
.esd-plan-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: #555;
    text-align: left;
}
.esd-plan-card ul li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.esd-plan-card ul li i.fa-check { color: #2ec4b6; }

/* Plan Checked States */
.esd-plan-wrapper input[type="radio"]:checked + .esd-plan-card {
    border-color: #1a1a1a;
    background-color: #f8f9fa;
}
.esd-plan-wrapper input[type="radio"]:checked + .esd-premium-card {
    border-color: #e63946;
    background-color: #fff5f5;
}

/* Premium Badge */
.esd-premium-card {
    border-color: #fecdd3;
    padding-top: 25px; /* Extra room for badge */
}
.esd-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e63946;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
}
.esd-badge i {
    color: #ffd166; /* Gold crown */
    font-size: 12px;
}

/* Submit Button */
#esd-submit-btn {
    width: 100%;
    background: #e63946;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
#esd-submit-btn:hover {
    background: #d62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}
#esd-submit-btn:disabled {
    background: #ffb3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.esd-form-msg {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}
.esd-form-msg.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.esd-form-msg.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }