:root {
    --bg: #f7f9fb;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #003a94;
    --line: #e6eef6;
    --input: #f1f5f9;
}
span.asterisk {
    display: none;
}
table#lessonsTable tr th:nth-child(4) {
    width: 140px;
}
.driving-log {
    max-width: 1140px;
    margin: 30px auto;
    font-family: "Segoe UI", sans-serif;
    max-height: 560px;
    overflow: auto;
}
table#lessonsTable th:nth-child(3) {
    width: 170px;
}   
.entries-head {
    position: relative;  
    top: 0;           
    left: 0;          
    width: 100%;      
    background: #fff; 
    z-index: 9999;    
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    border: 1px solid #ddd;
    border-radius: 10
}

.lesson-fields-head {
    justify-content: space-between;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 0px;
}

.form-group-head h5 {
    margin: 0;  
    font-size: 16px;
}

    .note {
        font-size: 14px;
        color: #555;
        margin-bottom: 20px;
    }

    .lesson-card {
        background: #fafafa;
        border: 1px solid #ddd;
        border-radius: 10px;
        margin-bottom: 25px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .lesson-header {
        background: #eaf2ff;
        padding: 12px 16px;
        border-radius: 10px 10px 0 0;
    }

    .lesson-header h3 {
        margin: 0;
        color: #003366;
        font-size: 18px;
    }

    .topics {
        list-style: none;
        margin: 0;
        padding: 0 20px 20px;
    }

    .topics li {
        border-bottom: 1px dashed #ccc;
        padding: 0px 0 10px;
    }

    .topic-title {
       font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    }

    .lesson-fields {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
        margin-bottom: 0px;
    }

    .form-group {
        display: flex;
        flex-direction: column;
    }

    .form-group label {
        font-size: 13px;
        color: #666;
        margin-bottom: 3px;
    }

    .form-group input {
        padding: 6px 8px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 14px;
    }
button#generateLogPDF, #saveLessonLog {
    margin: 18px 18px 18px 0px;
    /* margin-bottom: 10px; */
}
    .add-entry {
        background: #003366;
        color: #fff;
        border: none;
        padding: 6px 10px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 13px;
        margin-top: 5px;
    }

    .add-entry:hover {
        background: #002a55;
    }

    .save-btn {
        display: block;
        width: 250px;
        background: #28a745;
        color: #fff;
        border: none;
        padding: 12px 20px;
        border-radius: 6px;
        font-size: 16px;
        cursor: pointer;
        margin: 0px auto 20px;
    }

    .save-btn:hover {
        background: #218838;
    }

    .form-group {
        margin-bottom: 5px;
    }

    .masterstudy-authorization__form-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        background: #fff;
        padding: 30px;
        border: 1px solid #ddd;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .form-title {
        text-align: center;
        font-weight: 700;
        font-size: 22px;
        margin-bottom: 5px;
    }

    .form-subtitle {
        text-align: center;
        color: #555;
        font-size: 18px;
        margin-bottom: 25px;
    }

    /* ====== 5 fixed columns ====== */
    .form-row {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 15px;
        margin-bottom: 20px;
    }

    .masterstudy-authorization__form-field {
        display: flex;
        flex-direction: column;
    }

    .masterstudy-authorization__form-field label {
        font-weight: 500;
        margin-bottom: 5px;
    }

    .masterstudy-authorization__form-input {
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .asterisk {
        color: red;
        margin-left: 4px;
    }

    /* Responsive layout for smaller screens */
    @media (max-width: 992px) {
        .form-row {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media (max-width: 768px) {
        .form-row {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 480px) {
        .form-row {
            grid-template-columns: 1fr;
        }
    }

    .breadcrumbs {
        display: none;
    }



/* === Date Input Styling === */
input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--input);
    font-size: 15px;
    color: var(--accent);
    appearance: none;
    /* Removes default browser date picker styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}

/* Optional: Custom calendar icon for WebKit browsers (Chrome, Edge, Safari) */
input[type="date"]::-webkit-calendar-picker-indicator {
    color: var(--accent);
    opacity: 0.7;
    cursor: pointer;
    background: url("data:image/svg+xml;charset=UTF-8,%3Csvg fill='%230f172a' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7zm12 18H5V10h14v10z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 18px 18px;
    padding-right: 10px;
}

/* Hover and Focus states for better UX */
input[type="date"]:hover {
    border-color: #cbd5e1;
}

input[type="date"]:focus {
    outline: none;
    border-color: #0b63d6;
    box-shadow: 0 0 0 2px rgba(11, 99, 214, 0.2);
}

* {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}


.top-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.field {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
}

input[type="text"],input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--input);
    font-size: 15px;
}

.dl-field {
    max-width: 220px;
}

.table-wrap {
    overflow: auto;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    z-index: 2;
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid #003a94;
    font-weight: 700;
}

thead th:first-child {
    width: 110px;
}

thead th:nth-child(2) {
    width: 260px;
}

tbody td {
    padding: 10px;
    border-bottom: 1px solid #003a94;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

.cell-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--input);
}

.cell-input[type="time"] {
    padding: 6px 8px;
}

.small {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--input);
    text-align: center;
}

.signature {
    font-family: "Brush Script MT", "Lucida Handwriting", cursive;
    font-size: 16px;
    padding: 8px;
}

.controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

button {
    background: #0b63d6;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(11, 99, 214, 0.18);
}

button.ghost {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--line);
    box-shadow: none;
}

.totals {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.total-box {
    background: #fbfdff;
    border: 1px solid var(--line);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    color: var(--muted);
}

.footer {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.parent-line {
    flex: 1;
}

.date-field {
    max-width: 180px;
}
button.add-entry
 {
    display: none;
}
button#saveDrivingLog {
    margin: 0px;
}