/* ===== General ===== */
html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    color: #2c3e50;
}

h1 {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 28px;
}

h2 {
    margin-top: 10px;
}

.dashboard-front h1 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
}

.manager-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}


/* ===== Dashboard Top Bar ===== */
.dashboard-top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background-color: #154985;
    padding: 20px 0;
}

.icon {
    text-align: center;
    color: #ecf0f1;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
    padding: 10px;
    border-radius: 10px;
    outline: none;
}

.icon:hover {
    background-color: #3569A5;
    transform: translateY(-5px);
}

.icon.selected {
    background-color: #3569A5;
    transform: translateY(-5px);
}

.icon:focus:not(:hover),
.icon:active:not(:hover) {
    background-color: transparent;
    transform: none;
    outline: none;
}

.icon img {
    width: 40px;
    height: 40px;
    display: block;
    margin: 0 auto 10px;
    filter: brightness(0) invert(1);
}

.icon p {
    margin: 0;
    font-size: 14px;
}

.logo-icon img {
    width: 60px;
    height: 60px;
}

.login-logo {
    width: 80px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
}

.topbar a {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #444;
}

/* ===== Email setup ===== */
.email-form-container {
    max-width: 700px;
    margin: 2rem auto;
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.email-form-container h1 {
    margin-bottom: 1.5rem;
}

.email-form label {
    display: block;
    margin: 1rem 0 0.5rem;
    font-weight: bold;
}

.email-form input[type="text"],
.email-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
}

.email-form input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

/* ===== Carport Configuration Form ===== */
.carport-form {
    display: grid;
    gap: 5px;
    max-width: 650px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.carport-form label {
    font-weight: 600;
    margin-top: 10px;
    display: block;
    color: #2c3e50;
}

.carport-form select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: border-color 0.2s ease;
}

.carport-form select:focus {
    outline: none;
    border-color: #2980b9;
    background-color: #fff;
}

.carport-form button {
    margin-top: 10px;
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.carport-form button:hover {
    background-color: #1c6394;
}

.carport-form select,
.carport-form button {
    cursor: pointer;
}

.carport-form input,
.carport-form select {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    transition: border-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.carport-form input:focus {
    outline: none;
    border-color: #2980b9;
    background-color: #fff;
}

/* ===== Container & Filters ===== */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.filters {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-select {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.default-button {
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.default-button:hover {
    background-color: #1c6394;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* ===== Generic Table Styling ===== */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: #154985;
    color: white;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:hover {
    background-color: #f0f8ff;
}

.cancelled-row {
    background-color: #f8d7da;
    opacity: 0.7;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
}

.form-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem 2rem;
    margin-bottom: 1.1125rem;
}

.form-grid-two div,
.form-grid-three div {
    display: flex;
    flex-direction: column;
}

.postal-group .postal-row {
    display: flex;
    gap: 1rem;
}

.postal-row input {
    flex: 1;
}

.dashboard-order-tables {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-order-section {
    flex: 1;
}

.inline-form {
    display: inline;
    margin-left: 24px;
}

.carport-readonly {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.carport-readonly p {
    margin: 0 0 10px;
}

.carport-readonly strong {
    display: inline-block;
    width: 120px;
    font-weight: 600;
    color: #333;
}

/* ===== Action Buttons (e.g. Remove/See) ===== */
button {
    font-family: inherit;
    cursor: pointer;
}

.remove-button {
    background-color: #e74c3c !important;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.remove-button:hover {
    background-color: #c0392b !important;
}

.email-with-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#add-employee-button {
    margin-bottom: 15px;
}

.add-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.add-button:hover {
    background-color: #218838;
}

/* ===== Tables ===== */
.default-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.default-table thead {
    background-color: #154985;
    color: white;
}

.default-table th,
.default-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    word-wrap: break-word;
}

.default-table th:nth-child(1),
.default-table td:nth-child(1) {
    width: 40%;
}

.default-table th:nth-child(2),
.default-table td:nth-child(2) {
    width: 15%;
}

.default-table th:nth-child(3),
.default-table td:nth-child(3) {
    width: 15%;
    text-align: right;
}

.default-table td:nth-child(4),
.default-table th:nth-child(4) {
    text-align: center;
    width: 15%;
}

.default-table th:nth-child(5),
.default-table td:nth-child(5) {
    text-align: right;
    width: 15%;
}

.dashboard-table th:nth-child(1),
.dashboard-table th:nth-child(1) {
    width: 10%;
}

.dashboard-table th:nth-child(2),
.dashboard-table th:nth-child(2) {
    width: 35%;
}

.dashboard-table th:nth-child(3),
.dashboard-table th:nth-child(3) {
    width: 30%;
}

.dashboard-table th:nth-child(4),
.dashboard-table th:nth-child(4) {
    text-align: center;
    width: 12.5%;
}

.dashboard-table th:nth-child(5),
.dashboard-table th:nth-child(5) {
    text-align: center;
    width: 12.5%;
}

.bom-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 40px;
    font-size: 15px;
}

.bom-table thead {
    background-color: #154985;
    color: white;
}

.bom-table th,
.bom-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    word-wrap: break-word;
}

.bom-table th:nth-child(1),
.bom-table td:nth-child(1) {
    width: 25%;
}

.bom-table th:nth-child(2),
.bom-table td:nth-child(2) {
    width: 10%;
    text-align: center;
}

.bom-table th:nth-child(3),
.bom-table td:nth-child(3) {
    width: 5%;
    text-align: center;
}

.bom-table th:nth-child(4),
.bom-table td:nth-child(4) {
    width: 5%;
    text-align: center;
}

.bom-table th:nth-child(5),
.bom-table td:nth-child(5) {
    width: 30%;
}

.bom-table th:nth-child(6),
.bom-table td:nth-child(6),
.bom-table th:nth-child(7),
.bom-table td:nth-child(7) {
    width: 12.5%;
    text-align: right;
}

.bom-total {
    font-weight: 600;
    font-size: 16px;
    text-align: right;
    margin-top: 20px;
}

.general-section {
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 75px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.material-nav {
    position: sticky;
    top: 0;
    background-color: #154985;
    padding: 10px 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.material-nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.material-nav a:hover {
    background-color: #3569A5;
}

section {
    scroll-margin-top: 75px;
}

.order-info {
    display: flex;
    flex-direction: column;
    flex: 0 0 40%;
    gap: 12px;
    font-size: 15px;
    padding: 25px 30px;
    border: 1px solid #d0d0d0;
    border-radius: 12px;
    background-color: #f9fcff;
    margin-bottom: 30px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.order-info h2 {
    margin-bottom: 10px;
}

.order-info p {
    display: flex;
    align-items: baseline;
    margin: 0;
}

.order-info strong {
    width: 40%;
    display: inline-block;
    color: #2c3e50;
    font-weight: 600;
}

.order-sections {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.customer-action-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.two-button-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.two-button-row button,
.two-button-row form {
    width: 40%;
}

.full-width-form {
    width: 100%;
}

.full-width-button {
    width: 100%;
}

.default-button {
    text-decoration: none;
}

.hidden {
    display: none;
}

/* ===== Responsive Table Layout ===== */
@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 20px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
        padding: 10px;
    }

    td {
        position: relative;
        padding-left: 50%;
        border: none;
        border-bottom: 1px solid #eee;
    }

    td::before {
        position: absolute;
        left: 15px;
        width: 45%;
        white-space: nowrap;
        font-weight: bold;
        color: #555;
        content: attr(data-label);
    }

    .order-sections {
        flex-direction: row;
        justify-content: space-between;
    }

    .order-sections .order-info {
        flex: 1;
    }
}
