.ea-form-wrapper,
.ea-dashboard {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    direction: rtl;
    text-align: right;
}

/* Form */

.ea-form {
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(15,23,42,0.12);
}

.ea-form-row {
    margin-bottom: 1rem;
}

.ea-form-row label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.ea-form-row input,
.ea-form-row select,
.ea-form-row textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

.ea-form-row input[readonly] {
    background: #f9fafb;
}

.ea-form-actions {
    text-align: left;
}

.ea-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.ea-btn-primary {
    background: linear-gradient(135deg,#0ea5e9,#22c55e);
    color: #fff;
}

.ea-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(34,197,94,0.35);
}

.ea-btn-secondary {
    background: #0f172a;
    color: #fff;
}

.ea-btn-link {
    background: transparent;
    color: #0f172a;
    text-decoration: underline;
}

.ea-notice {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    margin: 1rem 0;
}

.ea-notice-error {
    background: #fee2e2;
    color: #b91c1c;
}

.ea-notice-success {
    background: #dcfce7;
    color: #166534;
}

/* Dashboard */

.ea-dashboard {
    max-width: 1200px;
    margin: 1.5rem auto;
}

.ea-row {
    margin-bottom: 1.75rem;
}

.ea-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ea-col {
    background: #ffffff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(15,23,42,0.08);
    position: relative;
}

/* Force all three graphs on same row on desktop: 3 equal columns */
.ea-col-50,
.ea-col-25 {
    flex: 1 1 33.333%;
}

.ea-col h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* Filters */

.ea-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ea-filters label {
    font-size: 0.85rem;
    font-weight: 600;
}

.ea-filters input {
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
}

/* Table */

.ea-table-wrapper {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 20px rgba(15,23,42,0.08);
}

.ea-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ea-table thead {
    background: #f3f4f6;
}

.ea-table th,
.ea-table td {
    padding: 0.6rem 0.75rem;
    white-space: nowrap;
}

.ea-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.ea-table-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.ea-table-filters input,
.ea-table-filters select {
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.85rem;
}

/* Modal */

.ea-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ea-modal-content {
    background: #ffffff;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    padding: 1.25rem 1.5rem;
    position: relative;
}

.ea-modal-close {
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
}

.ea-modal-body dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
}

.ea-modal-body dt {
    font-weight: 600;
}

.ea-modal-body dd {
    margin: 0;
}

.ea-modal-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

/* Chart center values */

.ea-chart-center-value {
    position: absolute;
    top: 50%;
    inset-inline: 0;
    transform: translateY(-25%);
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    pointer-events: none;
}

/* Responsive */

@media (max-width: 900px) {
    .ea-col-50,
    .ea-col-25 {
        flex: 1 1 100%;
    }
}
