/* === BASE === */
body {
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    margin: 0;
    padding: 20px;
}

a {
    color: #93c5fd;
    text-decoration: none;
}

button {
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #475569;
    background: #f8fafc;
    color: #111827;
    border-radius: 8px;
}

button:hover {
    background: #e2e8f0;
}

/* === LAYOUT === */
.wrap {
    max-width: 420px;
    margin: 80px auto;
    background: #1f2937;
    padding: 24px;
    border-radius: 12px;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel {
    background: #1e293b;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.panel-certmon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.panel-main {
    min-width: 0;
    flex: 1 1 auto;
}

.panel-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.session-note {
    flex: 0 0 300px;
    max-width: 300px;
    font-size: 13px;
    line-height: 1.45;
    color: #94a3b8;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 10px 12px;
}

.table-wrap {
    background: #1e293b;
    border-radius: 12px;
    overflow: auto;
}

/* === FORM === */
input {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.error {
    color: #fca5a5;
    margin-bottom: 12px;
}

.info {
    color: #93c5fd;
    margin-bottom: 12px;
}

.small {
    color: #94a3b8;
    font-size: 12px;
}

/* === TABLE === */
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1300px;
}

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

th {
    background: #273449;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:hover td {
    background: rgba(255,255,255,0.03);
}

.mono {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    word-break: break-all;
}

.nowrap {
    white-space: nowrap;
}

/* === DAYS === */
.days {
    font-weight: bold;
    white-space: nowrap;
}

.days.ok { color: #86efac; }
.days.warn { color: #facc15; }
.days.bad { color: #fca5a5; }

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.badge.yes {
    background: #14532d;
    color: #bbf7d0;
}

.badge.no {
    background: #7f1d1d;
    color: #fecaca;
}

/* === SUBJECT === */
details {
    max-width: 420px;
}

details summary {
    cursor: pointer;
    color: #93c5fd;
    user-select: none;
}

.subject-box {
    margin-top: 8px;
    padding: 10px;
    background: #0f172a;
    color: #cbd5e1;
    border: 1px solid #334155;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    max-width: 420px;
}

/* === MSG === */
.msg {
    color: #cbd5e1;
}

.msg-inline {
    margin-top: 10px;
    min-height: 18px;
    font-size: 14px;
}

.msg-success {
    color: #86efac;
}

.msg-error {
    color: #fca5a5;
}

/* === DEMO ACCOUNTS === */
.demo-box {
    margin-top: 18px;
    padding: 12px 14px;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 10px;
}

.demo-title {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.demo-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
}

.demo-login {
    color: #93c5fd;
}

.demo-pass {
    color: #fcd34d;
}

@media (max-width: 1100px) {
    .panel-certmon {
        flex-direction: column;
        align-items: stretch;
    }

    .session-note {
        flex: 0 0 auto;
        max-width: none;
    }
}