/*COMMON CSS*/


html {
    box-sizing: border-box;
    height: 100%;
    width: 100%;
}

* {
    box-sizing: inherit;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}


body {


    overflow: initial;

    font-family: 'Roboto', sans-serif;
    font-weight: normal;
    font-style: normal;
    padding: 0;
    margin: 0;


    overflow-x: hidden;
    /*overflow-y: hidden;*/

    background-image: linear-gradient(to right, rgba(0, 34, 68, 0.3), rgba(0, 34, 68, 0.3)),
    url('../assets/ap_bg.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;

}


.content {

    /*padding: 20px;*/
    margin: 10px;

    min-height: calc(100vh - 70px);

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;



    /*border: 4px dashed #65d810;*/
}


.logo {
    font-size: 1.25rem;
    margin: 0;
    padding: 8px;
    border-radius: 0.45rem;
    color: white;
    /*background-color: #007bff;*/
    background: var(--dark-orange-color, #0f7ce8);
}


.navbar-nav {
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 2%;
    /*background-color: #0056b3;*/
}

.dropdown-menu {
    background-color: #d9edf7;
}

.navbar-nav .dropdown-menu .dropdown-item {
    color: black;
    font-style: normal;
}

.navbar-nav .dropdown-menu .dropdown-item:hover {
    color: white;
    background-color: black;
}


/**********************ADDED***********************/

/* Base container adjustment */
.app-container {

    width: 100%; /* Take Full width of parent */
    max-width: 95vw; /* But don't exceed 95% of viewport */
    min-width: 300px; /* Don't go smaller than this */

    margin-left: auto;
    margin-right: auto;

    /*margin: 0 auto;*/
    /*padding: 0;*/

}

/* Page title */
.page-title {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Card styles */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background-color: #fff;
    margin-bottom: 1.5rem;
    overflow: hidden;
}




.card-header {
    background: var(--primary-color, #0f7ce8);
    color: white;
    padding: 0.75rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 500;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.card-body {
    /*padding: 1.25rem;*/
    padding: 1rem;

    background-color: var(--card-background-color, #f8f9fa);


}

/* Table container styles */
.table-container {
    /*background-color: #fff;*/
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    /*-webkit-overflow-scrolling: touch;*/
    overscroll-behavior: auto; /* or contain/none depending on needs */
}

.table {
    margin-bottom: 0;
}

/* ADDED */
.table tr {

    /*white-space: normal;*/
    /*word-break: break-word;*/
    white-space: nowrap;
}

.table-footer {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Form wrapper styles */
.form-wrapper {
    background-color: var(--card-background-color, #f8f9fa);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}


/* MEDIA QUERY FOR PORTRAIT ORIENTATION (CARD VIEW) */
@media screen and (orientation: portrait) and (max-width: 991px) {

    .app-container {
        padding: 0 10px;
    }

    /* Table transforms into cards on mobile in portrait mode */
    .table:not(.table-preserve) thead {
        display: none; /* hide header row */
    }

    /* Container adjustment */
    .table:not(.table-preserve) {
        width: 100%; /* Take Full width of parent */
        max-width: 95vw; /* But don't exceed 95% of viewport */
        min-width: 300px; /* Don't go smaller than this */
        margin-left: auto;
        margin-right: auto;
    }

    .table:not(.table-preserve) tbody,
    .table:not(.table-preserve) tr,
    .table:not(.table-preserve) td {
        display: block;
        width: 100%;
    }

    .table:not(.table-preserve) tr {
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        /*background: #ddeff3;*/
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        transition: all 0.2s ease;
    }

    .table:not(.table-preserve) td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    .table:not(.table-preserve) td::before {
        content: attr(data-label);
        font-weight: bold;
        flex-basis: 40%;
        padding-right: 10px;
        color: #0a0a0b;
        text-align: left;
    }

    .table:not(.table-preserve) tbody tr td:nth-child(1) {
        font-weight: bold;
        color: red;
    }


    /********INSIDE MEDIA PORTRAIT **********/



    /*ADDED TO ALIGN BUTTONS IN CENTER --- EDIT ACCOUNT*/
    /* Hide the data-label for button cells */
    .table:not(.table-preserve) td.text-center::before {
        display: none; /* Remove the label completely */
    }

    /* Center the button in the card view */
    .table:not(.table-preserve) td.text-center {
        justify-content: center; /* Center horizontally */
        padding: 0.75rem 0; /* Keep vertical padding but remove horizontal padding */
    }

    /* Make the button a reasonable width */
    .table:not(.table-preserve) td.text-center .btn,
    .table:not(.table-preserve) td.text-center form {
        width: 50%; /* Set width to 50% of the container */
        max-width: 150px; /* But don't exceed this width */
    }

    /* Make sure form button is full width of the form */
    .table:not(.table-preserve) td.text-center form .btn {
        width: 100%;
    }







    /****************************************/
    .table:not(.table-preserve) tfoot tr {
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background-color: #0b6fd3;
        color: #fff;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        transition: all 0.2s ease;
    }

    .table:not(.table-preserve) tfoot td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 6px;
        color: #fff;
        background-color: transparent;
        white-space: nowrap;
    }

    .table:not(.table-preserve) tfoot td::before {
        content: attr(data-label);
        font-weight: bold;
        flex-basis: 40%;
        padding-right: 10px;
        color: #fff;
        text-align: left;
    }

    /* Button adjustments for mobile */
    .table:not(.table-preserve) td .btn {
        width: 100%;
        text-align: center;
    }

    /* Add this to ensure the green background shows */
    .table:not(.table-preserve) tbody tr {
        background-color: #d3ecd2 !important;
    }

    /* Add new styles for .table-preserve */
    .table.table-preserve tr {
        background-color: #f1c0bf !important;
        /* Add other style properties you want for preserved tables */
    }

}

/*END OF MEDIA QUERY--PORTRAIT*/

/* MEDIA QUERY FOR LANDSCAPE ORIENTATION (REGULAR TABLE VIEW) */
@media screen and (orientation: landscape) and (max-width: 991px) {
    /* Keep regular table styles but make minor adjustments for better fit */
    .table:not(.table-preserve) {
        font-size: 0.85rem;
    }

    /* Container might need slightly different padding in landscape */
    .app-container {
        padding: 0 5px;
    }

    /* Ensure table cells don't get too squished */
    .table:not(.table-preserve) td,
    .table:not(.table-preserve) th {
        padding: 0.5rem 0.25rem;
    }

}

/*END OF MEDIA QUERY--LANDSCAPE*/




/*******FORM *******/

.form-container {
    max-width: 1200px;
    /*min-width: 400px;*/
    margin: auto;
}


label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    text-align: left;
    color: #0835e8;

}


.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-col {
    flex: 1;
    min-width: 250px;
}


.form-group {
    /*margin-bottom: 15px;*/
    margin-bottom: 10px;
}

.form-check {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.form-check label {
    margin-left: 15px;
    font-weight: normal;
}

.btn-save {
    width: 100%;
    padding: 12px;
    font-size: 1.2rem;
}



.field-error {
    color: #B94A48;
    font-size: 0.9rem;
    margin-top: 2px;


}

/******************/



/* CSS variables for easy theming */
:root {
    --primary-color: #0f7ce8;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;

    --dark-orange-color: #fb4f14;

    --card-background-color: #f4e0e0;


    /* ADDED */

    --bs-blue: #0d6efd;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bs-gradient: linear-gra



}
