body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #202733;
}

header {
    background: #24344d;
    color: white;
    padding: 14px 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.brand a {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 4px 8px;
    display: inline-block;
}

main {
    max-width: 1800px;
    margin: 22px auto;
    padding: 0 18px;
}

footer {
    text-align: center;
    color: #667;
    padding: 30px;
}

.userbar {
    background: #e9eef7;
    border: 1px solid #d2d9e8;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.card {
    background: white;
    border: 1px solid #d9dee8;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 16px;
}

.button,
button {
    display: inline-block;
    background: #2f65a7;
    color: white !important;
    padding: 8px 12px;
    border-radius: 6px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    margin: 3px;
}

.button.secondary {
    background: #6b7788;
}

.button.warning {
    background: #a96a00;
}

.button.danger {
    background: #a83232;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin: 12px 0;
}

th,
td {
    padding: 10px;
    border-bottom: 1px solid #dde2eb;
    text-align: left;
    vertical-align: top;
}

th {
    background: #edf1f7;
}

input,
select,
textarea {
    padding: 6px;
    border: 1px solid #aeb8c8;
    border-radius: 5px;
    box-sizing: border-box;
}

textarea {
    min-height: 60px;
    font-family: Arial, Helvetica, sans-serif;
}

label {
    display: block;
    font-weight: bold;
}

.inline-form {
    display: inline-block;
    margin: 10px 0;
}

.inline-form select {
    width: auto;
    margin: 0 4px;
}

.pagination {
    margin: 16px 0;
}

.badge {
    display: inline-block;
    background: #e4ebf5;
    color: #26364f;
    border-radius: 99px;
    padding: 3px 8px;
    font-size: 12px;
    margin: 2px;
}

.notice {
    background: #fff6d7;
    border: 1px solid #d8bd59;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
}

.error {
    background: #ffe1e1;
    border: 1px solid #c87373;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
}

/* TREE */

.tree ul {
    list-style: none;
    border-left: 2px solid #cbd4e1;
    margin-left: 16px;
    padding-left: 18px;
}

.tree li {
    margin: 8px 0;
}

.node {
    padding: 6px 8px;
    background: #f9fbff;
    border: 1px solid #dde4ef;
    border-radius: 7px;
    display: inline-block;
}

/* EDITABLE HIERARCHY */

.editable-header {
    display: grid;
    grid-template-columns:
        2in
        3in
        1.5in
        .8in
        2in
        2in;
    gap: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #5f6d80;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 0 8px 6px;
}

.editable-row {
    display: grid;
    grid-template-columns:
        2in
        3in
        1.5in
        .8in
        2in
        2in;
    gap: 8px;
    align-items: center;
    background: #f9fbff;
    border: 1px solid #dde4ef;
    border-radius: 8px;
    padding: 8px;
    overflow-x: auto;
}

.edit-cell {
    display: block;
    min-width: 0;
}

.item-title a {
    font-weight: bold;
    line-height: 1.25;
}

.editable-tree .editable-row select {
    width: 1.5in;
    min-width: 1.5in;
    max-width: 1.5in;
}

.editable-tree .editable-row input {
    width: 1.5in;
    min-width: 1.5in;
    max-width: 1.5in;
}

.editable-tree .editable-row textarea {
    width: 3in;
    min-width: 3in;
    max-width: 3in;
    min-height: 34px;
    height: 34px;
    resize: vertical;
    font-size: 13px;
}

.item-priority input {
    width: .75in !important;
    min-width: .75in !important;
    max-width: .75in !important;
}

.item-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
}

.item-actions button,
.item-actions .button {
    padding: 6px 8px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 900px) {

    .editable-row,
    .editable-header {
        grid-template-columns: 1fr;
    }

    .editable-header {
        display: none;
    }

    .item-actions {
        justify-content: flex-start;
    }
}


/* EXPAND / COLLAPSE TREE CONTROLS */

.toggle-node {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    margin: 0 5px 0 0 !important;
    line-height: 20px;
    text-align: center;
    border-radius: 4px;
    background: #6b7788;
    color: white;
}

.toggle-spacer {
    display: inline-block;
    width: 29px;
    min-width: 29px;
}

.item-title {
    display: flex;
    align-items: center;
    gap: 3px;
}

.children {
    display: block;
}




/* Add to bottom of assets/style.css */

.leaf-description {
    width: 3in !important;
    min-width: 3in !important;
    max-width: 3in !important;
    height: 45px;
}

.leaf-superior {
    width: 2.25in !important;
    min-width: 2.25in !important;
    max-width: 2.25in !important;
}

.leaf-status {
    width: 1.4in !important;
    min-width: 1.4in !important;
    max-width: 1.4in !important;
}

.leaf-priority {
    width: .75in !important;
    min-width: .75in !important;
    max-width: .75in !important;
}

.small-muted {
    font-size: 12px;
    color: #667;
    margin-top: 4px;
}


/* Add to bottom of assets/style.css */

.auth-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.auth-form form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.auth-form .form-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.auth-form label {
    font-size: 12px;
    color: white;
}

.auth-form input {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    padding: 4px;
}

.create-account-btn,
.logout-btn,
.forgot-password-btn,
.profile-btn {
    font-size: 12px;
    color: white;
    text-decoration: none;
}

.forgot-password-btn,
.profile-btn {
    text-decoration: underline;
}

.logout-btn {
    background: #a83232;
    padding: 4px 8px;
    border-radius: 4px;
}

.create-account-btn {
    background: #2f65a7;
    padding: 4px 8px;
    border-radius: 4px;
}

.main-nav {
    background: #eef1f7;
    padding: 8px 24px;
    text-align: center;
}

.main-nav a {
    margin: 0 8px;
    color: #24344d;
    text-decoration: none;
    font-weight: bold;
}

/* Add to bottom of assets/style.css */

.auth-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.auth-form form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
}

.auth-form .form-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.auth-form label {
    font-size: 12px;
    color: white;
}

.auth-form input {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    padding: 4px;
}

.create-account-btn,
.logout-btn,
.forgot-password-btn,
.profile-btn {
    font-size: 12px;
    color: white;
    text-decoration: none;
}

.forgot-password-btn,
.profile-btn {
    text-decoration: underline;
}

.logout-btn {
    background: #a83232;
    padding: 4px 8px;
    border-radius: 4px;
}

.create-account-btn {
    background: #2f65a7;
    padding: 4px 8px;
    border-radius: 4px;
}

.main-nav {
    background: #eef1f7;
    padding: 8px 24px;
    text-align: center;
}

.main-nav a {
    margin: 0 8px;
    color: #24344d;
    text-decoration: none;
    font-weight: bold;
}
