
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f6f7fb;
}
.topbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #ffffff;
    border-bottom: 1px solid #eee;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 25px;
}

/* LOGO */
.logo {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.5px;
}

.logo span {
    color: #4f46e5;
}

/* NAV */
.nav {
    display: flex;
    gap: 18px;
}

.nav a {
    text-decoration: none;
    color: #444;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.nav a:hover {
    color: #4f46e5;
}

/* SEARCH */
.right {
    display: flex;
    align-items: center;
}

.search {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    outline: none;
    font-size: 13px;
    width: 200px;
    transition: 0.2s;
}

.search:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* LAYOUT */
.wrapper {
    display: flex;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #eaeaea;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 16px;
    margin-bottom: 15px;
}

.tool-link {
    display: block;
    padding: 6px 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: 0.2s;
}

.tool-link:hover {
    background: #eef2ff;
    color: #4f46e5;
}

/* MAIN */
.main {
    flex: 1;
    padding: 30px;
}

.card {
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

h1 {
    margin-top: 0;
    font-size: 22px;
}

/* UPLOAD BOX */
.upload-box {
    border: 2px dashed #cbd5e1;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    background: #fafafa;
    transition: 0.2s;
}

.upload-box.dragover {
    border-color: #4f46e5;
    background: #eef2ff;
}

input[type=file] {
    margin-top: 15px;
}

/* BUTTON */
button {
    border: none;
    display: inline-block;
    padding: 12px 20px 11px;
    background: #4f46e5;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
}
.action-btn {
    margin-top: 20px;
    cursor: pointer;
}

button:hover {
    background: #4338ca;
}

.download-btn{display:inline-block;padding:12px 20px 11px;background:#4f46e5;color:#fff;border-radius:8px;text-decoration:none;margin:20px auto 10px;cursor:pointer;font-size:16px;}

/* PREVIEW */
.preview {
    margin-top: 20px;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.step {
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 13px;
    color: #555;
    transition: 0.3s;
}

.step.active {
    background: #4f46e5;
    color: #fff;
}


/* CENTER CONTAINER */
.a4-wrapper{
    display: block;
    text-align: center;
    margin-top:20px;
}

.a4-page{
    width:100%;
    max-width:100%;
    height:88vh;          /* scalable height */
    background:#fff;
    border:1px solid #ddd;
    box-shadow:0 5px 20px rgba(0,0,0,0.15);
    margin-top:15px;
}

.pdf-frame{
    width:100%;
    height:100%;
    transform: scale(1);
    transform-origin: top left;
}

.blink{
    animation: blink 1.5s infinite;
}

@keyframes blink{
    0%{opacity:1;}
    25%{opacity:1;}
    50%{opacity:0;}
    75%{opacity:1;}
    100%{opacity:1;}
}

@media (max-width: 768px) {

    .nav {
        display: none;
    }

    .search {
        width: 140px;
    }

    .logo {
        font-size: 16px;
    }
}