*{ box-sizing: border-box }

		body{
			margin: 0;
			font-family: Arial, sans-serif;
			background: #f3f6f8;
			color: #243447;
		}

		header{
			background: green;
			text-align: center;
			color: white;
			padding: 10px;
		}

		header h1{
			margin: 0 0 8px;
			font-size: 25px;
		}

		header h2, h3, p{
			margin: 0;
		}

		main{
			max-width:1500px;
			margin: 24px auto;
			padding: 0 16px;
		}

		.panel{
			background: white;
			padding: 10px;
			border-radius: 10px;
			box-shadow: 0 2px 8px #0000000c;
			margin-bottom: 20px;
		}

		.toolbar{
			display: flex;
			gap: 12px;
			flex-wrap: wrap;
			align-items: center;
			justify-content: space-between;
		}

		input{
			padding: 5px;
			border: 1px solid #cbd5e1;
			border-radius: 6px;
			font-size: 12px;
			width: 100%;
			max-width: 300px;
		}


		select{
			padding: 5px;
			border: 1px solid #cbd5e1;
			border-radius: 6px;
			font-size: 12px;
			width: 100%;
			max-width: 300px;
		}


		.table-wrap{
			overflow-x: auto;
			margin-top: 16px;
		}

		table{
			width: 100%;
		}

		th, td{
			padding: 10px;
			border-bottom: 1px solid #e2e8f0;
			text-align:  center;
		}

		th{
			background: #eaf2f5;
            color: black;
            font-size: 18px;
		}
    
        td{
			color: black;
            font-size: 13px;
		}

		footer{
			text-align: center;
			color: #64748b;
			padding: 20px;
			font-size: 13px;
		}

		@media (max-width: 600px){
			header h1{
				font-size: 21px;	
			}

			.panel{
				padding: 14px;
			}
		
			.toolbar{
				align-items: stretch;
			}

			input{
				max-width: none;
			}
		}

		/* Scrollable canal inventory table */
		.inventory-scroll{
			max-height:350px;
			overflow-x: auto;
			overflow-y: auto;
			border-radius: 8px;
		}
	
		/* Keep the column headings visible while scrolling */
		.inventory-scroll thead th{
			position: sticky;
			top: 0;
			z-index: 2;
			background-color: #f1f7ef;
		}
	
		/* Make the table fit its container */
		.inventory-scroll table{
			width: 100%;
			border-spacing: 0;
			border-collapse: separate;
		}


/* SLD structure classification fields */
#canal-form label {
    display: inline-block;
    margin-top: 8px;
    font-weight: 600;
}

#canal-form select,
#canal-form input {
    margin-top: 4px;
    margin-bottom: 8px;
}

#canal-form [hidden] {
    display: none !important;
}

.inventory-scroll td,
.inventory-scroll th {
    white-space: nowrap;
}

/* =====================================
   SLD DIAGRAM HORIZONTAL SCROLLING
   ===================================== */

#sld-preview {
    width: 100%;
}

/* Only the diagram scrolls horizontally */
.sld-scroll-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 0;
}

/* Keep the SLD wide enough for readability */
/* SLD preview - preserve readable diagram dimensions */
.sld-scroll-container svg {
    display: block;
    width: auto;
    max-width: none;
    height: 900px;
}
/* Stationary diagram title */
.sld-diagram-title {
    text-align: center;
    font-size: 20px;
    margin: 12px 0;
}

/* Scrollable SLD area */
.sld-scroll-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
}

/* =====================================
   SLD SCALE NOTATION
===================================== */

.sld-scale-note {
    text-align: center;
    font-size: 12px;
    font-style: italic;
    font-weight: bold;
    color: #666666;
    margin: 2px 0 12px;
}

/* =====================================
   SLD SHOW / HIDE RECORDS
===================================== */

.sld-toggle-records {
    background: #246b45;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    margin: 10px 0;
}

.sld-toggle-records:hover {
    background: #185233;
}

.sld-records-container[hidden] {
    display: none;
}

.sld-records-container {
    margin-bottom: 12px;
}

/* =====================================
   DOWNLOAD SLD BUTTON
===================================== */

.download-sld-button {
    background: #176b43;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    margin: 5px 0 10px 10px;
}

.download-sld-button:hover {
    background: #105232;
}

/* =====================================
   STEP 38N - PDF EXPORT CONTROLS
===================================== */

.sld-pdf-paper-size {
    padding: 8px 10px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-size: 13px;
    background: white;
    color: #243447;
    margin-left: 10px;
    cursor: pointer;
}


/* =====================================
   EDITABLE PDF FOOTER INPUT
===================================== */

.pdf-footer-input {
    display: block;
    width: 350px;
    max-width: 100%;
    min-height: 55px;
    margin: 10px 0 15px;
    padding: 8px 10px;
    border: 1px solid #cccccc;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    resize: vertical;
}

.pdf-footer-input:focus {
    outline: 2px solid #176b43;
    outline-offset: 1px;
}


/* Excel import Remove button */


/* =====================================
   EXCEL IMPORT REMOVE BUTTON
===================================== */

.import-remove-button {
    background: #c62828;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
}

.import-remove-button:hover {
    background: #8e1b1b;
}




/* =====================================
   STEP 11D.2B - ADMINISTRATOR PAGE
   ===================================== */

/* Administrator header */

.admin-header {
    background: green;
    color: white;
    text-align: center;
    padding: 20px;
}

.admin-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
}

.admin-header h2 {
    margin: 5px 0;
    font-size: 24px;
}

.admin-header p {
    margin: 4px 0;
}

/* Administrator main content */

#adminContent {
    max-width: 1600px;
    margin: 25px auto;
    padding: 0 20px;
}

#adminContent[hidden] {
    display: none !important;
}

/* Administrator toolbar */

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.admin-toolbar h2 {
    margin: 0 0 8px;
}

#adminAccount {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.admin-navigation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-navigation a {
    background: green;
    color: white;
    padding: 10px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.admin-navigation a:hover {
    background: darkgreen;
}

#adminLogoutButton {
    background: #b91c1c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: bold;
}

#adminLogoutButton:hover {
    background: #991b1b;
}

/* Account summary cards */

.admin-summary {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(170px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.admin-summary-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-top: 4px solid green;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.admin-summary-card h3 {
    font-size: 15px;
    color: #555;
    margin: 0 0 12px;
}

.admin-summary-card p {
    font-size: 32px;
    font-weight: bold;
    color: green;
    margin: 0;
}

/* Registered employees section */

.admin-users-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.admin-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.admin-section-heading h2 {
    margin: 0;
}

.admin-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#adminUserSearch {
    width: 320px;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#refreshUsersButton {
    background: green;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#refreshUsersButton:hover {
    background: darkgreen;
}

/* Registered employees table */

.admin-table-container {
    width: 100%;
    overflow: auto;
    max-height: 550px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

#adminUsersTable {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
    font-size: 14px;
}

#adminUsersTable th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eaf3e8;
    color: #222;
    padding: 14px 10px;
    text-align: center;
    border-bottom: 2px solid #ccc;
}

#adminUsersTable td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

#adminUsersTable tbody tr:hover {
    background: #f5f9f4;
}

#adminUserCount {
    color: #555;
    font-size: 14px;
    margin: 12px 0 0;
}

/* Role indicators */

.admin-role {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.admin-role-administrator {
    background: #e9e1f8;
    color: #5b21b6;
}

.admin-role-editor {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-role-viewer {
    background: #f0f0f0;
    color: #555;
}

/* Email confirmation indicators */

.admin-email-confirmed {
    color: green;
    font-weight: bold;
}

.admin-email-pending {
    color: #a16207;
    font-weight: bold;
}

/* Editor permission buttons */

.admin-grant-button,
.admin-revoke-button {
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.admin-grant-button {
    background: green;
}

.admin-grant-button:hover {
    background: darkgreen;
}

.admin-revoke-button {
    background: #b91c1c;
}

.admin-revoke-button:hover {
    background: #991b1b;
}

.admin-grant-button:disabled,
.admin-revoke-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-protected-account {
    color: #777;
    font-size: 12px;
    font-style: italic;
}

/* Administrator status messages */

#adminMessage {
    min-height: 18px;
    font-size: 14px;
    margin: 10px 0;
}

#adminMessage.admin-success {
    color: green;
}

#adminMessage.admin-error {
    color: #b91c1c;
}

#adminAccessStatus {
    text-align: center;
    padding: 40px 20px;
    color: #555;
    font-size: 16px;
}

#adminAccessStatus[hidden] {
    display: none !important;
}

/* Mobile responsiveness */

@media screen and (max-width: 768px) {

    #adminContent {
        padding: 0 10px;
    }

    .admin-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-controls {
        width: 100%;
    }

    #adminUserSearch {
        width: 100%;
    }

    .admin-header h1 {
        font-size: 22px;
    }

    .admin-header h2 {
        font-size: 18px;
    }

    .admin-users-section {
        padding: 12px;
    }
}
/* =====================================
   STEP 11J.4.1C - EDITOR ACCOUNT TOOLBAR
   ===================================== */

#editorAccountToolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    border-left: 4px solid green;
}

/* Hide toolbar until account verification */

#editorAccountToolbar[hidden] {
    display: none !important;
}

/* Account information */

.editor-account-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#editorAccountName {
    font-size: 15px;
    color: #243447;
}

#editorAccountRole {
    font-size: 12px;
    color: #64748b;
}

/* Logout button */

#editorLogoutButton {
    background: #b91c1c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

#editorLogoutButton:hover {
    background: #991b1b;
}

#editorLogoutButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* =====================================
   STEP 11J.4.2G - ADMIN DASHBOARD LINK
   ===================================== */

.editor-account-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#editorAdminButton {
    display: inline-block;
    background: #176b43;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

#editorAdminButton:hover {
    background: #125536;
}

#editorAdminButton[hidden] {
    display: none !important;
}


/* =====================================
   PUBLIC VIEWER NAVIGATION
===================================== */

.viewer-navigation {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
}

#viewerLoginButton {
    display: inline-block;
    background-color: #008000;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

#viewerLoginButton:hover {
    background-color: #006400;
}