/* ===== Dashboard & Wrap Styling ===== */
.wrap {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f9fafb;
    padding: 40px 20px;           
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    max-width: 85%;               
    margin: 40px auto;            
    box-sizing: border-box;
}

/* ===== Headings ===== */
.wrap h1, .wrap h2 {
    color: #1e3a8a;
    margin-bottom: 30px;
    text-align: center;
}

/* ===== Buttons ===== */
.button-primary, .button-secondary {
    border-radius: 8px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 10px 10px 20px 0;
}

.button-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
}
.button-primary:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.button-secondary {
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
    color: #fff;
}
.button-secondary:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

/* ===== Form Table Styling ===== */
form {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-table {
    width: 100%;
    max-width: 100%;              
    border-collapse: separate;
    border-spacing: 0 15px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.form-table th {
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    color: #374151;
    padding-right: 20px;
    vertical-align: middle;
    width: 35%;
}

.form-table td input[type="text"],
.form-table td input[type="file"],
.form-table td textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
    font-size: 14px;
}
.form-table td input:focus,
.form-table td textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 8px rgba(79,70,229,0.3);
    transform: scale(1.02);
}

/* ===== Notices ===== */
.notice-success {
    background-color: #d1fae5 !important;
    border-left: 5px solid #10b981 !important;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(16,185,129,0.2);
    transition: all 0.3s ease;
}

/* ===== HR Styling ===== */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, #4f46e5, #06b6d4);
    margin: 40px 0;
}

/* ===== Student List Table ===== */
.wp-list-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.wp-list-table th, .wp-list-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    text-align: left;
}

.wp-list-table th {
    background: #f3f4f6;
    font-weight: 600;
    color: #1f2937;
}

.wp-list-table tr:hover {
    background: #f9fafb;
}

.wp-list-table img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== Search & Print Buttons Styling ===== */
form input[type="text"] {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-right: 5px;
    width: 250px;
}

form input[type="submit"], form button {
    vertical-align: middle;
}
/* ===== Modal Overlay ===== */
#modalOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

/* ===== Modal Styling (Lowered Center + Scrollable) ===== */
#editModal {
    display: none;
    position: fixed;
    top: 30vh; /* 30% from top */
    left: 50%;
    transform: translateX(-50%); /* horizontal center only */
    width: 400px;
    max-width: 90%;
    max-height: 40vh; /* leaves ~30% below */
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.35);
    z-index: 9999;
    animation: fadeInScale 0.4s ease forwards;
    overflow-y: auto; /* scroll if content overflows */
}

#editModal h2 {
    text-align: center;
    color: #1e3a8a;
    margin-bottom: 20px;
}

#editModal input[type="text"],
#editModal input[type="file"],
#editModal textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    margin-bottom: 12px;
    font-size: 14px;
}

#editModal input[type="submit"], #editModal button {
    margin-top: 10px;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
}

/* ===== Modal Animation ===== */
@keyframes fadeInScale {
    from { opacity: 0; transform: translateX(-50%) scale(0.8); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* ===== Responsive ===== */
@media screen and (max-width: 900px) {
    #editModal {
        width: 95%;
        padding: 20px;
        top: 25vh; /* slightly higher on smaller screens */
        max-height: 50vh;
    }
}
/* WhatsApp Link */
.sid-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #25D366;
    font-weight: 600;
    text-decoration: none;
}

.sid-whatsapp:hover {
    color: #1ebe5d;
    text-decoration: underline;
}

/* WhatsApp Icon (Pure CSS + SVG) */
.sid-wa-icon {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%2325D366' d='M19.11 17.37c-.27-.14-1.61-.79-1.86-.88-.25-.09-.43-.14-.61.14-.18.27-.7.88-.86 1.06-.16.18-.32.2-.59.07-.27-.14-1.15-.42-2.19-1.34-.81-.72-1.35-1.61-1.51-1.88-.16-.27-.02-.41.12-.55.12-.12.27-.32.41-.48.14-.16.18-.27.27-.45.09-.18.05-.34-.02-.48-.07-.14-.61-1.48-.84-2.03-.22-.53-.45-.46-.61-.47-.16-.01-.34-.01-.52-.01s-.48.07-.73.34c-.25.27-.96.94-.96 2.3s.98 2.67 1.12 2.86c.14.18 1.93 2.95 4.68 4.13.65.28 1.15.45 1.54.57.65.21 1.25.18 1.72.11.52-.08 1.61-.66 1.84-1.3.23-.64.23-1.19.16-1.3-.07-.11-.25-.18-.52-.32z'/%3E%3Cpath fill='%2325D366' d='M16.02 3C9.39 3 4 8.39 4 15.02c0 2.65.87 5.1 2.34 7.08L4 29l7.11-2.29c1.92 1.05 4.12 1.66 6.91 1.66 6.63 0 12.02-5.39 12.02-12.02C28.04 8.39 22.65 3 16.02 3zm0 21.85c-2.39 0-4.61-.72-6.46-1.95l-.46-.29-4.22 1.36 1.38-4.11-.3-.48c-1.28-1.95-2.01-4.28-2.01-6.76 0-6.63 5.39-12.02 12.02-12.02 6.63 0 12.02 5.39 12.02 12.02 0 6.63-5.39 12.02-12.02 12.02z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}   
/* Make SELECT same as INPUT fields */
#editModal input[type="text"],
#editModal input[type="date"],
#editModal textarea,
#editModal select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
}

/* Focus effect – same look */
#editModal input:focus,
#editModal textarea:focus,
#editModal select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.25);
}

/* Fix select arrow spacing */
#editModal select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #555 50%),
        linear-gradient(135deg, #555 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 18px,
        calc(100% - 15px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
