.sticker-page {
    max-width: var(--small-width);
    margin: 0 auto;
    padding: 30px;
}

.sticker-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
}

.sticker-config {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: fit-content;
}

.config-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-section-title::before {
    content: '📝';
    font-size: 18px;
}

.config-section {
    margin-bottom: 24px;
}

.config-section:last-child {
    margin-bottom: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-field label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
}

.input-field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    resize: vertical;
}

.input-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.reset-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.print-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.print-btn:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.sticker-preview {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-title::before {
    content: '👁️';
    font-size: 18px;
}

.preview-count {
    font-size: 13px;
    color: #64748b;
}

.sticker-grid {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
}

.print-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 32px;
    min-height: 500px;
}

.exam-sticker {
    width: 100%;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: none;
    border: 2px solid #000;
    background: #fff;
}

.sticker-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    border: none;
    border-radius: 4px;
    padding: 8px;
    z-index: 1;
}

.sticker-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.sticker-label {
    background: transparent;
    color: #000;
    padding: 2px 6px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.sticker-value {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    text-align: center;
    border-bottom: 2px solid #000;
}

@page {
    size: A4 portrait;
    margin: 0;
}

@media print {
    * {
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        visibility: hidden !important;
    }

    body {
        visibility: visible !important;
        background: #fff !important;
        width: 210mm !important;
        height: 297mm !important;
    }

    #stickerGrid {
        visibility: visible !important;
        background: #fff !important;
        padding: 1cm !important;
        margin: 0 !important;
        width: 210mm !important;
        height: 297mm !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        box-sizing: border-box !important;
        page-break-inside: avoid !important;
    }

    #stickerGrid * {
        visibility: visible !important;
    }

    #stickerGrid .print-page {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: repeat(10, 1fr) !important;
        gap: 32px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
        page-break-inside: avoid !important;
    }

    #stickerGrid .exam-sticker {
        width: 100% !important;
        height: 100% !important;
        border-radius: 8px !important;
        padding: 6px !important;
        box-shadow: none !important;
        border: 2px solid #000 !important;
        background: #fff !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    #stickerGrid .sticker-content {
        border: none !important;
        padding: 8px !important;
        gap: 6px !important;
    }

    #stickerGrid .sticker-label {
        padding: 2px 6px !important;
        font-size: 16px !important;
        background: transparent !important;
        color: #000 !important;
    }

    #stickerGrid .sticker-value {
        font-size: 16px !important;
        color: #000 !important;
        border-bottom: 2px solid #000 !important;
    }
}

@media (max-width: 1024px) {
    .sticker-container {
        grid-template-columns: 1fr;
    }

    .sticker-config {
        order: 2;
    }

    .sticker-preview {
        order: 1;
    }
}

@media (max-width: 768px) {
    .print-page {
        grid-template-columns: repeat(3, 1fr);
    }

    .sticker-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .sticker-page {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .print-page {
        grid-template-columns: repeat(2, 1fr);
    }
}