a[href*="/file/private"][href*="dl=0"] {
    display: none !important;
}

img[src*="/file/private"][src*="dl=0"],
.dg-viewer canvas {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.dg-viewer {
    position: relative;
    width: 100%;
    background: #eef1f4;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dg-viewer.dg-thumb {
    overflow: hidden;
    pointer-events: none;
    background: #fff;
}

.dg-toolbar {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(30, 46, 0, 0.92);
    color: #fff;
    font-size: 0.8rem;
}

.dg-toolbar button {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.dg-toolbar button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dg-toolbar .dg-zoom-label {
    min-width: 48px;
    text-align: center;
}

.dg-pages {
    margin: 0 auto;
    padding: 0.75rem;
}

.dg-toolbar .dg-page-label {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.dg-thumb .dg-pages {
    padding: 0;
}

.dg-page {
    margin: 0 auto 0.75rem;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.dg-thumb .dg-page {
    margin: 0;
    box-shadow: none;
}

.dg-page canvas {
    display: block;
    width: 100%;
    height: auto;
}

.dg-status {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

.dg-thumb .dg-status {
    padding: 1rem 0.5rem;
    font-size: 0.75rem;
}

.dg-actions {
    display: inline-flex;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.dg-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(138, 191, 20, 0.35);
    background: rgba(138, 191, 20, 0.1);
    color: #3a5c00;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.dg-actions a:hover {
    background: rgba(138, 191, 20, 0.2);
    color: #1e2e00;
}

@media (max-width: 575.98px) {
    .dg-actions a span {
        display: none;
    }
}

@media print {
    .dg-viewer,
    img[src*="/file/private"][src*="dl=0"] {
        display: none !important;
    }
}
