*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: #efefef;
    color: #000000;
    font-family: Tahoma, "Courier New", Courier, sans-serif;
    font-size: 11px;
    margin: 0;
    padding: 10px;
    line-height: 1.5;
}

a { color: #0000cc; text-decoration: underline; }
a:hover { color: #ff0000; background-color: #ffffcc; }
.link-danger { color: #cc0000; }
.stars { color: #ffaa00; }

img { border: 0; }

.wrapper { max-width: 1200px; margin: 0 auto; }

.site-header {
    border: 2px solid #000080;
    background-color: #d4d0c8;
    padding: 8px 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-logo { display: block; line-height: 0; }
.brand-mark {
    width: 50px;
    height: 50px;
    object-fit: cover;
    display: block;
}

.site-title {
    font-size: 18px;
    font-weight: bold;
    color: #000080;
    margin: 0;
    display: inline;
    text-decoration: none;
}

a.site-title:hover { color: #000080; background: transparent; }

.site-description { font-size: 11px; color: #000; }

.site-nav {
    font-size: 11px;
    text-align: left;
    white-space: normal;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin: 0 0 10px;
    padding: 6px 10px;
    background: #d4d0c8;
    border: 2px solid #000080;
}

.breadcrumbs li { display: inline; }
.crumb-sep { color: #000080; margin: 0 2px; }

.page-main { min-width: 0; }

.main-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.sidebar-right { width: 200px; flex-shrink: 0; }
.content-center { flex: 1; min-width: 0; }
.sidebar-left { width: 240px; flex-shrink: 0; }

.panel-box {
    border: 2px solid #000080;
    background-color: #ffffff;
    margin-bottom: 10px;
}

.panel-header {
    background-color: #000080;
    color: #ffffff;
    font-weight: bold;
    padding: 4px 8px;
    font-size: 11px;
}

.panel-body { padding: 8px; }

table.forum-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 2px solid #000080;
    margin-bottom: 10px;
}

table.forum-table th {
    background-color: #000080;
    color: #ffffff;
    font-size: 11px;
    text-align: right;
    padding: 4px 6px;
}

table.forum-table td {
    padding: 6px;
    border: 1px solid #d4d0c8;
    vertical-align: top;
}

table.forum-table.flush { margin-bottom: 0; border: none; }

.cat-header {
    background-color: #d4d0c8;
    font-weight: bold;
    font-size: 12px;
    border-bottom: 1px solid #808080;
}

.section-title {
    background-color: #d4d0c8;
    color: #000080;
    font-weight: bold;
    padding: 5px 8px;
    border: 1px solid #808080;
    border-bottom: none;
    font-size: 12px;
}

h1.page-title,
h1.topic-title {
    font-size: 13px;
    font-weight: bold;
    color: #000080;
}

h1.page-title { margin: 0 0 8px; }

h1.topic-title {
    background-color: #d4d0c8;
    border: 1px solid #808080;
    padding: 6px 10px;
    margin: 0 0 10px;
}

.btn-retro {
    background-color: #d4d0c8;
    color: #000000;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 2px 8px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-retro:hover { color: #000; background-color: #d4d0c8; }
.btn-retro:active { border-color: #808080 #ffffff #ffffff #808080; }
.btn-stack { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.btn-center { text-align: center; }

.stat-item { padding: 3px 0; border-bottom: 1px dashed #d4d0c8; }
.recent-item,
.recent-topic { padding: 5px 0; border-bottom: 1px solid #efefef; }

.muted { color: #555; }
.faint { color: #777; }
.tiny { font-size: 9px; color: #777; }
.count { text-align: center; font-weight: bold; color: #000080; }
.badge-label {
    font-size: 9px;
    color: #555;
    background: #eee;
    padding: 1px 3px;
    border: 1px solid #ccc;
    display: inline-block;
    margin-top: 2px;
}
.forum-desc { font-size: 10px; color: #555; margin-top: 1px; }
.row-actions { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.empty-cell { text-align: center; padding: 20px; color: #888; }

.auth-box,
.form-box,
.editor-box {
    border: 2px solid #000080;
    background-color: #d4d0c8;
    padding: 12px;
}

.auth-box { width: 360px; max-width: 100%; margin: 24px auto; }
.form-box { max-width: 650px; margin: 20px auto; }
.editor-box { max-width: 600px; margin: 20px auto; }
.profile-wrap { max-width: 800px; margin: 0 auto; }

.auth-header,
.form-header,
.editor-header,
h1.auth-header,
h1.form-header,
h1.editor-header {
    background-color: #000080;
    color: #ffffff;
    font-weight: bold;
    font-size: 11px;
    padding: 4px 8px;
    margin: -12px -12px 12px -12px;
}

.input-retro {
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background-color: #ffffff;
    padding: 4px 6px;
    font-family: inherit;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

.field { margin-bottom: 8px; }
.field label { display: block; font-weight: bold; margin-bottom: 2px; }
.form-actions {
    text-align: left;
    border-top: 1px solid #808080;
    padding-top: 8px;
}

.error-msg,
.alert-danger {
    background-color: #ffcccc;
    border: 1px solid #cc0000;
    color: #cc0000;
    padding: 5px;
    margin-bottom: 10px;
    font-size: 11px;
}

.success-msg,
.alert-success {
    background-color: #ccffcc;
    border: 1px solid #00cc00;
    color: #006600;
    padding: 5px;
    margin-bottom: 10px;
    font-size: 11px;
}

.note-box {
    background-color: #ffffe0;
    border: 1px solid #e6db55;
    padding: 6px 10px;
    margin-bottom: 12px;
    font-size: 10px;
}

.post-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 2px solid #000080;
    margin-bottom: 12px;
}

.post-header {
    background-color: #000080;
    color: #ffffff;
    font-size: 11px;
    padding: 4px 8px;
    font-weight: bold;
    text-align: right;
}

.author-cell {
    width: 170px;
    background-color: #f0f0f0;
    border-left: 1px solid #d4d0c8;
    padding: 10px;
    vertical-align: top;
    text-align: center;
}

.content-cell {
    padding: 12px;
    vertical-align: top;
    background-color: #ffffff;
    line-height: 1.6;
}

.post-date {
    font-size: 10px;
    color: #666666;
    border-bottom: 1px dashed #d4d0c8;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.post-footer {
    margin-top: 15px;
    padding-top: 6px;
    border-top: 1px dashed #e0e0e0;
    text-align: left;
}

.avatar-img {
    width: 60px;
    height: 60px;
    border: 1px solid #808080;
    background-color: #d4d0c8;
    object-fit: cover;
    margin: 0 auto 6px auto;
    display: block;
}

.avatar-lg {
    width: 90px;
    height: 90px;
    border: 2px solid #808080;
    background-color: #d4d0c8;
    object-fit: cover;
    line-height: 90px;
    font-size: 28px;
    font-weight: bold;
    color: #000080;
    text-align: center;
}

.avatar-box {
    width: 60px;
    height: 60px;
    background-color: #d4d0c8;
    border: 1px solid #808080;
    margin: 0 auto 6px auto;
    line-height: 60px;
    font-size: 20px;
    font-weight: bold;
    color: #000080;
}

.quote-box {
    background-color: #f9f9f9;
    border: 1px solid #b0b0b0;
    border-right: 4px solid #000080;
    padding: 6px 10px;
    margin: 6px 0;
    font-size: 11px;
    color: #333;
}

.quote-header { font-weight: bold; color: #000080; margin-bottom: 3px; }

.reply-box {
    background-color: #ffffff;
    border: 2px solid #000080;
    margin-bottom: 10px;
    padding: 8px;
}

.reply-meta {
    border-bottom: 1px dashed #d4d0c8;
    padding-bottom: 4px;
    margin-bottom: 6px;
    font-size: 10px;
    color: #555;
}

.bio-box {
    margin-top: 10px;
    padding: 6px;
    background-color: #f7f7f7;
    border: 1px dashed #ccc;
}

.profile-table { width: 100%; }
.profile-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sortable-row { cursor: grab; }
.sortable-row:active { cursor: grabbing; }
.sortable-ghost { background-color: #ffffcc !important; opacity: 0.5; }
.drag-handle { color: #888; font-weight: bold; cursor: grab; text-align: center; }

.site-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 10px;
    color: #666;
    border-top: 1px solid #d4d0c8;
    padding-top: 6px;
}

@media (max-width: 900px) {
    .site-header { flex-wrap: wrap; }
    .site-nav { text-align: right; }
    .main-container { flex-direction: column; }
    .sidebar-right,
    .sidebar-left { width: 100%; }
    .author-cell { width: 110px; }
}
