/* Base page styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin-top: 1rem;
    margin-left: 0;
    margin-right: 2rem;
    margin-bottom: 0;
}

.content-wrapper {
    padding-top: 0;
    padding-right: 2rem;
    padding-bottom: 2rem;
    padding-left: 0;
    margin-top: 0;
    margin-left: 2rem;
    margin-right: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.content-card {
    max-width: 700px;
    margin: 2rem 0;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Navigation bar */
nav {
    background-color: #333;
    padding: 1rem 1rem 1rem 1rem;  /* Top & side padding only */
    margin-top: 1rem;
    margin-left: 2rem;
    margin-right: 2rem;
    margin-bottom: 0;
}

nav a {
    color: white;
    margin-right: 1rem;
    text-decoration: none;
}

.dashboard-wrapper {
    max-width: 850px;
    margin-left: 0;
    margin-right: 0;
}

.dashboard-button-grid {
    justify-content: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-button-grid a {
    padding: 0.6rem 1.2rem;
    background-color: #007BFF;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    flex-grow: 1;      /* allows them to expand */
    flex-basis: auto;  /* default size */
    max-width: calc(25% - 0.75rem);  /* up to 4 per row */
    text-align: center;
}

.dashboard-button-grid a:only-child {
    flex-grow: 0; /* don't stretch if it's alone */
}

.dashboard-button-grid a.no-grow {
    flex-grow: 0 !important;
}

/* Buttons (dashboard-style) */
button,
.btn {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0 0 0 0;
    display: inline-block;
}

button:hover,
.btn:hover {
    background-color: #0056b3;
}

button {
    vertical-align: middle;
}

.btn-action-req {
    background-color: #dc3545 !important;  /* Force red */
}
.btn-action-req:hover {
    background-color: #b02a37 !important;  /* Deeper red for hover */
}

/* Form layout and styling */
.form-container {
    max-width: 700px;
    margin-top: 0;
    margin-left: 0;
    margin-right: 2rem;
    margin-bottom: 0;
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 0.75rem;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.3rem;
}

input.form-control,
select.form-control,
textarea.form-control {
    vertical-align: middle;
    line-height: 1.7rem;
    height: auto; /* helps avoid conflicts if others override height */
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 0rem;
    vertical-align: middle;
    line-height: 1.7rem;
}

/* Modern table styling */
/* Enhanced table styling */
table {
    border-collapse: collapse;
    width: 100%;
    table-layout: auto;
    font-size: 0.9rem;
    margin-top: 0rem;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 6px;
    overflow: hidden;
}

th, td {
    padding: 0rem 0.75rem;
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
}

td:last-child,
th:last-child {
    text-align: center;
    width: 1%;
    white-space: nowrap;
    min-width: 80px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

th {
    background-color: #f1f5f9;
    font-weight: bold;
    color: #333;
    text-align: left;
}

td.numeric {
    text-align: right;
}

/* Highlight rows on hover */
tr:hover {
    background-color: #f0f8ff;
}

table td:first-child {
    padding-left: 1rem !important;
}

table th:first-child {
    padding-left: 1rem !important;
}


/* Call/Put section titles above tables */
h4 {
    margin-bottom: 0.5rem;
    margin-top: 2rem;
}

/* Responsive layout helper */
@media (max-width: 900px) {
    .builder-layout {
        flex-direction: column;
    }
}

/* Breadcrumb styling */
nav.breadcrumb-nav {
    background-color: transparent;
    padding: 0.5rem 1rem;
    margin: 1rem 2rem 0 2rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
    background: none;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}
