/* =========================================================
   ALGEMEEN
   ========================================================= */

:root {
    color-scheme: dark;
    font-family: Inter, system-ui, sans-serif;
}

body {
    margin: 0;
    background: #0b1020;
    color: #f7f8ff;
}

.online {
    color: #53e69d;
}

.offline {
    color: #ff667a;
}

.card {
    padding: 24px;
    border: 1px solid #26304d;
    border-radius: 18px;
    background: #121a2d;
}


/* =========================================================
   DASHBOARD / INDEX.HTML
   ========================================================= */

.dashboard-page main {
    width: min(1100px, calc(100% - 32px));
    margin: 48px auto;
}

.dashboard-page .subtitle {
    color: #9da8c7;
}

.dashboard-page .grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.dashboard-page .top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-page .type {
    color: #9da8c7;
    font-size: 14px;
}

.dashboard-page dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 24px;
}

.dashboard-page dt {
    color: #9da8c7;
}

.dashboard-page dd {
    margin: 0;
    font-weight: 700;
}


/* =========================================================
   LOGIN / LOGIN.HTML
   ========================================================= */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.login-page form {
    width: min(380px, calc(100% - 32px));
    padding: 28px;
    border: 1px solid #26304d;
    border-radius: 18px;
    background: #121a2d;
}

.login-page label {
    display: block;
    margin-top: 16px;
    color: #9da8c7;
}

.login-page input {
    box-sizing: border-box;
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #34405f;
    border-radius: 10px;
    background: #0b1020;
    color: #f7f8ff;
}

.login-page button {
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: #5865f2;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.login-page .error {
    color: #ff667a;
}


/* =========================================================
   BOT DETAIL / LOGVIEWER
   ========================================================= */

.bot-detail-page main {
    width: min(1100px, calc(100% - 32px));
    margin: 40px auto;
}

.bot-detail-page a {
    color: #8bb5ff;
    text-decoration: none;
}

.bot-detail-page .card {
    margin-top: 20px;
}

.bot-detail-page .hold {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 12px;
    border: 1px solid #d7a441;
    border-radius: 999px;
    color: #f6c453;
}

.bot-detail-page .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
}

.bot-detail-page button {
    padding: 8px 12px;
    border: 1px solid #34405f;
    border-radius: 10px;
    background: #182238;
    color: #f7f8ff;
    cursor: pointer;
}

.bot-detail-page .log-row {
    display: grid;
    grid-template-columns: 190px 90px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #26304d;
}

.bot-detail-page .log-time {
    color: #9da8c7;
}

.bot-detail-page .level-ERROR {
    color: #ff667a;
}

.bot-detail-page .level-WARNING {
    color: #f6c453;
}

.bot-detail-page .level-COMMAND {
    color: #8bb5ff;
}

.bot-detail-page .level-INFO {
    color: #53e69d;
}

/* =========================================================
   TWITCH MOD Pagina / MOD.HTML
   ========================================================= */

.mod-dashboard-page {
    min-height: 100vh;
}

.mod-dashboard {
    width: min(1500px, calc(100% - 32px));
    margin: 24px auto;
}

.mod-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.mod-header h1 {
    margin-bottom: 4px;
}

.stream-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #34405f;
    border-radius: 999px;
    background: #121a2d;
}

.stream-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9da8c7;
}

.mod-stream-info {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.mod-stream-info > div {
    padding: 16px;
    border: 1px solid #26304d;
    border-radius: 14px;
    background: #121a2d;
}

.mod-label {
    display: block;
    margin-bottom: 6px;
    color: #9da8c7;
    font-size: 13px;
}

.mod-layout {
    display: grid;
    grid-template-columns: minmax(360px, 40%) 1fr;
    gap: 16px;
    margin-top: 16px;
    min-height: calc(100vh - 220px);
}

.mod-left-column {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 16px;
    min-height: 0;
}

.mod-panel {
    border: 1px solid #26304d;
    border-radius: 18px;
    background: #121a2d;
    overflow: hidden;
}

.mod-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #26304d;
}

.mod-panel-header h2 {
    margin: 0;
    font-size: 18px;
}

.moderator-actions {
    padding-bottom: 18px;
}

.selected-user {
    margin: 16px 18px;
    padding: 14px;
    border: 1px solid #34405f;
    border-radius: 12px;
    background: #0b1020;
}

.mod-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 18px;
}

.mod-action-grid button,
.mod-clear-chat,
.mod-chat-input button {
    padding: 12px;
    border: 1px solid #34405f;
    border-radius: 10px;
    background: #182238;
    color: #f7f8ff;
    font-weight: 700;
    cursor: pointer;
}

.mod-action-grid button:disabled,
.mod-clear-chat:disabled,
.mod-chat-input button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mod-clear-chat {
    width: calc(100% - 36px);
    margin: 10px 18px 0;
}

.moderator-logs {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.mod-log-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.mod-chat-panel {
    min-height: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.mod-chat-list {
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.chat-connection-state {
    color: #9da8c7;
    font-size: 14px;
}

.mod-chat-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid #26304d;
}

.mod-chat-input input {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #34405f;
    border-radius: 10px;
    background: #0b1020;
    color: #f7f8ff;
}

.mod-empty-state {
    padding: 24px;
    color: #9da8c7;
    text-align: center;
}

@media (max-width: 900px) {
    .mod-stream-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .mod-layout {
        grid-template-columns: 1fr;
    }

    .mod-left-column {
        grid-template-rows: auto minmax(320px, 1fr);
    }

    .mod-chat-panel {
        min-height: 600px;
    }
}

.mod-chat-row {
    padding: 10px 4px;
    border-bottom: 1px solid #26304d;
}

.mod-chat-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.mod-chat-username {
    padding: 0;
    border: 0;
    background: transparent;
    color: #8bb5ff;
    font-weight: 700;
    cursor: pointer;
}

.mod-chat-time {
    color: #74809f;
    font-size: 12px;
}

.mod-chat-message {
    color: #f7f8ff;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.mod-log-row {
    padding: 12px;
    border-bottom: 1px solid #26304d;
}

.mod-log-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.mod-log-time {
    color: #74809f;
    font-size: 12px;
}

.mod-log-user {
    font-weight: 700;
    margin-bottom: 4px;
}

.mod-log-meta {
    color: #9da8c7;
    font-size: 13px;
    margin-top: 3px;
}

.mod-log-reason {
    margin-top: 6px;
}

.mod-log-message {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #0b1020;
    color: #dce2f5;
    overflow-wrap: anywhere;
}

.selected-user {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selected-user-login {
    color: #9da8c7;
    font-size: 14px;
}

.mod-chat-row {
    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.mod-chat-row.mod-chat-row-selected {
    background: #182238;
    border-left: 3px solid #8bb5ff;
}

.mod-chat-username:hover,
.mod-chat-username:focus-visible {
    text-decoration: underline;
}