body {
    background-color: #FFFFFF;
    font-family: "Cairo", "Tajawal", "Noto Sans Arabic", sans-serif;
    margin: 0;
    padding: 0;
    direction: rtl;
    line-height: 1.6; /* Added for better text readability */
    color: #333; /* Default text color for general content */
}

:root {
    --primary-color: #0A164F; /* Deep Navy Blue */
    --secondary-color: #E9E6FD; /* Soft Pastel Purple */
}

.page-wrapper { /* This class would be added in index.php */
    display: flex;
    min-height: 100vh;
    background-color: #FFFFFF; /* Ensure wrapper is white */
}

/* Left Section / Sidebar */
.left-section {
    width: 280px; /* Fixed width for the sidebar */
    background-color: #FFFFFF; /* Ensure sidebar background is explicitly white */
    padding: 30px 20px;
    /* border-right: 1px solid #e0e0e0; */ /* Removed */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items like avatar and title */
    text-align: center; /* Center text for title and menu items */
}

.avatar-placeholder-wrapper {
    margin-bottom: 15px;
}

.avatar-placeholder {
    width: 120px;   /* Adjust size as needed */
    height: 120px;  /* Adjust size as needed */
    background-color: #cccccc; /* Placeholder color */
    border-radius: 50%;
    margin-bottom: 10px; /* Space between avatar and title */
    /* In a real scenario, this would be an <img> tag or a div with a background image */
}

.main-title {
    font-size: 28px; /* Adjust as needed */
    font-weight: bold;
    color: var(--primary-color); /* Or another color if specified */
    margin-bottom: 30px;
}

.vertical-submenu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.vertical-submenu li {
    margin-bottom: 10px;
}

.submenu-button {
    display: block;
    background-color: var(--secondary-color); /* Soft Pastel Purple */
    color: var(--primary-color); /* Navy text on pastel */
    padding: 12px 15px;
    text-decoration: none;
    border-radius: 18px; /* Rounded pill shape */
    font-size: 16px;
    text-align: center; /* Ensure text is centered if not inheriting */
    transition: background-color 0.3s ease;
}

.submenu-button:hover, .submenu-button.active {
    background-color: var(--primary-color); /* Navy Blue for hover/active */
    color: white;
    /* Add slight shadow if desired */
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

.right-section {
    width: calc(100% - 280px); /* Adjust width based on left-section */
    padding: 20px;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF; /* Ensure right section background is explicitly white */
}

/* Right Section - Main Content Area */
.right-section-main-content {
    padding-top: 0; /* Removed previous padding-top as .top-right-buttons now has margin-bottom */
    flex-grow: 1; /* Ensure it takes available vertical space */
    background-color: #FFFFFF;
}

.masar-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between masar buttons */
}

.masar-button {
    display: block; /* Make them take full width available */
    background-color: var(--primary-color); /* Deep Navy Blue */
    color: white;
    padding: 25px 20px; /* Large padding for height and internal spacing */
    text-decoration: none;
    border-radius: 18px; /* Rounded corners */
    font-size: 18px; /* Larger font size */
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    /* box-shadow: 0 2px 4px rgba(0,0,0,0.05); Optional: subtle shadow */
}

.masar-button:hover {
    background-color: #081443; /* Slightly darker navy */
    /* box-shadow: 0 4px 8px rgba(0,0,0,0.1); Optional: more prominent shadow on hover */
}

.top-right-buttons {
    text-align: left; /* Buttons will be on the right in RTL */
    padding-bottom: 20px;
    /* border-bottom: 1px solid #eee; */ /* Removed */
    margin-bottom: 20px; /* Added margin to replace border for spacing */
}

.action-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 24px;
    text-decoration: none;
    border-radius: 24px; /* Pill shape */
    margin-left: 10px; /* Space between buttons */
    display: inline-block;
    font-size: 14px;
}

.action-button:hover {
    opacity: 0.9;
}

/* Responsive Styles */

/* Tablet View - Targetting screens <= 992px (Bootstrap's lg breakpoint is a common reference) */
@media (max-width: 992px) {
    .page-wrapper {
        flex-direction: column; /* Stack left and right sections */
    }

    .left-section {
        width: 100%; /* Take full width */
        border-right: none; /* Ensure no border if it was re-added elsewhere */
        padding: 20px; /* Adjust padding if needed for full width */
        /* Consider if text/avatar alignment needs to change */
    }

    .right-section {
        width: 100%; /* Take full width */
    }

    .main-title {
        font-size: 24px; /* Slightly smaller title for tablet */
        margin-bottom: 20px;
    }

    .avatar-placeholder {
        width: 100px;
        height: 100px;
    }

    .submenu-button {
        padding: 10px 12px;
        font-size: 15px;
    }

    .top-right-buttons {
        display: flex;
        flex-wrap: wrap; /* Allow buttons to wrap */
        justify-content: center; /* Center buttons if they wrap */
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .action-button {
        margin: 5px; /* Add margin for wrapped buttons */
        font-size: 13px;
        padding: 8px 18px;
    }

    .masar-button {
        font-size: 17px;
        padding: 20px 15px;
    }
}

/* Mobile View - Targetting screens <= 576px (Bootstrap's sm breakpoint) */
@media (max-width: 576px) {
    .left-section {
        padding: 15px;
    }

    .right-section {
        padding: 15px;
    }

    .main-title {
        font-size: 22px; /* Even smaller title */
    }

    .avatar-placeholder {
        width: 80px;
        height: 80px;
    }

    .submenu-button {
        font-size: 14px;
        padding: 10px;
    }

    .action-button {
        font-size: 12px;
        padding: 8px 15px;
        width: calc(50% - 10px); /* Example: make buttons take half width */
        text-align: center;
    }

    .top-right-buttons{
         justify-content: space-between; /* Distribute space for two buttons per row */
    }

    .masar-button {
        font-size: 16px;
        padding: 18px 15px;
    }
}
