body {
    font-family: 'Segoe UI', sans-serif;
    color: #2b3d52;
    background-image: url(/resources/images/html_bg.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    overflow-y: scroll;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main-wrap { flex: 1; }

a { color: #141c25; }
a:hover { color: #004689; }

/* Header */
.dod-header {
    position: relative;
    height: 50px;
    margin-bottom: 1rem;
}
.dod-header .logo-left {
    position: absolute;
    height: 40px;
    top: 0;
    left: 0;
}
.dod-header .logo-right {
    position: absolute;
    height: 40px;
    top: 0;
    right: 0;
}

/* Main card container */
.dod-container {
    background-color: #fff;
    border-radius: 1em;
    box-shadow: 1px 1px 5px 5px rgba(0,0,0,0.15);
    padding: 1.5rem;
    min-height: 400px;
}

/* Tarkett brand color buttons */
.btn-tarkett {
    background-color: #004689;
    color: #fff;
    border: none;
    letter-spacing: 1px;
    font-size: 12px;
}
.btn-tarkett:hover, .btn-tarkett:focus {
    background-color: #0066cc;
    color: #fff;
}
.btn-tarkett-outline {
    color: #004689;
    border: 1px solid #004689;
    background-color: #fff;
    letter-spacing: 1px;
    font-size: 12px;
}
.btn-tarkett-outline:hover {
    border-color: #0066cc;
    color: #0066cc;
}

/* Preview table */
.design-table td {
    border-right: 1px solid #777;
    padding: 0 1.25rem;
    vertical-align: top;
}

/* Form label style */
.form-label {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Submission history rows */
.history-row {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}
.history-row:nth-child(odd) { background-color: #f8f9fa; }
.history-row:nth-child(even) { background-color: #fff; }

/* Image preview in file upload */
.img-preview { max-width: 300px; }

/* DOD message banner */
.dod-message {
    font-style: italic;
    font-size: 11px;
}

/* Submit button hidden by default */
#submitButton { display: none; }

/* ---- Form / Questionnaire pages ---- */
.form-page-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: .75rem;
}

.form-card {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: .65rem;
    box-shadow: 0 1px 8px rgba(0,0,0,.05);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Step blocks */
.step-block {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 0;
}
.step-block:first-child { padding-top: 0; }
.step-block:last-child  { padding-bottom: 0; }
.step-block + .step-block { border-top: 1px solid #f2f2f2; }

.step-icon-wrap {
    width: 48px; height: 48px;
    background: rgba(191,215,55,.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #99bc31;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: .15rem;
}
.step-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #bfd737;
    margin-bottom: .6rem;
}
.step-content { flex: 1; min-width: 0; }
.step-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .65rem 1.5rem;
}

.field-label {
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #b0b0b0;
    margin-bottom: .15rem;
}
.field-val {
    font-size: .875rem;
    color: #1a1a1a;
    font-weight: 500;
    line-height: 1.3;
}

/* Edit step / add design button (dark charcoal) */
.btn-edit {
    background: #1e2433;
    color: #fff !important;
    border: none;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .5rem 1rem;
    border-radius: .4rem;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
    text-decoration: none;
}
.btn-edit:hover { background: #2d3a50; color: #fff !important; }

/* Section heading in green */
.section-green {
    font-size: .78rem;
    font-weight: 700;
    color: #bfd737;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 1rem;
}

/* Product card grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.product-card {
    border: 1px solid #e8e8e8;
    border-radius: .5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.product-card-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    flex: 1;
}
.product-field { margin-bottom: .55rem; }
.product-field:last-child { margin-bottom: 0; }
.product-card-actions {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #f2f2f2;
    justify-content: flex-end;
}
.btn-icon {
    width: 32px; height: 32px;
    border: 1.5px solid #ddd;
    background: #fff;
    border-radius: .3rem;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem;
    color: #777;
    cursor: pointer;
    transition: all .15s;
    padding: 0;
}
.btn-icon:hover          { border-color: #bfd737; color: #99bc31; }
.btn-icon.btn-icon-danger:hover { border-color: #dc3545; color: #dc3545; }

/* Add-product dashed card */
.product-card-add {
    border: 1.5px dashed #d0d0d0;
    border-radius: .5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    cursor: pointer;
    color: #888;
    text-decoration: none !important;
    transition: border-color .15s, color .15s;
    padding: 1rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .3px;
    text-align: center;
}
.product-card-add:hover { border-color: #bfd737; color: #99bc31; }
.product-card-add-icon {
    width: 48px; height: 48px;
    background: rgba(191,215,55,.15);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: #99bc31;
    margin-bottom: .65rem;
}

/* File rows */
.file-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: .875rem;
    color: #444;
}
.file-row:last-child { border-bottom: none; }
.file-icon { color: #bbb; font-size: 1rem; flex-shrink: 0; }
.file-name { flex: 1; word-break: break-all; }
.file-name a { color: #444; text-decoration: none; }
.file-name a:hover { color: #99bc31; }

/* Dashed upload button */
.btn-dashed {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 1.5px dashed #ccc;
    background: none;
    color: #666;
    font-size: .78rem;
    font-weight: 700;
    padding: .6rem 1.25rem;
    border-radius: .4rem;
    cursor: pointer;
    letter-spacing: .3px;
    transition: border-color .15s, color .15s;
    text-decoration: none !important;
}
.btn-dashed:hover { border-color: #bfd737; color: #99bc31; }

/* Preview page bottom actions */
.preview-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.btn-save-later {
    border: 1.5px solid #333;
    background: #fff;
    color: #333;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .75rem 2rem;
    border-radius: .4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none !important;
}
.btn-save-later:hover { background: #333; color: #fff; }
.btn-submit-req {
    background: #bfd737;
    color: #333;
    border: none;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .75rem 2rem;
    border-radius: .4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.btn-submit-req:hover { background: #99bc31; color: #fff; }

/* ---- App Dashboard ---- */
.app-welcome-banner {
    border-radius: .75rem;
    overflow: hidden;
    display: flex;
    background: #1a1a1a;
    margin-bottom: 1.5rem;
    position: relative;
    min-height: 0;
}
.app-welcome-content {
    flex: 1;
    padding: .9rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}
.welcome-title { font-size: 1.75rem; font-weight: 700; color: #fff; margin-bottom: .25rem; line-height: 1.2; }
.welcome-name  { color: #bfd737; }
.welcome-sub   { color: rgba(255,255,255,.65); margin: 0; font-size: .875rem; }
.app-welcome-image {
    width: 55%;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.app-welcome-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #1a1a1a 0%, transparent 35%);
    z-index: 1;
}
.app-welcome-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 575px) {
    .app-welcome-image { display: none; }
}

.stat-card {
    background: #f7f7f7;
    border-radius: .75rem;
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}
.stat-icon {
    width: 52px; height: 52px;
    background: rgba(191,215,55,.18);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: #99bc31;
    flex-shrink: 0;
}
.stat-number { font-size: 1.65rem; font-weight: 700; color: #1a1a1a; line-height: 1; }
.stat-label  { font-weight: 600; font-size: .85rem; color: #333; margin: .15rem 0 0; }
.stat-sub    { font-size: .75rem; color: #999; }

.history-section-title { font-size: 1.1rem; font-weight: 700; color: #1a1a1a; margin-bottom: 1rem; }

.history-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.history-table thead th {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #888;
    border-bottom: 1px solid #e5e5e5;
    padding: .6rem .75rem;
}
.history-table tbody tr { border-bottom: 1px solid #f0f0f0; }
.history-table tbody tr:last-child { border-bottom: none; }
.history-table tbody td { padding: .85rem .75rem; vertical-align: middle; color: #333; }

.history-thumb {
    width: 56px; height: 42px;
    background: #2a2a2a;
    border-radius: .3rem;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.4);
    font-size: .8rem;
    flex-shrink: 0;
}
.history-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.project-name  { font-weight: 600; color: #1a1a1a; }
.project-id    { font-size: .75rem; color: #999; margin-top: .1rem; }
.submitted-date { font-size: .8rem; color: #555; }
.submitted-time { font-size: .75rem; color: #aaa; }

.badge-submitted {
    background: #bfd737;
    color: #333;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .35em .75em;
    border-radius: .25rem;
    white-space: nowrap;
    display: inline-block;
}
.badge-draft {
    background: transparent;
    color: #777;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .5px;
    padding: .3em .7em;
    border-radius: .25rem;
    border: 1.5px solid #ccc;
    white-space: nowrap;
    display: inline-block;
}

.btn-action {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .4px;
    padding: .35rem .9rem;
    border-radius: .3rem;
    border: 1.5px solid #333;
    color: #333;
    background: transparent;
    white-space: nowrap;
    text-decoration: none;
}
.btn-action:hover { background: #333; color: #fff; }
.btn-action-green {
    border-color: #bfd737;
    color: #99bc31;
}
.btn-action-green:hover { background: #bfd737; color: #333; }

.btn-dots {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1rem;
    padding: .25rem .5rem;
    line-height: 1;
    cursor: pointer;
}
.btn-dots:hover { color: #333; }

.app-help-bar {
    text-align: center;
    padding: 1rem 0 .5rem;
    font-size: .85rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
    margin-top: 1rem;
}
.app-help-bar a { color: #99bc31; }
.app-help-bar a:hover { color: #bfd737; }

/* ---- Header right group (house + DoD logo) ---- */
.dod-header-right {
    position: absolute;
    top: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.dod-header-right img { height: 40px; }
.dod-home-link {
    color: #bfd737;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
}
.dod-home-link:hover { color: #99bc31; }
.dod-profile-link {
    color: #aaa;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
}
.dod-profile-link:hover { color: #bfd737; }
.dod-logout-link {
    color: #aaa;
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
}
.dod-logout-link:hover { color: #e05c5c; }

/* ---- Profile page ---- */
.profile-section-title {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #bfd737;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #f0f0f0;
}
.pwd-req {
    font-size: .72rem;
    color: #aaa;
    margin-top: .35rem;
}
.pwd-req span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-right: .75rem;
    white-space: nowrap;
}
.pwd-req span.met { color: #99bc31; }
.pwd-req span.unmet { color: #ccc; }

/* ---- Header accent line ---- */
.dod-header-line {
    height: 3px;
    background: #bfd737;
    margin: 0 -1.5rem 1.25rem;
}

/* ---- App Footer ---- */
#app-footer {
    background: #1e1e1e;
    color: rgba(255,255,255,.55);
    font-size: .8rem;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}
#app-footer .footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: .75rem;
}
#app-footer .footer-logo-wrap img { height: 48px; }
#app-footer .footer-brand { color: rgba(255,255,255,.7); font-size: .75rem; font-weight: 700; letter-spacing: .5px; line-height: 1.2; }
#app-footer .footer-email { color: rgba(255,255,255,.65); font-size: .8rem; }
#app-footer a { color: #bfd737; text-decoration: none; }
#app-footer a:hover { color: #fff; }

/* Footer */
#footer {
    text-align: center;
    padding: 8px;
    color: #fff;
    clear: both;
    font-size: 12px;
}

/* Word wrap for long values in preview */
.word-wrap {
    display: block;
    max-width: 180px;
    word-wrap: break-word;
}
