﻿/* ===== CSS Variables ===== */
:root {
    /* Main Palette - Professional & Academic */
    --primary: #B8860B;
    /* Dark Goldenrod - More subtle gold */
    --primary-dark: #8B4513;
    /* SaddleBrown */
    --primary-light: #DAA520;
    /* Goldenrod */
    --secondary: #2C3E50;
    /* Dark Blue Gray - Academic standard */

    --accent: #FDF5E6;
    /* Old Lace */
    --cream: #FFFAF0;
    /* Floral White */
    --cream-dark: #F5DEB3;
    /* Wheat */

    --success: #198754;
    /* Professional Green */
    --warning: #ffc107;
    --error: #dc3545;

    /* Backgrounds */
    --bg-primary: #FAFAFA;
    /* Very light gray instead of cream */
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F8F9FA;
    --bg-card: #FFFFFF;

    /* Typography */
    --text-primary: #212529;
    /* Almost black */
    --text-secondary: #495057;
    /* Dark gray */
    --text-muted: #6C757D;
    /* Medium gray */

    --border-color: #DEE2E6;
    /* Standard border gray */

    /* Refined Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    /* Slightly sharper corners */
    --radius-xl: 12px;
    --radius-full: 9999px;

    --transition: all 0.2s ease-in-out;
    /* Snappier transition */
    --font-heading: 'Philosopher', 'Times New Roman', serif;
    --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

/* Professional Watermark Background */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    /* Responsive width */
    max-width: 700px;
    /* Cap size */
    height: 90vw;
    max-height: 700px;
    background-image: url('../images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.04;
    /* Very subtle */
    z-index: -1;
    pointer-events: none;
    filter: grayscale(100%);
    /* Neutral academic look */
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Elegant Animations ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(248, 174, 25, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(248, 174, 25, 0.5), 0 0 30px rgba(248, 174, 25, 0.3);
    }
}

/* ===== Header ===== */
.header {
    background: #FFFFFF;
    border-bottom: 4px solid var(--primary);
    /* Strong academic border */
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Background Pattern Logo - Removed for cleaner look */
/* .header::before { ... } */

@keyframes patternPulse {

    0%,
    100% {
        opacity: 0.03;
        transform: scale(1);
    }

    50% {
        opacity: 0.06;
        transform: scale(1.02);
    }
}

.header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary), var(--primary-light), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.header .container {
    display: flex;
    flex-direction: column;
    /* Stack vertically for a centered, official look */
    align-items: center;
    justify-content: center;
    padding: 25px 0;
    max-width: 1200px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
    width: 100%;
}

.logo-img {
    display: block !important;
    width: auto;
    /* Allow natural aspect ratio */
    height: 90px;
    /* Fixed height for consistency */
    max-width: 100%;
    /* Prevent overflow */
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    /* Larger and clearer */
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.logo-text span {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 5px;
    letter-spacing: 2px;
    /* Broader spacing for elegance */
    text-transform: uppercase;
    border-top: 2px solid var(--primary);
    /* Stronger separator */
    padding-top: 5px;
    display: inline-block;
}

/* ===== Main Content ===== */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 140px);
}

/* ===== Hero Simple ===== */
.hero-simple {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 0.6s ease-out 0.2s both;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.22rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-dark));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

.hero-description {
    font-family: var(--font-body);
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===== Form Card ===== */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    /* Slightly sharper corners */
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    /* Softer shadow */
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    /* Clean top border accent */
    border-top: 4px solid var(--primary);
}

/* Removed shimmering ::before for professional stillness */
/* .form-card::before { ... } */

.letter-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* ===== Enhanced Interactions ===== */
/* ===== Floating Labels (Material Design) ===== */
.form-group>label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    position: static;
    /* RESET for section headers */
    transform: none;
    pointer-events: auto;
}

.input-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.input-wrapper label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 4px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.input-wrapper label i {
    color: var(--primary);
    font-size: 1rem;
}

/* Input Base Styles */
.form-group input,
.form-group select,
.form-group textarea,
.input-wrapper input {
    width: 100%;
    padding: 16px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    height: 56px;
    box-sizing: border-box;
}

.form-group textarea {
    height: auto;
    min-height: 120px;
}

/* Focus & Active States */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.1);
}

/* Floating Animation Logic */
/* Only apply to .input-wrapper structure for now, or specifically tailored form-groups */
.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label,
.input-wrapper select:focus+label,
.input-wrapper select:valid+label,
.input-wrapper textarea:focus+label,
.input-wrapper textarea:not(:placeholder-shown)+label {
    top: 0;
    transform: translateY(-50%) scale(0.9);
    left: 10px;
    background: white;
    /* Mask background */
    padding: 0 4px;
    /* Space for mask */
    color: var(--primary);
    font-weight: 600;
    height: auto !important;
    z-index: 5;
    border-radius: 4px;
}

/* Clean up old .form-group generic floating rules that caused overlap */
/* .form-group input:focus+label ... removed to prevent affecting headers */

/* Specific fix for .dosen-row wrapper background */
.dosen-row .input-wrapper input:focus+label,
.dosen-row .input-wrapper input:not(:placeholder-shown)+label {
    background: white;
}

/* Hide native placeholder visually but keep it for logic */
.input-wrapper input::placeholder {
    color: transparent;
}

.input-wrapper input:focus::placeholder {
    color: var(--text-muted);
}

/* Selection Arrow Position Fix */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
}

/* Input nama menggunakan huruf kapital */
.form-group textarea#nama {
    text-transform: uppercase;
}

.form-group select {
    cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(248, 174, 25, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 174, 25, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-dark);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Success Modal ===== */
.modal-success {
    text-align: center;
}

.success-content {
    padding: 40px 28px;
}

.success-icon {
    font-size: 72px;
    color: var(--primary);
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.success-content h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.success-content>p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.success-info {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.info-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: right;
    max-width: 60%;
}

.success-content .btn {
    margin-bottom: 10px;
}

.success-content .btn:last-child {
    margin-bottom: 0;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary), var(--primary-dark), var(--primary), transparent) 1;
    padding: 30px 0;
    text-align: center;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
    overflow: hidden;
}

/* Background image Brown.png for footer */
.footer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    /* Disesuaikan dengan besar tulisan */
    height: 100px;
    background-image: url('../images/Brown.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: footerreveal 8s ease-in-out infinite;
}

@keyframes footerreveal {

    0%,
    100% {
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.footer::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-light), var(--primary), var(--primary-light), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 2;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 10;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.footer-icon {
    font-size: 1.5rem;
    color: var(--primary);
    animation: float 2.5s ease-in-out infinite;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}

.footer-divider {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--primary-light), var(--primary), transparent);
    border-radius: 2px;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

.footer-copyright {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.footer-copyright strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 768px) {
    .header .container {
        height: auto;
        padding: 15px 16px;
    }

    .logo {
        gap: 12px;
    }

    .logo-img {
        width: 220px;
        height: 220px;
    }

    .logo-text h1 {
        font-size: 2.2rem;
    }

    .logo-text span {
        font-size: 1.1rem;
    }

    .main {
        padding: 20px 0;
    }

    .hero-simple {
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .form-card {
        padding: 24px 20px;
        border-radius: var(--radius-lg);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .header .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }

    .logo {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .logo-img {
        width: auto;
        /* Restore natural aspect ratio */
        height: 75px;
        /* Reasonable height for mobile */
        max-width: 100%;
        margin-bottom: 5px;
    }

    .logo-text h1 {
        font-size: 1.5rem;
        /* Slightly larger for readability */
        line-height: 1.3;
        padding: 0 10px;
        /* Prevent edge touching */
    }

    .logo-text span {
        font-size: 0.95rem;
        margin: 8px auto 0;
        letter-spacing: 1px;
    }

    .main {
        padding: 20px 0;
    }

    .hero-simple {
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }
}

/* Continued Mobile Styles */
@media (max-width: 480px) {
    .form-card {
        padding: 20px 16px;
        margin-bottom: 24px;
    }

    .letter-form {
        gap: 18px;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .btn-lg {
        padding: 14px 24px;
    }

    /* Modal Mobile */
    .modal {
        padding: 12px;
    }

    .modal-container {
        border-radius: var(--radius-lg);
        max-width: 100%;
    }

    .success-content {
        padding: 28px 20px;
    }

    .success-icon {
        font-size: 56px;
        margin-bottom: 16px;
    }

    .success-content h3 {
        font-size: 1.2rem;
    }

    .success-content>p {
        font-size: 0.9rem;
    }

    .success-info {
        padding: 12px;
        margin-bottom: 20px;
    }

    .info-item {
        padding: 6px 0;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.85rem;
        max-width: 55%;
    }

    .footer {
        padding: 20px 0;
    }

    .footer-content {
        gap: 12px;
    }

    .footer-brand {
        flex-direction: column;
        gap: 8px;
    }

    .footer-icon {
        font-size: 1.2rem;
    }

    .footer-title {
        font-size: 0.9rem;
        text-align: center;
    }

    .footer-divider {
        width: 80px;
    }

    .footer-copyright {
        font-size: 0.75rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .logo-img {
        display: block;
        /* Ensure visible */
        width: auto;
        height: 50px;
        /* Smaller but visible */
        margin-bottom: 5px;
    }

    .logo-text h1 {
        font-size: 1.4rem;
    }

    .logo-text span {
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 1.1rem;
    }

    .form-card {
        padding: 16px 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* ===== Loading Overlay ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.loading-overlay.active {
    display: flex;
}

.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(184, 134, 11, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    object-fit: contain;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-text {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.loading-subtext {
    font-family: var(--font-body);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.95);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* ===== Form Validation Styling ===== */
.form-group input.valid,
.form-group select.valid {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-group input.invalid,
.form-group select.invalid {
    border-color: var(--error);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* ===== Dynamic Dosen Input ===== */
/* ===== Dynamic Dosen Input ===== */
.dosen-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    /* Align top */
    margin-bottom: 15px;
    position: relative;
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.dosen-row:last-child {
    margin-bottom: 0;
}

.dosen-row .input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-bottom: 0;
    /* Align with button */
}

.dosen-row input {
    width: 100%;
}

.dosen-row .input-wrapper label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.dosen-row .btn-remove {
    background: white;
    color: var(--error);
    border: 1px solid var(--error);
    width: 48px;
    height: 56px;
    /* Match Input Height */
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.dosen-row .btn-remove:hover {
    background: var(--error);
    color: white;
}

/* Mobile responsive for dynamic inputs */
@media (max-width: 600px) {
    .dosen-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }

    .dosen-row .btn-remove {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--bg-card);
        /* Ensure visibility on tertiary bg */
    }

    .dosen-row .input-wrapper {
        width: 100%;
    }
}

/* Animation Keyframes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* Apply animation */
.dosen-row {
    animation: slideInUp 0.4s ease-out forwards;
}

.dosen-row.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Force Uppercase for Name Input */
.dosen-nama {
    text-transform: uppercase;
}

/* ===== Skeleton Loading / Shimmer Effect ===== */
.skeleton-container {
    width: 210mm;
    /* Match A4 preview width */
    height: 297mm;
    background: white;
    padding: 25mm;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    overflow: hidden;
    /* Scale down for preview container like the real letter */
    transform-origin: top left;
}

.skeleton-shimmer {
    background: #f6f7f8;
    background-image: linear-gradient(to right,
            #f6f7f8 0%,
            #edeef1 20%,
            #f6f7f8 40%,
            #f6f7f8 100%);
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: shimmer;
    animation-timing-function: linear;
    border-radius: 4px;
}

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

/* Skeleton Structure mimicking the letter */
.sk-header {
    width: 100%;
    height: 100px;
    margin-bottom: 30px;
}

.sk-title {
    width: 60%;
    height: 24px;
    margin: 0 auto;
}

.sk-subtitle {
    width: 40%;
    height: 18px;
    margin: 10px auto 40px;
}

.sk-body-text {
    width: 100%;
    height: 16px;
    margin-bottom: 8px;
}

.sk-body-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
}

.sk-table {
    width: 90%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sk-row {
    display: flex;
    gap: 15px;
}

.sk-cell-label {
    width: 120px;
    height: 16px;
}

.sk-cell-val {
    flex: 1;
    height: 16px;
}

.sk-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-bottom: 50px;
}

.sk-signature-box {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.sk-sig-date {
    width: 120px;
    height: 16px;
}

.sk-sig-role {
    width: 150px;
    height: 16px;
}

.sk-sig-img {
    width: 100px;
    height: 80px;
    margin: 10px 0;
}

.sk-sig-name {
    width: 180px;
    height: 18px;
}