/* PLAATO Dashboard Styles */

article header hgroup p {
    margin-bottom: 0;
}

dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
}

dt {
    font-weight: 600;
    color: var(--muted-color);
}

code {
    font-size: 0.75em;
    word-break: break-all;
}

/* Metric cards */
.metric-card {
    text-align: center;
    padding: 0.5rem;
}
.metric-card header {
    font-size: 0.8rem;
    color: var(--muted-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem;
}
.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    padding: 0.5rem 0;
}

/* Small metric cards for dashboard */
.metric-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}
.metric-card-sm {
    text-align: center;
    padding: 0.5rem;
    background: var(--card-sectionning-background-color);
    border-radius: var(--border-radius);
}
.metric-label {
    display: block;
    font-size: 0.7rem;
    color: var(--muted-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.metric-val {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Log table */
.log-scroll {
    max-height: 400px;
    overflow-y: auto;
}
.log-table {
    font-size: 0.8rem;
}
.log-table td, .log-table th {
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}
.log-table .ts {
    color: var(--muted-color);
    font-family: monospace;
    font-size: 0.75rem;
}
.pour-event {
    color: var(--primary);
    font-weight: 600;
}

/* Chart spacing */
canvas {
    margin-bottom: 1.5rem;
}

/* Device link in dashboard */
article h3 a {
    color: inherit;
    text-decoration: none;
}
article h3 a:hover {
    text-decoration: underline;
}

/* PIN Login */
.pin-display {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.pin-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid var(--muted-color);
    transition: all 0.2s ease;
}
.pin-dot.filled {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transform: scale(1.15);
}
.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 280px;
    margin: 0 auto;
}
.pin-key {
    font-size: 1.4rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    background: var(--card-sectionning-background-color);
    border: 1px solid var(--muted-border-color);
    color: var(--color);
    transition: background 0.1s;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.pin-key:hover {
    background: var(--primary-focus);
}
.pin-key:active {
    transform: scale(0.95);
    background: var(--primary-focus);
}
.pin-key-fn {
    font-size: 1.2rem;
}
.pin-key-submit {
    background: var(--primary);
    color: var(--primary-inverse);
}
.pin-key-submit:hover {
    background: var(--primary-hover);
}
.pin-error {
    text-align: center;
    color: var(--del-color);
    margin-bottom: 1rem;
}
