#aq-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 24px 0;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    background: #fff;
}

.aq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d6a9f 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
}

.aq-naslov {
    font-size: 1em;
    font-weight: 700;
}

.aq-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8em;
    opacity: .85;
}

.aq-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #64748b;
    display: inline-block;
    flex-shrink: 0;
}

.aq-dot.online {
    background: #22c55e;
    animation: blink 2s infinite;
}

.aq-dot.offline {
    background: #ef4444;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}

/* Scroll wrapper za male ekrane */
.aq-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.aq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88em;
    white-space: nowrap;
}

/* Zaglavlje tabele */
.aq-table thead tr {
    background: #1e3a5f;
    color: #fff;
}

.aq-table thead th {
    padding: 10px 14px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,.1);
    line-height: 1.3;
}

.aq-table thead th:last-child {
    border-right: none;
}

.aq-table thead th small {
    font-size: .78em;
    font-weight: 400;
    opacity: .75;
}

.aq-th-period {
    text-align: left !important;
    min-width: 140px;
}

/* Tijelo tabele */
.aq-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background .15s;
}

.aq-table tbody tr:hover {
    background: #f8fafc;
}

.aq-table tbody tr:last-child {
    border-bottom: none;
}

/* Trenutni red – naglašen */
.aq-table tbody tr.aq-current {
    background: #eff6ff;
    font-weight: 600;
}

.aq-table tbody tr.aq-current:hover {
    background: #dbeafe;
}

.aq-table tbody td {
    padding: 11px 14px;
    text-align: center;
    color: #1e293b;
    border-right: 1px solid #e2e8f0;
}

.aq-table tbody td:last-child {
    border-right: none;
}

.aq-period {
    text-align: left !important;
    font-weight: 600;
    color: #1e3a5f !important;
    white-space: nowrap;
}

/* Loader / Error */
.aq-loader,
.aq-error {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
    margin: 0;
}

.aq-error {
    color: #ef4444;
}