body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #00573d, #00835c);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.form-container {
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

header {
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 0;
    opacity: 0.9;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
}

.card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
    color: #c8f5e9;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis */
}

.card p {
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.8;
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis */
}

footer {
    margin-top: 4rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Form Styles */
.konfirmasi-form {
    color: #333;
}

.konfirmasi-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.konfirmasi-form .form-group {
    text-align: left;
}

.konfirmasi-form .full-width {
    grid-column: 1 / -1;
}

.konfirmasi-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #eee;
}

.konfirmasi-form input,
.konfirmasi-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
}

.input-file {
    padding: 0.5rem;
}

.input-file::file-selector-button {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.input-file::file-selector-button:hover {
    opacity: 0.85;
}

.signature-pad-container {
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: white;
    height: 200px;
    max-width: 400px; /* Limit width */
    margin-left: auto; /* Center it */
    margin-right: auto; /* Center it */
}

#signature-canvas {
    width: 100%;
    height: 100%;
    display: block; /* Ensure it behaves as a block element */
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-top: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    opacity: 0.85;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: #aaa;
    color: white;
}


/* Search Section Styles */
.search-section {
    background-color: rgba(0,0,0,0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.search-section label {
    display: block;
    text-align: left;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-box {
    display: flex;
    gap: 1rem;
}

#search-input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}

#search-results {
    margin-top: 1rem;
    text-align: left;
}

.search-result-item {
    background-color: #f0f0f0;
    color: #333;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.form-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 2rem 0;
}

.form-section-title {
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Modal Styles (for manasik_cinta.html) */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #f5f7fa, #e0e5ec);
    color: #333;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.9);}
    to {opacity: 1; transform: scale(1);}
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.cetak-list-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #eee;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    min-height: 3rem; /* Ensure minimum height */
    gap: 1rem; /* Added gap for spacing */
}

.cetak-list-item span {
    font-weight: 500;
    flex: 1 1 auto; /* Allow text to grow and shrink, but take up space */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Prevent wrapping */
}

.cetak-list-item .btn-sm {
    flex: 0 0 auto; /* Don't grow, don't shrink, take auto width */
    margin-left: auto; /* Push to the right */
}


/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .menu-grid {
        margin-top: 2.5rem;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
    }