/* Reset and base styles */
html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Login page container */
.login-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    box-sizing: border-box;
}

/* Login box styles */
.login-box {
    width: 400px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-height: 120px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.login-logo h1 {
    font-size: 24px;
    margin: 10px 0;
    color: #2c3e50;
}

/* Card styles */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border: none;
    overflow: hidden;
}

.login-card-body {
    padding: 30px;
}

.login-box-msg {
    margin-bottom: 25px;
    color: #6c757d;
    text-align: center;
}

/* Form controls */
.form-control {
    height: 45px;
    font-size: 15px;
    border-radius: 6px;
}

.input-group-text {
    width: 45px;
    justify-content: center;
    background-color: #f8f9fa;
    border-left: none;
}

.form-control:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

/* Admin form styles */
.change-form #container,
.add-form #container,
#content-main {
    min-height: 100vh;
    height: auto;
    overflow-y: visible;
}

.change-form #content,
.add-form #content {
    padding: 20px;
    margin: 20px;
    overflow: visible;
}

.change-form .form-row,
.add-form .form-row {
    margin-bottom: 1.5rem;
    overflow: visible;
}

.change-form .datetime,
.add-form .datetime {
    margin-bottom: 1rem;
}

/* Event form specific styles */
.model-event.change-form #content,
.model-event.add-form #content {
    overflow: visible !important;
    position: relative;
}

.field-date_time,
.field-end_time {
    margin-bottom: 2rem;
}

/* Fix for datetime widgets */
.datetime {
    overflow: visible !important;
}

/* Ensure content area is scrollable */
#content {
    overflow-y: auto !important;
    max-height: none !important;
}

/* Remove any fixed positioning that might interfere with scrolling */
#container {
    position: relative !important;
}

/* Admin Bulk Upload Interface Styles */
.model-gallery.bulk-upload #content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 2rem auto;
}

.model-gallery.bulk-upload #content .object-tools {
    display: none;
}

.model-gallery.bulk-upload #content .breadcrumbs {
    margin: -2rem -2rem 2rem;
    padding: 1rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

.model-gallery.bulk-upload #content .breadcrumbs a {
    color: #4361ee;
    text-decoration: none;
    transition: color 0.2s ease;
}

.model-gallery.bulk-upload #content .breadcrumbs a:hover {
    color: #3651d4;
    text-decoration: underline;
}

.model-gallery.bulk-upload .module h2 {
    color: #1a365d;
    font-size: 2rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.025em;
    text-transform: none;
    background: none;
}

.model-gallery.bulk-upload form {
    max-width: 500;
    margin: 0 auto;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
}

.model-gallery.bulk-upload form .form-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.model-gallery.bulk-upload form .form-row > div {
    flex: 1;
}

.model-gallery.bulk-upload form label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.75rem;
}

/* Event Status Colors */
.event-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.event-status.upcoming {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.event-status.ongoing {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.event-status.archived {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.model-gallery.bulk-upload .module h2 {
    color: #1a365d;
    font-size: 2rem;
    margin: 0 0 2.5rem;
    padding: 1rem 0;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.025em;
    text-transform: none;
    background: none;
}

.model-gallery.bulk-upload select {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: white;
    color: #1a365d;
    font-size: 0.95rem;
    margin: 0.5rem auto 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    display: block;
}

.model-gallery.bulk-upload select:hover {
    border-color: #4361ee;
    background-color: #f0f7ff;
}

.model-gallery.bulk-upload select:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
}

.model-gallery.bulk-upload select option[data-status="upcoming"] {
    color: #2563eb;
    font-weight: 500;
}

.model-gallery.bulk-upload select option[data-status="ongoing"] {
    color: #059669;
    font-weight: 500;
}

.model-gallery.bulk-upload select option[data-status="archived"] {
    color: #64748b;
}

.model-gallery.bulk-upload input[type="file"] {
    display: block;
    width: 100%;
    max-width: 400px;
    padding: 3rem 2rem;
    background-color: white;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    margin: 1rem auto 1.5rem;
    min-height: 180px;
}

.model-gallery.bulk-upload input[type="file"]::before {
    content: 'Drag and drop images here or click to browse';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #64748b;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
}

.model-gallery.bulk-upload input[type="file"]:hover {
    border-color: #4361ee;
    background-color: #f0f7ff;
}

.model-gallery.bulk-upload .upload-progress {
    margin-top: 1rem;
    background-color: #f0f2f5;
    border-radius: 9999px;
    overflow: hidden;
}

.model-gallery.bulk-upload .progress-bar {
    height: 6px;
    background-color: #4361ee;
    transition: width 0.3s ease;
}

.model-gallery.bulk-upload .upload-status {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    text-align: center;
}

.model-gallery.bulk-upload .upload-status.success {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.model-gallery.bulk-upload .upload-status.error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.model-gallery.bulk-upload input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.model-gallery.bulk-upload .submit-row {
    margin-top: 2rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid #e2e8f0;
    background: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.model-gallery.bulk-upload .submit-row input[type="submit"] {
    background-color: #4361ee;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.model-gallery.bulk-upload .submit-row input[type="submit"]:hover {
    background-color: #3651d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.model-gallery.bulk-upload .submit-row .closelink {
    background-color: #f3f4f6;
    color: #4b5563;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.model-gallery.bulk-upload .submit-row .closelink:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

/* Upload status messages */
.upload-status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.upload-status.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.upload-status.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.upload-status.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.bulk-upload-form input[type="file"]:hover {
    border-color: #4361ee;
    background-color: #f0f7ff;
}

.bulk-upload-form .submit-row {
    margin-top: 2rem;
}

.model-gallery.bulk-upload .submit-row {
    margin-top: 2rem;
    padding: 1.5rem 0 0;
    border-top: 1px solid #e2e8f0;
    background: none;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.model-gallery.bulk-upload .submit-row input[type="submit"] {
    background-color: #4361ee;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.model-gallery.bulk-upload .submit-row input[type="submit"]:disabled {
    background-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.7;
}

.model-gallery.bulk-upload .submit-row input[type="submit"]:hover {
    background-color: #3651d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.model-gallery.bulk-upload .submit-row a.closelink {
    display: inline-block;
    color: #64748b;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    background-color: white;
    font-weight: 500;
}

.model-gallery.bulk-upload .submit-row a.closelink:hover {
    background-color: #f1f5f9;
    color: #475569;
}

.bulk-upload-form .button:hover {
    background-color: #3651d4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.bulk-upload-form .cancel-link {
    display: inline-block;
    margin-left: 1rem;
    color: #64748b;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.bulk-upload-form .cancel-link:hover {
    background-color: #f1f5f9;
    color: #475569;
}

/* Button styles */
.btn {
    padding: 12px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Alert styles */
.alert {
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Media queries for responsiveness */
@media (max-width: 576px) {
    .login-box {
        width: 100%;
        padding: 0 15px;
    }
    
    .login-logo img {
        max-height: 100px;
    }
    
    .login-card-body {
        padding: 20px;
    }
}

/* Existing admin styles */
.user-details {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    margin: 10px 0;
}

.user-details p {
    margin: 8px 0;
    line-height: 1.4;
}

.user-details strong {
    color: #666;
    display: inline-block;
    width: 120px;
}

#header {
    background: #2c3e50;
    color: white;
}

#header a:link, #header a:visited {
    color: white;
}

#branding h1 {
    color: white;
}

.module h2, .module caption {
    background: #34495e;
}

.viewsite-link {
    float: right;
    padding: 10px 15px;
    margin: 5px 0;
    background: #27ae60;
    color: white !important;
    border-radius: 4px;
    text-decoration: none;
}

.viewsite-link:hover {
    background: #219a52;
}

.status-superuser { color: #e74c3c; }
.status-staff { color: #3498db; }
.status-regular { color: #27ae60; }

.button {
    padding: 5px 10px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    background: #3498db;
    color: white;
    text-decoration: none;
    margin: 0 2px;
}

.button:hover {
    background: #2980b9;
}