/* Admin login & portal */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a4d3a 0%, #2d6a4f 100%);
    padding: 20px;
}
.login-wrapper {
    width: 100%;
    max-width: 420px;
}
.login-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    padding: 40px;
}
.login-header {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo {
    height: 70px;
    margin-bottom: 16px;
}
.login-header h1 {
    color: #1a4d3a;
    font-size: 1.75rem;
    margin-bottom: 6px;
}
.login-header p {
    color: #4a5568;
    font-size: 0.95rem;
}
.login-form .form-group {
    margin-bottom: 20px;
}
.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #1a4d3a;
    font-weight: 600;
    font-size: 0.9rem;
}
.login-form label i {
    margin-right: 6px;
    opacity: 0.8;
}
.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.login-form input:focus {
    outline: none;
    border-color: #1a4d3a;
    box-shadow: 0 0 0 4px rgba(26, 77, 58, 0.1);
}
.error-message {
    color: #c53030;
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.login-status {
    font-size: 0.88rem;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.5;
}
.login-status-ok {
    color: #1a4d3a;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
}
.login-status-error {
    color: #c53030;
    background: #fff5f5;
    border: 1px solid #feb2b2;
}
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a4d3a, #2d6a4f);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(26, 77, 58, 0.3);
}
.btn-login:hover {
    background: linear-gradient(135deg, #2d6a4f, #1a4d3a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 58, 0.4);
}
.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
}
.login-footer a {
    color: #1a4d3a;
    text-decoration: none;
    font-weight: 600;
}
.login-footer a:hover {
    text-decoration: underline;
}

/* Admin portal */
.admin-portal-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.admin-portal-header {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    border-bottom: 3px solid #1a4d3a;
}
.admin-portal-header h1 {
    color: #1a4d3a;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.admin-portal-header .admin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.admin-portal-header .admin-actions a,
.admin-portal-header .admin-actions button {
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}
.admin-portal-header .btn-logout,
.admin-portal-header .btn-website,
.admin-portal-header .btn-settings {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.admin-portal-header .btn-settings {
    background: linear-gradient(135deg, #1a4d3a, #2d6a4f);
    color: #ffffff;
}
.admin-portal-header .btn-settings:hover {
    background: linear-gradient(135deg, #2d6a4f, #1a4d3a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 58, 0.3);
}
.admin-portal-header .btn-website {
    background: linear-gradient(135deg, #1a4d3a, #2d6a4f);
    color: #ffffff;
}
.admin-portal-header .btn-website:hover {
    background: linear-gradient(135deg, #2d6a4f, #1a4d3a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 58, 0.3);
}
.admin-portal-header .btn-logout {
    background: linear-gradient(135deg, #c53030, #e53e3e);
    color: #ffffff;
}
.admin-portal-header .btn-logout:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.3);
}
.admin-header-dropdown {
    position: relative;
    display: inline-block;
}
.admin-settings-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 12px;
    min-width: 220px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 12px 0;
    z-index: 100;
    border: 1px solid #e2e8f0;
}
.admin-settings-menu.open {
    display: block;
}
.admin-settings-menu li a {
    display: block;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.admin-settings-menu li a:hover {
    background: #f7fafc;
    color: #1a4d3a;
    padding-left: 24px;
}
.admin-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 30px auto 50px;
    padding: 0 20px 20px;
    width: 100%;
}
.admin-sidebar {
    position: sticky;
    top: 30px;
    align-self: start;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 30px 24px;
    min-height: calc(100vh - 120px);
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}
.sidebar-brand-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #1a4d3a, #2d6a4f);
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(26, 77, 58, 0.3);
}
.sidebar-brand-label {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a4d3a;
}
.sidebar-brand-note {
    margin: 2px 0 0;
    color: #718096;
    font-size: 0.9rem;
}
.admin-nav {
    display: grid;
    gap: 12px;
}
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    background: transparent;
    border: 2px solid transparent;
    color: #4a5568;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.admin-nav-item:hover {
    transform: translateX(4px);
    background: #f7fafc;
    color: #1a4d3a;
    border-color: #e2e8f0;
}
.admin-nav-item.active {
    background: linear-gradient(135deg, #1a4d3a, #2d6a4f);
    color: #ffffff;
    border-color: #1a4d3a;
    box-shadow: 0 6px 20px rgba(26, 77, 58, 0.3);
}
.admin-nav-item i {
    min-width: 20px;
    text-align: center;
    font-size: 1.1rem;
}
.admin-main {
    width: 100%;
}
.admin-portal-content {
    padding: 0;
    margin: 0;
}

.portal-section {
    display: block;
    padding: 36px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}
.portal-section.hidden {
    display: none;
}
.portal-section h2 {
    color: #1a4d3a;
    font-size: 1.6rem;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.admin-form .form-group {
    margin-bottom: 20px;
}
.admin-form label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 700;
    font-size: 0.95rem;
}
.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: #1a4d3a;
    box-shadow: 0 0 0 4px rgba(26, 77, 58, 0.1);
}
.admin-form textarea {
    min-height: 140px;
    resize: vertical;
}
.admin-form .hint {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #1a4d3a, #2d6a4f);
    color: #ffffff;
    padding: 14px 30px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 77, 58, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2d6a4f, #1a4d3a);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 77, 58, 0.35);
}
.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
    padding: 12px 24px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background: #cbd5e0;
}
.btn-danger {
    background: linear-gradient(135deg, #c53030, #e53e3e);
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.25);
}
.btn-danger:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.35);
}

.gallery-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.gallery-admin-card {
    background: #f7fafc;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e2e8f0;
}
.gallery-admin-card h3 {
    margin-bottom: 24px;
    color: #1a4d3a;
    font-size: 1.25rem;
    font-weight: 800;
}
.gallery-categories-list,
.gallery-images-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gallery-categories-list li,
.gallery-images-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 12px;
    gap: 12px;
    background: #ffffff;
    transition: all 0.3s ease;
}
.gallery-categories-list li:hover,
.gallery-images-list li:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}
.gallery-category-label {
    font-weight: 700;
    color: #1a4d3a;
}
.gallery-category-actions,
.gallery-image-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gallery-image-preview {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    background: #e2e8f0;
}
.gallery-images-list .gallery-image-meta {
    flex: 1;
    min-width: 0;
}
.gallery-images-list .gallery-image-meta h4 {
    margin: 0 0 6px;
    color: #1a4d3a;
    font-size: 1rem;
    font-weight: 700;
}
.gallery-images-list .gallery-image-meta p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
}

.announcements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.announcements-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    margin-bottom: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
}
.announcements-list li:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.announcements-list li:nth-child(even) {
    background: #f7fafc;
}
.announcement-info {
    flex: 1;
    min-width: 0;
}
.announcement-info h3 {
    color: #1a4d3a;
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 700;
}
.announcement-info .meta {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 10px;
}
.announcement-info .preview {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.announcement-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.announcement-thumb {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 14px;
    flex-shrink: 0;
    background: #e2e8f0;
}
.announcement-thumb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    width: 100px;
    flex-shrink: 0;
}
.announcement-thumb-item {
    position: relative;
    width: 48px;
    height: 37px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}
.announcement-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.announcement-thumb-count {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
}
.image-preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.image-preview-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
}
.image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    display: block;
}
.image-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    z-index: 2;
}
.image-preview-item .remove-btn:hover {
    background: rgba(200, 35, 51, 0.95);
    transform: scale(1.1);
}
.image-preview-item .image-count-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
}

/* Lightbox styles */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}
.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #1a4d3a;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.lightbox-nav-prev {
    left: -60px;
}
.lightbox-nav-next {
    right: -60px;
}
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    color: #1a4d3a;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}
.lightbox-counter {
    text-align: center;
    margin-top: 16px;
    color: white;
    font-size: 1rem;
}
.no-announcements {
    text-align: center;
    color: #718096;
    padding: 60px 20px;
    font-size: 1.1rem;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: #ffffff;
    border-radius: 24px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 36px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}
.modal-box h3 {
    margin-bottom: 24px;
    color: #1a4d3a;
    font-size: 1.4rem;
    font-weight: 800;
}
.modal-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-accounts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.admin-accounts-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
}
.admin-accounts-list li:last-child {
    border-bottom: none;
}
.admin-accounts-list li span {
    font-size: 1.05rem;
    color: #2d3748;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .admin-shell {
        grid-template-columns: 1fr;
        padding: 0 16px 20px;
        gap: 24px;
    }
    .admin-sidebar {
        position: relative;
        top: auto;
        min-height: auto;
        margin-bottom: 0;
    }
    .admin-nav-item {
        padding: 14px 18px;
    }
    .gallery-admin-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .admin-portal-header {
        padding: 16px 18px;
    }
    .admin-shell {
        gap: 20px;
    }
    .sidebar-brand {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-nav-item {
        gap: 12px;
        padding: 14px 16px;
    }
    .admin-portal-header .admin-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .admin-portal-header .admin-actions a,
    .admin-portal-header .admin-actions button {
        margin-left: 0;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .portal-section {
        padding: 24px;
    }
}
