/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Container styles */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    min-height: 100vh;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Main content styles */
.main-content {
    margin-bottom: 40px;
}

/* Module Button Styles */
.module-button {
    display: block;
    padding: 25px;
    margin: 15px 0;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white;
    position: relative;
    overflow: hidden;
}

/* Patient Registration Button */
.module-button.patient-reg {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Study Request Button */
.module-button.study-request {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Report System Button */
.module-button.report-system {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}
/* Report System Button */
.module-button.single-report-system {
     background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* Settings Button */
.module-button.settings {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
/* Change Password Button */
.module-button.change-password {
     background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Module button content */
.module-icon {
    font-size: 28px;
    margin-bottom: 15px;
    display: block;
    text-align: center;
}

.module-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    text-align: center;
}

.module-description {
    font-size: 14px;
    color: white;
    opacity: 0.95;
    text-align: center;
    line-height: 1.4;
}

/* Hover effects for all buttons */
.module-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

/* Ensure text elements maintain white color */
.module-button .module-title,
.module-button .module-description,
.module-button .module-icon {
    color: white !important;
}

/* Button grid layout */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
    padding: 0 20px;
}

/* Footer styles */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .button-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .module-button {
        margin: 10px 0;
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .container {
        padding: 15px;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .module-title {
        font-size: 18px;
    }
    
    .module-description {
        font-size: 13px;
    }
}

/* Module Height Adjustments */

/* Registration page height adjustments */
.registration-container .content-wrapper {
    min-height: 800px;
}

.registration-container .form-section,
.registration-container .data-section {
    min-height: 750px;
}

.registration-container .table-container {
    max-height: 600px;
}

/* Study page height adjustments */
.study-container .main-layout {
    min-height: 900px;
}

.study-container .requests-content,
.study-container .study-content {
    max-height: 850px;
    min-height: 200px;
    height: auto;
}

.study-container .study-form {
    min-height: 800px;
}

/* Request page height adjustments */
.request-container .main-layout {
    min-height: 800px;
}

.request-container .panel-content {
    height: 600px;
}

/* General module container styling */
.registration-container,
.study-container,
.request-container {
    min-height: 100vh;
    box-sizing: border-box;
}

/* Ensure forms don't get cut off */
.form-section .request-form,
.study-form {
    min-height: fit-content;
}

/* Additional utility styles */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Link styles */
a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Form styles for consistency across modules */
.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* 2x2 Button Grid Layout for index.php */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* Always 2 columns */
    grid-template-rows: 1fr 1fr;     /* Always 2 rows */
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 400px; /* Ensures consistent height */
}

.module-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    min-height: 180px; /* Consistent button height */
    position: relative;
    overflow: hidden;
}

.module-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.module-button:active {
    transform: translateY(-2px);
}

.module-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.module-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.2;
}

.module-description {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
    text-align: center;
}

/* Individual button color variations (optional) */
.patient-reg {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.patient-reg:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

.study-request {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.study-request:hover {
    background: linear-gradient(135deg, #38f9d7 0%, #43e97b 100%);
}

.report-system {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.report-system:hover {
    background: linear-gradient(135deg, #fee140 0%, #fa709a 100%);
}

.settings {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.settings:hover {
    background: linear-gradient(135deg, #fed6e3 0%, #a8edea 100%);
    color: #333;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .button-grid {
        grid-template-columns: 1fr;  /* Single column on mobile */
        grid-template-rows: repeat(4, 1fr);  /* 4 rows on mobile */
        max-width: 400px;
        gap: 15px;
    }
    
    .module-button {
        min-height: 120px;
        padding: 20px 15px;
    }
    
    .module-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    .module-title {
        font-size: 1.2rem;
    }
    
    .module-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .button-grid {
        padding: 10px;
        gap: 10px;
    }
    
    .module-button {
        min-height: 100px;
        padding: 15px 10px;
    }
}