* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 0;
    margin: 0;
    background-color: #e6e6e6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px;
    box-shadow: none;
    border-radius: 0;
    background-color: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.logo {
    display: none;
}

.logo img {
    max-width: 200px;
    margin-bottom: 10px;
}

.logo h1 {
    color: white;
    font-size: 1.3em;
}

.data-entry-section {
    background-color: #e8eef7;
    padding: 20px;
    padding-top: 55px;  /* Space for the header */
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
}

.data-entry-section h2 {
    position: absolute;
    top: 15px;
    left: 55px;  /* Space after menu button */
    font-size: 16px;
    color: #333;
    z-index: 1;
}

.input-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 8px;
}

.input-group label {
    font-size: 13px;
    margin-bottom: 2px;
    display: block;
}

.input-with-unit {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

input[type="number"] {
    font-size: 13px;
    padding: 4px 8px;
    background-color: white;
    border: none;
    color: #333;
    width: calc(100% - 35px);  /* Increased space for unit */
    height: 30px;
    border-radius: 4px;
    margin-right: 35px;  /* Increased right margin */
}

.unit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 13px;
    color: #666;
    width: 30px;  /* Increased width for unit */
    height: 30px;
}

.unit img {
    height: 12px;
    width: auto;
    vertical-align: middle;
}

.rate {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 15px;  /* Reduced padding */
}

.rate .unit {
    position: static;
    transform: none;
    width: auto;
    height: auto;
}

.allowances-section {
    display: flex;
    gap: 40px;
}

.allowances-column {
    flex: 1;
}

.checkbox-group {
    margin-bottom: 5px;
    padding: 8px 10px;
    font-size: 13px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 4px;
}

.checkbox-group label {
    margin-left: 8px;
    color: #333;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
}

.checkbox-group::after,
.checkbox-group::before {
    display: none;
    content: none;
}

.checkbox-group input[type="checkbox"] + label::after,
.checkbox-group input[type="checkbox"] + label::before {
    display: none;
    content: none;
}

.results-section {
    background-color: #c8d1db;
    padding: 20px;
    border-radius: 4px;
    margin-top: auto;
    margin-bottom: 0;
}

.tables-container {
    display: flex;
    flex-direction: column;
    gap: 20px;  /* Increased gap between tables */
}

.tables-container table:not(:first-child) {
    position: relative;
    padding-top: 10px;
}

.tables-container table:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #b8c4d0;
    border-radius: 1px;
}

.tables-container tr:not(.section-header) {
    background-color: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 5px;
}

.tables-container td {
    padding: 8px 10px;
    font-size: 13px;
    color: #333;
}

.tables-container tr:not(.section-header) td:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.tables-container tr:not(.section-header) td:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.section-header td {
    font-weight: bold;
    color: #4a6da7;
    padding-top: 20px;
    padding-bottom: 10px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-header:first-child td {
    padding-top: 5px;
}

.tables-container tr {
    margin-bottom: 4px;
}

.tables-container tr:last-child td {
    border-bottom: none;
}

.divider {
    height: 2px;
    background-color: #b8c4d0;
    margin: 20px 0;
}

.final-result {
    text-align: center;
    padding: 20px;
    background-color: #e6e6e6;
    border-radius: 4px;
}

.final-result .calculate-btn {
    margin-bottom: 20px;
}

.total-amount {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}

.amount-wrapper {
    display: flex;
    align-items: center;
    gap: 2px;
}

.total-amount .unit {
    position: static;
    transform: none;
    margin-left: 2px;
    padding: 0;
    width: auto;
}

.total-amount .unit img {
    height: 12px;
    width: auto;
    vertical-align: middle;
    margin-bottom: 2px;
}

.note {
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

button {
    padding: 10px 30px;
    background-color: #4a6da7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
}

.commitments-section {
    background-color: #c8d1db;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    max-width: 800px;  /* Added max-width for better layout */
    margin-left: auto;
    margin-right: auto;
}

.commitments-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.commitments-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-weight: bold;
    padding: 12px;  /* Increased padding */
    background-color: #b8c4d0;
    border-radius: 4px;
    margin-bottom: 5px;  /* Added margin */
    font-size: 14px;  /* Added font size */
}

.commitment-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
    background-color: #e6e6e6;
    padding: 8px;  /* Increased padding */
    border-radius: 4px;
}

.commitment-name {
    width: 100%;
    padding: 5px;
    border: 1px solid #999;
    border-radius: 3px;
    background-color: white;
}

.currency {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.currency img {
    height: 12px;  /* Increased from 10px */
    width: auto;
    vertical-align: middle;
}

.amount-input {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.commitment-amount {
    width: 100%;
    padding: 6px 35px 6px 8px;  /* Increased right padding for larger SAR symbol */
    border: 1px solid #999;
    border-radius: 3px;
    background-color: white;
    font-size: 13px;
}

.commitments-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    text-align: center;
}

.calculate-btn, .clear-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.calculate-btn {
    width: 100%;
    background-color: #4a6da7;
    padding: 10px;
    font-size: 14px;
    margin: 10px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    transition: background-color 0.3s;
}

.calculate-btn:hover {
    background-color: #5d80ba;
}

.clear-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 15px;
    font-size: 13px;
}

.clear-btn:hover {
    background-color: #da190b;
}

.total-commitments {
    background-color: #e6e6e6;
    padding: 15px 30px;
    border-radius: 4px;
    min-width: 300px;
}

.commitment-total, .commitment-with-salary {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 1.1em;
}

.value-container {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    position: relative;
    padding-right: 35px;  /* Increased padding for larger SAR symbol */
}

.value-cell {
    text-align: right;
    padding-right: 10px !important;
    width: 150px;
    position: relative;
}

.value-container .unit {
    position: absolute;
    right: 0;  /* Aligned to the right edge */
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    width: 30px;  /* Increased width to match top section */
}

.commitment-with-salary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #b8c4d0;
    font-weight: bold;
    font-size: 1.2em;
}

/* Ensure the text aligns */
.commitment-total span:first-child,
.commitment-with-salary span:first-child {
    min-width: 150px;  /* Adjust this value to align the labels */
}

/* Update these styles for the tab navigation */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0;
    margin-bottom: 10px;
}

.tab-button {
    flex: 1 1 auto;
    padding: 8px 5px;
    font-size: 13px;
    min-width: 0;
    white-space: nowrap;
    margin: 0;
}

.tab-button.active {
    background-color: #4a6da7;
    color: white;
}

/* Tab content styles */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Add these styles for the bonus calculator */
.bonus-section {
    background-color: #c8d1db;
    padding: 20px;
    border-radius: 4px;
}

.bonus-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bonus-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bonus-form label {
    font-weight: normal;
    color: #333;
    font-size: 13px;
}

.bonus-form .input-with-unit {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.bonus-form input[type="text"],
.bonus-form input[type="number"] {
    font-size: 13px;
    padding: 4px 8px;
    background-color: white;
    border: none;
    color: #333;
    width: calc(100% - 35px);
    height: 30px;
    border-radius: 4px;
    margin-right: 35px;
}

.bonus-form .unit {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 13px;
    color: #666;
    width: 30px;
    height: 30px;
}

.bonus-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
}

.bonus-total {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: bold;
}

/* Add these styles for the salary increment calculator */
.increment-section {
    background-color: #c8d1db;
    padding: 20px;
    border-radius: 4px;
}

.increment-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.increment-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.increment-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 1.2em;
    font-weight: bold;
}

/* Update these styles for the info page */
.info-section {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.info-card {
    background-color: #c8d1db;
    border-radius: 8px;
    padding: 20px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-info h3 {
    color: #4a6da7;
    margin: 20px 0 10px 0;
    font-size: 1.2em;
    border-bottom: 2px solid #b8c4d0;
    padding-bottom: 5px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: #e6e6e6;
    border-radius: 4px;
}

.info-row .material-icons {
    color: #4a6da7;
}

.info-row label {
    font-weight: bold;
    color: #333;
    min-width: 100px;
}

.info-value {
    color: #666;
}

.info-row a.info-value {
    color: #4a6da7;
    text-decoration: none;
    transition: color 0.3s;
}

.info-row a.info-value:hover {
    color: #2c4167;
    text-decoration: underline;
}

/* Add new layout styles */
.page-container {
    display: flex;
    min-height: 100vh;
}

.side-panel {
    width: 250px;
    background-color: #4a6da7;
    padding: 30px 20px;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.main-content {
    flex: 1;
    margin-left: 0;
    background-color: #e6e6e6;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content.shifted {
    margin-left: 250px;
}

.side-navigation {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.nav-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 15px;
    text-align: left;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-button::after {
    content: '➤';
    font-size: 16px;
    opacity: 0.7;
    margin-left: 10px;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-button:hover::after {
    opacity: 1;
    transform: translateX(3px);
}

.nav-button.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

.nav-button.active::after {
    opacity: 1;
}

/* Add mobile responsiveness */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        padding: 10px;
    }

    .input-row {
        flex-direction: column;
        gap: 10px;
    }

    .data-entry-section {
        padding: 15px;
        padding-top: 55px;  /* Keep space for header */
    }

    .data-entry-section h2 {
        top: 15px;
        left: 55px;
    }

    .allowances-section {
        flex-direction: column;
        gap: 20px;
    }

    .tables-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .results-section {
        margin-top: auto;
        padding: 15px;
    }

    .input-group {
        width: 100%;
    }
    
    .checkbox-group {
        margin-bottom: 5px;
        padding: 5px 0;
    }
    
    .value-cell {
        text-align: right;
    }

    .input-with-unit {
        width: 100%;
    }

    input[type="number"] {
        margin-right: 35px;  /* Consistent increased margin */
    }

    .unit {
        right: 0;
    }

    .calculate-btn {
        padding: 10px;
        font-size: 14px;
    }

    .total-amount {
        font-size: 16px;
        padding: 10px;
    }

    .note {
        font-size: 11px;
    }

    .side-panel {
        width: 200px;
    }

    .main-content.shifted {
        margin-left: 200px;
    }

    .logo h1 {
        font-size: 16px;  /* Keep full text visible */
    }

    .logo h1::first-letter {
        font-size: 16px;  /* Same as regular text */
    }

    .nav-button {
        font-size: 14px;
    }

    .nav-button::first-letter {
        font-size: 18px;
    }

    .value-container {
        padding-right: 35px;  /* Keep consistent spacing */
    }
    
    .value-container .unit {
        width: 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }

    .input-with-unit {
        width: 100%;
    }

    input[type="number"] {
        margin-right: 35px;  /* Consistent increased margin */
    }

    .data-entry-section,
    .results-section {
        border-radius: 4px;
        margin: 5px 0;
    }

    .results-section {
        margin-top: auto;
        padding: 10px;
    }
}

/* Add specific styles for very small screens */
@media (max-width: 360px) {
    .tab-button {
        font-size: 12px;
        padding: 6px 4px;
    }
    
    .input-with-unit {
        height: 28px;
    }
}

/* Menu toggle button */
.menu-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: #4a6da7;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    width: 35px;
    height: 35px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.menu-toggle .material-icons {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.side-panel.active + .main-content .menu-toggle .material-icons {
    transform: rotate(180deg);
}

.menu-toggle:hover {
    background-color: #5d80ba;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Make sure the side panel shows when active */
.side-panel.active {
    transform: translateX(0);
}

/* Side panel enhancements */
.side-panel {
    width: 250px;
    background-color: #4a6da7;
    padding: 30px 20px;
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.nav-button {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 15px;
    text-align: left;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.nav-button.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

/* Main content modifications */
.main-content.shifted {
    margin-left: 250px;
}

.simple-input {
    width: 100%;
    padding: 2px 5px;
    height: 30px;
    border-radius: 4px;
    border: none;
    background-color: white;
    font-size: 13px;
    color: #333;
}

/* Add more spacing between sections */
.tables-container table:not(:first-child) {
    margin-top: 15px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.calculate-btn, .clear-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.calculate-btn {
    background-color: #4CAF50;
    color: white;
}

.calculate-btn:hover {
    background-color: #45a049;
}

.clear-btn {
    background-color: #f44336;
    color: white;
}

.clear-btn:hover {
    background-color: #da190b;
}

/* Update the total commitments section SAR symbols */
.total-commitments .unit img {
    height: 12px;  /* Match the size */
    width: auto;
    vertical-align: middle;
}

.total-commitments .value-container {
    padding-right: 35px;  /* Increased padding for larger SAR symbol */
} 


/* إجمالي الدخل والخصومات: خلفية برتقالي فاتح + نص عريض */
.tables-container table tr.total-row td {
  background-color: #ffe8c6 !important;   /* برتقالي فاتح */
  font-weight: 700 !important;
}

/* قوّي الرقم نفسه زيادة */
.tables-container table tr.total-row .value-container span:first-child {
  font-weight: 800 !important;
  letter-spacing: .2px;
}

/* خط فاصل بسيط أعلى صف الإجمالي (اختياري) */
.tables-container table tr.total-row td {
  border-top: 2px solid #d7c7a8;
}

