/* ===================== GLOBAL STYLES ===================== */
* {
    box-sizing: border-box; /* include padding/border in element's total width */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7f8;
    color: #333;
    display: flex;              /* vertical stacking of content */
    flex-direction: column;
    min-height: 100vh;          /* full viewport height */
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    flex: 1;                    /* take available space above footer */
    display: flex;               /* center content */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===================== LOGO ===================== */
.logo {
    display: block;
    margin: 0 auto 20px auto;
    height: 100px;
}

/* ===================== FORM CONTAINER ===================== */
.form-container {
    background: #fff;
    padding: 30px 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1200px;
}

/* ===================== HEADINGS ===================== */
h2 {
    text-align: center;
    margin-bottom: 25px;
    font-family: 'Lobster';
    font-weight: 400;
    font-size: 24pt;
    line-height: 1.25;
}

h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* ===================== FORM ELEMENTS ===================== */
.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
}

/* ===================== CHECKBOXES ===================== */
.checkbox-group {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

/* ===================== BUTTONS ===================== */
button {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #2980b9;
}

/* ===================== SUB-CONTAINERS ===================== */
.sub-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ===================== TERMS ===================== */
.term-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.term-item input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
}

/* ===================== SUCCESS & ERROR MESSAGES ===================== */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 1.1rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 1.1rem;
}

/* ===================== ADMIN DASH ===================== */
/* Admin header: Welcome left, buttons right */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    flex-wrap: wrap; /* wrap on small screens */
}

.welcome-text {
    font-weight: bold;
}

/* Admin action buttons styling */
.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-btn,
.admin-actions button.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: #3498db;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.admin-btn:hover,
.admin-actions button.admin-btn:hover {
    background: #2980b9;
}

button.delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background: #db3434;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

button.delete-button:hover {
    background: white;
    color:#db3434;
}

/* ===================== MEMBER DETAILS ===================== */
/* Member image container box */
.member-image-box {
    display: inline-block;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    margin-right: 10px;
    margin-bottom: 10px;
    text-align: center;
    vertical-align: top;
    width: 120px; /* adjust width to fit image + buttons */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Image inside box */
.member-image-box img {
    display: block;
    margin: 0 auto 5px auto;
    max-width: 100%;
    border-radius: 5px;
}

/* Action buttons inside image box */
.member-image-box .action-buttons form {
    display: inline-block;
    margin-right: 5px;
}

/* Reuse dashboard button style */
.member-image-box .action-buttons button {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 18px;
    text-align: center;
    line-height: 36px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.member-image-box .action-buttons button:hover {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

/* ===================== ACTION BUTTONS ===================== */
.action-buttons {
    display: flex;             /* keep buttons in a row */
    justify-content: space-evenly;
    align-items: center;
}

.action-buttons form {
    margin: 0;                 /* remove extra spacing from forms */
}

.action-buttons button {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 18px;
    text-align: center;
    line-height: 36px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: #fff;
    color: #3498db;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-buttons button:hover {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

.action-buttons button:disabled {
    background: #eee;
    color: #999;
    cursor: not-allowed;
    border-color: #ccc;
}

.action-buttons button.delete-image-btn {
    color: #db3434;
    background: white;
}

.action-buttons button.delete-image-btn:hover {
    background: #db3434;
    color: white;
}

/* ===================== FOOTER ===================== */
footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f2f2f2;
    font-family: Arial, sans-serif;
    flex-shrink: 0;
    text-align: center;
}

footer img {
    height: 40px;
    width: auto;
}

/* ===================== TABLE STYLES ===================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #3498db;
    color: white;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* ===================== LINKS ===================== */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===================== MEDIA QUERIES ===================== */
@media (max-width: 600px) {
    .form-container {
        padding: 20px;
    }

    /* Action buttons stacked vertically on small screens */
    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
}
