/* 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: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.logo img {
    width: 60px;
    height: 45px;
    border: 2px solid white;
    border-radius: 4px;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.logo p {
    opacity: 0.9;
    font-size: 0.9rem;
}

nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
	justify-content: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

.admin-btn {
    background-color: #48bb78;
    margin-left: auto;
}

.admin-btn:hover {
    background-color: #38a169;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 2rem;
    border-radius: 0 0 10px 10px;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Forms Container */
.forms {
    margin-bottom: 3rem;
}

.form-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.form-section h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

/* Form Table Styles */
.form-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
}

table, th, td {
    border: 1px solid #e2e8f0;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

tr.header {
    background-color: #e6fffa !important;
}

tr.header td {
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 15px;
    color: #234e52;
}

tr.header .center {
    text-align: center;
}

.center {
    text-align: center;
}

.small {
    font-size: 0.85rem;
    color: #718096;
}

/* Form Input Styles */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="month"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

input[readonly] {
    background-color: #edf2f7;
    cursor: not-allowed;
}

.signature {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="20"><path d="M0,10 Q25,5 50,10 T100,10" fill="none" stroke="%23cbd5e0" stroke-width="1"/></svg>') no-repeat;
    background-size: 100% 100%;
    font-family: 'Brush Script MT', cursive;
    font-size: 18px;
}

/* Checkbox and Radio Styles */
input[type="checkbox"],
input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.checkbox {
    margin-left: 15px;
}

.purpose {
    margin-left: 10px;
}

/* Button Styles */
button,
.btn,
input[type="submit"] {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover,
.btn:hover,
input[type="submit"]:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

button:active,
.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
}

.center button,
.center .btn {
    margin: 5px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.alert.success {
    background-color: #c6f6d5;
    border: 1px solid #9ae6b4;
    color: #22543d;
}

.alert.error {
    background-color: #fed7d7;
    border: 1px solid #fc8181;
    color: #742a2a;
}

.alert i {
    font-size: 18px;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #718096;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.login-box h1 {
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-box > p {
    color: #718096;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.login-footer a {
    color: #4299e1;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Admin Panel Styles */
.admin-page {
    background-color: #f7fafc;
    min-height: 100vh;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 20px 0;
}

.sidebar h2 {
    padding: 0 20px 20px;
    border-bottom: 1px solid #4a5568;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
}

.sidebar > p {
    padding: 20px;
    color: #cbd5e0;
    font-size: 0.9rem;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.sidebar nav a {
    color: #cbd5e0;
    text-decoration: none;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

.sidebar nav a.active {
    background-color: rgba(66, 153, 225, 0.1);
    color: white;
    border-left-color: #4299e1;
}

.main-content {
    flex: 1;
    padding: 20px;
}

.main-content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.main-content h1 {
    color: #2d3748;
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    font-weight: 500;
}

.user-info i {
    font-size: 24px;
    color: #4299e1;
}

/* Stats Cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #4299e1;
    margin-bottom: 10px;
}

.stat-card p {
    color: #718096;
    font-size: 1rem;
}

/* Data Table in Admin */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.data-table thead {
    background-color: #f7fafc;
}

.data-table th {
    padding: 15px;
    font-weight: 600;
    color: #4a5568;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tbody tr:hover {
    background-color: #f7fafc;
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Form Type Selection */
tr.header label {
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
}

tr.header input[type="radio"] {
    margin-right: 5px;
}

/* Children Section */
td textarea[name="children_ages"] {
    min-height: 60px;
    resize: vertical;
}

/* Purpose Checkbox Grid */
tr td label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    nav {
        justify-content: center;
    }
    
    .admin-btn {
        margin-left: 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-section h2 {
        font-size: 1.5rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        font-size: 14px;
    }
    
    th, td {
        padding: 8px 10px;
        min-width: 100px;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .sidebar nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .sidebar nav a {
        white-space: nowrap;
        padding: 10px 15px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    button, .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .alert {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .header,
    nav,
    .hero,
    .admin-btn,
    footer,
    button,
    .btn,
    .sidebar,
    .main-content header,
    .stats {
        display: none !important;
    }
    
    .form-section {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    table {
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
        font-size: 12px;
    }
    
    input, select, textarea {
        border: 1px solid #ccc !important;
        background: transparent !important;
        -webkit-print-color-adjust: exact;
    }
    
    input[readonly] {
        border: none !important;
        background: none !important;
    }
}

/* Admin Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-action:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.btn-view { background: #17a2b8; }
.btn-edit { background: #ffc107; }
.btn-pdf { background: #dc3545; }
.btn-delete { background: #6c757d; }

.btn-pdf {
    background: #dc3545;
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Form Edit/View Styles */
.form-edit-container,
.form-view-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #4299e1;
}

.detail-item strong {
    display: block;
    color: #4a5568;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.detail-item span {
    font-size: 1.1rem;
    color: #2d3748;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.notes-box {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h2 {
    margin: 0;
    color: #2d3748;
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-data i {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.no-data p {
    color: #718096;
    font-size: 1.1rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .form-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-action {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}