/* =========================
   GRADE VARIABLES
========================= */

.grade{
    --accent-color: #2563eb;
    --accent-color-dark: #1d4ed8;
    --accent-light: #dbeafe;
}

/* =====================================
   UNIVERSAL KTP GENERATOR
===================================== */

.main{
    width:100%;
}

/* =====================================
   HEADER
===================================== */

.main h1{
    text-align:center;
    margin-bottom:25px;
    font-size:clamp(2rem,4vw,3rem);
    color:#0f172a;
}

/* =========================
   HERO
========================= */

.generator-hero{
    padding-top:40px;
    padding-bottom:30px;
    max-width:90%;
    margin:0 auto;
}

.generator-hero-content{
    background: linear-gradient(
        135deg,
        var(--accent-color),
        var(--accent-color-dark)
    );

    color:#fff;

    padding:50px;

    border-radius:30px;

    box-shadow:0 10px 35px rgba(37,99,235,.25);
}

.generator-badge{
    display:inline-block;

    padding:8px 16px;

    border-radius:999px;

    background:rgba(255,255,255,.2);

    font-size:14px;

    font-weight:600;

    margin-bottom:20px;
}

.generator-hero h1{
    margin:0 0 15px;

    font-size:42px;

    line-height:1.2;

    color:#fff;
}

.generator-hero p{
    margin:0;

    font-size:18px;

    opacity:.95;
}

/* =====================================
   INFO BLOCK
===================================== */

.note{
    background:#eff6ff;
    border-left:5px solid #2563eb;
    padding:18px 20px;
    border-radius:14px;
    margin-bottom:30px;
    line-height:1.6;
}

/* =====================================
   FORM GRID
===================================== */

.grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:25px;
}

.grid > div{
    background:#ffffff;
    padding:20px;
    border-radius:20px;
    box-shadow:0 6px 24px rgba(15,23,42,.06);
}

.grid label{
    display:block;
    margin-bottom:12px;
    font-weight:600;
    color:#334155;
}

/* =====================================
   INPUTS
===================================== */

input,
textarea,
select{
    font-family:inherit;
    font-size:15px;
}

input[type="date"],
input[type="text"],
input[type="number"],
textarea{
    width:100%;
    padding:12px 14px;
    margin-top:6px;
    border:1px solid #cbd5e1;
    border-radius:12px;
    background:#ffffff;
    transition:.2s;
    box-sizing:border-box;
}

input[type="date"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.error{
    border-color:#dc2626 !important;
}

#subjectName{
    max-width:450px;
}

#topicsInput{
    min-height:400px;
    resize:vertical;
}

/* =====================================
   DAYS
===================================== */

.days{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:10px;
}

.days label{
    margin:0;
    padding:8px 12px;
    background:#f1f5f9;
    border-radius:10px;
    cursor:pointer;
    font-weight:500;
}

/* =====================================
   BUTTONS
===================================== */

.controls{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin:25px 0;
    align-items:center;
}

.controls button{
    border:none;
    border-radius:14px;
    padding:14px 22px;
    font-size:15px;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

.controls button:hover{
    transform:translateY(-2px);
}

#btnGenerate{
    background:#2563eb;
    color:white;
}

#btnGenerate:hover{
    background:#1d4ed8;
}

#btnSave{
    background:#ebe772;
    color:#1e293b;
}

#btnSave:hover{
    background:#e2cc4d;
}

#btnClear{
    background:#dc2626;
    color:white;
}

#btnClear:hover{
    background:#b91c1c;
}

#btnXlsx{
    background:#059669;
    color:white;
}

#btnXlsx:hover{
    background:#047857;
}

#btnWord{
    background:#8fc7f8;
    color:white;
}

#btnWord:hover{
    background:#86a6e8;
}

/* =====================================
   MESSAGES
===================================== */

#msg{
    font-weight:600;
    color:#dc2626;
    padding:8px 0;
}

/* =====================================
   TABLE
===================================== */

#planContainer{
    margin-top:30px;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

#planTable{
    width:100%;
    min-width:700px;

    border-collapse:collapse;

    background:#fff;

    border-radius:24px;

    overflow:hidden;

    box-shadow:0 8px 30px rgba(15,23,42,.08);
}

#planTable th{
    background:var(--accent-color-dark);

    color:white;

    padding:16px;

    text-align:center;
}

#planTable td{
    padding:14px 16px;

    border-bottom:1px solid #e2e8f0;
}

#planTable td:first-child{
    width:70px;
    text-align:center;
}

#planTable td:nth-child(2){
    width:120px;
    text-align:center;
}

#planTable a{
    color:var(--accent-color-dark);
    font-weight:600;
    text-decoration:none;
}

#planTable a:hover{
    text-decoration:underline;
}

.section-row td{
    background:#dbeafe;
    color:var(--accent-color-dark);
    font-weight:700;
    font-size:18px;
    text-align:left;
}

.topic-row td{
    background:#eff6ff;
    color:var(--accent-color);
    font-weight:600;
    text-align:left;
}


/* =====================================
   LINK BUTTON
===================================== */

.open-link{
    margin-left:10px;
    border:none;
    background:none;
    cursor:pointer;
    font-size:16px;
}

/* =====================================
   QUICK-NAV
===================================== */

.quick-nav{
   display:grid;
    grid-template-columns:repeat(2,minmax(280px,560px));
    gap:20px;
    justify-content:center;
     margin-top: 0;
}

.quick-nav-title{
    grid-column: 1 / -1;

    text-align:center;
    font-size:1.3rem;
    font-weight:700;
    margin:0 0 24px;
    color:var(--accent-color);
    position:relative;
}

.quick-nav-title::after{
    content:"";
    display:block;
    width:60px;
    height:3px;
    background:var(--accent-color);
    border-radius:3px;
    margin:10px auto 0;
}

.quick-card{
    display:block;
    padding:24px;
    background:#fff;
    border:2px solid var(--accent-light);
    border-radius:16px;
    text-decoration:none;
    color:inherit;
    transition:all .25s ease;
    position:relative;
    overflow:hidden;
}

.quick-card::before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:4px;
    background:var(--accent-color);
}

.quick-card:hover{
    transform:translateY(-4px);
    border-color:var(--accent-color);
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.quick-card-icon{
    width:52px;
    height:52px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    border-radius:50%;
    background:var(--accent-light);
    flex-shrink:0;
}

.quick-card h3{
    margin:0 0 10px;
    color:var(--accent-color);
    font-size:1.2rem;
}

.quick-card p{
    margin:0 0 16px;
    line-height:1.6;
    color:#555;
    text-align: justify;
}

.quick-card-header{
    display:flex;
    align-items:center;
    gap:14px;
    margin-bottom:12px;
}

.quick-card-header h3{
    margin:0;
}

/* =====================================
   MOBILE
===================================== */

@media (max-width:768px){

    .quick-nav{
        grid-template-columns:1fr;
        gap:16px;
    }

    .quick-card{
        padding:20px;
    }
}

@media (max-width:900px){

    .grid{
        grid-template-columns:1fr;
    }

    .controls{
        flex-direction:column;
        align-items:stretch;
    }

    .controls button{
        width:100%;
    }

    #topicsInput{
        min-height:250px;
    }

    #planTable{
        min-width:300px;
    }

    #planTable td{
        padding:10px 8px;
        font-size:14px;
    }

    #planTable td:first-child{
        width:50px;
    }

    #planTable td:nth-child(2){
        width:90px;
    }

    .main h1{
        font-size:2rem;
    }
    .days label{
    padding:8px 10px;
}
}