/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f0e6d3;
    color: #2c1810;
    font-family: 'Alef', sans-serif;
    font-size: 18px;
    direction: rtl;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ===== Logo & Header ===== */
#logo_wrapper {
    display: flex;
    justify-content: center;
    padding: 20px 10px;
    background: linear-gradient(135deg, #8b5e3c, #a0522d, #cd853f);
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

#logo_header {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.logo-text {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo-subtitle {
    font-size: 20px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: -5px;
}

/* ===== Section Icons ===== */
.section_icon {
    font-size: 40px;
    text-align: center;
    margin-top: 25px;
    margin-bottom: 5px;
}

/* ===== Input Area ===== */
.input_heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

.input_heading_title {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #5a3825;
}

.input_sub_area_dob {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.input_sub_area_name {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.input_dob {
    width: 45px;
    padding: 6px;
    text-align: center;
    border: 2px solid #a0522d;
    border-radius: 6px;
    font-family: 'Alef', sans-serif;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s;
}

.input_dob:focus {
    border-color: #cd853f;
    outline: none;
    box-shadow: 0 0 5px rgba(205, 133, 63, 0.4);
}

.input_name {
    width: 150px;
    padding: 6px;
    text-align: right;
    border: 2px solid #a0522d;
    border-radius: 6px;
    font-family: 'Alef', sans-serif;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s;
}

.input_name:focus {
    border-color: #cd853f;
    outline: none;
    box-shadow: 0 0 5px rgba(205, 133, 63, 0.4);
}

.born_time {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    gap: 5px;
    width: 100%;
}

.born_time input[type="checkbox"] {
    accent-color: #a0522d;
}

#name_input_break {
    display: none;
}

label {
    color: #5a3825;
    font-weight: 400;
}

/* ===== Submit Buttons ===== */
#reading_submit,
#reading_submit_rel {
    margin: 12px;
    padding: 8px 25px;
    cursor: pointer;
    background: linear-gradient(135deg, #a0522d, #8b4513);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Alef', sans-serif;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

#reading_submit:hover,
#reading_submit_rel:hover {
    background: linear-gradient(135deg, #8b4513, #6b3410);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#reading_submit:active,
#reading_submit_rel:active {
    transform: translateY(0);
}

/* ===== Reading Details ===== */
#reading_details_wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 15px;
}

.reading_details_heading {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #5a3825;
    text-align: center;
}

.reading_section {
    padding-top: 10px;
    text-align: center;
    font-size: 18px;
}

.reading_section.hebrew {
    text-align: right;
    background: #fff;
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    width: 90vw;
}

.reading_section.hebrew > div {
    padding: 5px 0;
    border-bottom: 1px solid #f0e6d3;
}

.reading_section.hebrew > div:last-child {
    border-bottom: none;
}

.reading_data_title {
    font-weight: 700;
    color: #5a3825;
    margin-left: 4px;
}

/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
    max-width: 95vw;
}

table.table_data {
    border-collapse: collapse;
    margin: 10px auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

td.table_data {
    border: 1px solid #d4c4b0;
    text-align: center;
    padding: 6px 8px;
    font-size: 15px;
}

table.table_data tr:first-child td {
    background: #a0522d;
    color: #fff;
    font-weight: 700;
    border-color: #8b4513;
}

.table_heading {
    display: flex;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #5a3825;
    margin: 10px 0;
}

/* ===== Clickable Numbers ===== */
.clickable-number {
    cursor: pointer;
    color: #8b4513;
    font-weight: 700;
    transition: color 0.2s;
}

.clickable-number:hover {
    color: #cd853f;
}

.clickable-number.summary_clicked {
    color: #2e8b57;
}

/* ===== Reading Summary Panel ===== */
#reading_summary_wrapper {
    position: sticky;
    bottom: 15px;
    margin: 15px;
    padding: 15px;
    background: #fff;
    border: 2px solid #a0522d;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-size: 16px;
    z-index: 100;
}

#reading_summary_wrapper.reading_summary_wrapper {
    display: block;
}

.reading_summary {
    text-align: right;
    line-height: 1.6;
}

.reading_summary_close {
    cursor: pointer;
    border: 1px solid #a0522d;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #a0522d;
    float: left;
    transition: all 0.2s;
}

.reading_summary_close:hover {
    background: #a0522d;
    color: #fff;
}

/* ===== Reload Button ===== */
.reload_wrapper {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.reload_btn {
    padding: 8px 20px;
    cursor: pointer;
    background: #fff;
    border: 2px solid #a0522d;
    border-radius: 8px;
    font-family: 'Alef', sans-serif;
    font-size: 16px;
    color: #a0522d;
    transition: all 0.2s;
}

.reload_btn:hover {
    background: #a0522d;
    color: #fff;
}

/* ===== Footer ===== */
.customer_service {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
    padding: 8px;
    text-align: center;
    font-size: 14px;
}

.customer_service a {
    color: #8b4513;
    text-decoration: none;
}

.customer_service a:hover {
    text-decoration: underline;
}

.privacy {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    text-align: center;
    padding: 5px;
    font-size: 12px;
}

.privacy a {
    color: #8b4513;
    text-decoration: none;
}

.privacy a:hover {
    text-decoration: underline;
}

.copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
    text-align: center;
    padding: 10px 5px 20px;
    font-size: 12px;
    color: #8b6f5e;
}

/* ===== Relationship Section ===== */
#relationship_details_wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

/* ===== Login Screen ===== */
#login_screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0e6d3, #e8d5be);
}

#login_box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    width: 90%;
    max-width: 380px;
    text-align: center;
}

#login_box .login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    color: #5a3825;
}

#login_box .login-logo .logo-text {
    font-size: 36px;
    color: #8b4513;
}

#login_box .login-logo .logo-subtitle {
    font-size: 16px;
    color: #a0522d;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form label {
    text-align: right;
    font-weight: 700;
    color: #5a3825;
    font-size: 15px;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d4c4b0;
    border-radius: 8px;
    font-family: 'Alef', sans-serif;
    font-size: 16px;
    text-align: right;
    transition: border-color 0.2s;
}

.login-input:focus {
    border-color: #a0522d;
    outline: none;
    box-shadow: 0 0 5px rgba(160, 82, 45, 0.3);
}

.login-btn {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #a0522d, #8b4513);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Alef', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: linear-gradient(135deg, #8b4513, #6b3410);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.login-error {
    color: #c0392b;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 700;
}

/* ===== Logout Button ===== */
.footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.logout_btn {
    background: #fff;
    border: 2px solid #a0522d;
    border-radius: 8px;
    padding: 5px 15px;
    color: #a0522d;
    font-family: 'Alef', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout_btn:hover {
    background: #a0522d;
    color: #fff;
}

/* ===== Client Page Export Button ===== */
#client_page_wrapper {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.client_page_btn {
    padding: 10px 25px;
    background: linear-gradient(135deg, #2e8b57, #228b22);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Alef', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.client_page_btn:hover {
    background: linear-gradient(135deg, #228b22, #1a6b1a);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== Error Message ===== */
.error-message {
    color: #c0392b;
    text-align: center;
    font-weight: 700;
    padding: 10px;
}

/* ===== Responsive ===== */
@media only screen and (max-width: 700px) {
    body {
        font-size: 15px;
    }

    .logo-text {
        font-size: 32px;
    }

    .logo-subtitle {
        font-size: 16px;
    }

    .input_dob {
        width: 12vw;
    }

    .input_name {
        width: 35vw;
    }

    #name_input_break {
        display: inline;
    }

    .reading_section.hebrew {
        width: 95vw;
        padding: 10px 12px;
    }

    td.table_data {
        padding: 4px 3px;
        font-size: 12px;
    }

    .reading_details_heading {
        font-size: 22px;
    }
}
