/* ---------------------- Container ---------------------- */
.fjc-container {
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
    max-width: 950px;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Headings */
.fjc-container h3 {
    margin: 20px 0 12px;
    font-size: 1.25rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 6px;
}

/* Inputs & Selects */
.fjc-container input[type="text"],
.fjc-container select {
    padding: 8px 12px;
    margin: 6px 8px 6px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 160px;
    transition: border-color 0.2s;
}

.fjc-container input[type="text"]:focus,
.fjc-container select:focus {
    border-color: #0073aa;
    outline: none;
}

/* Buttons */
.fjc-container button {
    padding: 8px 16px;
    margin: 4px;
    background: linear-gradient(145deg,#0073aa,#005f8d);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.fjc-container button:hover {
    background: linear-gradient(145deg,#005f8d,#0073aa);
    transform: translateY(-1px);
}

/* Table */
.fjc-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 0.95rem;
}

.fjc-container table th,
.fjc-container table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: right;
    vertical-align: middle;
}

.fjc-container table th {
    background: #f7f7f7;
    color: #333;
    font-weight: 600;
}

.fjc-container table tbody tr:nth-child(even) {
    background: #fafafa;
}

.fjc-container table tbody tr:hover {
    background: #f0f8ff;
}

/* Table Buttons */
.fjc-container .fjc-edit-btn {
    background: #ffa500;
}

.fjc-container .fjc-edit-btn:hover {
    background: #e69500;
}

.fjc-container .fjc-delete-btn {
    background: #e74c3c;
}

.fjc-container .fjc-delete-btn:hover {
    background: #c0392b;
}

/* Messages */
#fjc-messages p {
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 6px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.fjc-message-success {
    background: #e6f4ea;
    border: 1px solid #bfe3c7;
    color: #1f6f35;
}

.fjc-message-error {
    background: #fdecea;
    border: 1px solid #f5b6b6;
    color: #8b1c1c;
}

/* ---------------------- Modal (unchanged) ---------------------- */
.fjc-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.fjc-modal-content {
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    width: 420px;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    direction: rtl;
}

/* Save & Cancel base style */
.fjc-save-btn, .fjc-cancel-btn {
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-right: 6px;
    color: #fff;
}

/* Save button */
.fjc-save-btn {
    background: #28a745 !important;
}

.fjc-save-btn:hover {
    background: #218838 !important;
    transform: translateY(-1px);
}

/* Cancel button */
.fjc-cancel-btn {
    background: #e74c3c !important;
    position: absolute;
    left: 12px;
}

.fjc-cancel-btn:hover {
    background: #c0392b !important;
    transform: translateY(-1px);
}

/* Modal Close (×) */
.fjc-modal-close-btn {
    position: absolute;
    left: 12px;
    font-size: 16px;
    cursor: pointer;
    background: #e74c3c;
    border-radius: 20px;
    padding: 4px 12px;
    color: #fff;
}


/* ---------------------- Responsive ---------------------- */
@media(max-width: 640px) {
    .fjc-container input[type="text"],
    .fjc-container select,
    .fjc-container button {
        width: 100%;
        margin: 6px 0;
    }
    .fjc-container table th,
    .fjc-container table td {
        font-size: 0.9rem;
        padding: 8px;
    }
}
