/* Import Professional Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #475569 75%, #64748b 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-weight: 400;
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }
}

body.modal-open {
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 24px 0 0 0;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}

.wave-decoration {
    height: 12px;
    background: linear-gradient(90deg, transparent 0%, rgba(14, 165, 233, 0.3) 25%, rgba(2, 132, 199, 0.4) 50%, rgba(3, 105, 161, 0.3) 75%, transparent 100%);
    position: relative;
    overflow: hidden;
}

.wave-decoration::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: -100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(59, 130, 246, 0.2) 50%, transparent 100%);
    animation: wave 8s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateX(-50px); }
    50% { transform: translateX(50px); }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

header h1 {
    color: #f8fafc;
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

header h2 {
    color: #cbd5e1;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
}

.admin-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 140px;
}

.admin-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    min-height: calc(100vh - 200px);
}

@media (min-width: 640px) {
    .main-content {
        margin: 40px auto;
        padding: 0 20px;
    }
}

/* Filter/Search Section */
.filter-section {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1), 0 1px 4px rgba(15, 23, 42, 0.1);
}

@media (min-width: 640px) {
    .filter-section {
        padding: 24px 28px;
        margin-bottom: 40px;
    }
}

.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
}

@media (min-width: 640px) {
    .search-bar {
        gap: 10px;
        flex-wrap: nowrap;
    }
}

.toggle-filters-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

.toggle-filters-btn:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.toggle-filters-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 400;
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: #fefefe;
}

.search-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 14px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 50px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

.search-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.filter-controls {
    display: grid;
    gap: 16px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: center;
}

/* Mobile-first responsive design */
@media (min-width: 640px) {
    .filter-controls {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        align-items: stretch;
    }

    .filter-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .clear-btn {
        width: auto;
    }
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #475569;
    width: 100%;
}

.filter-select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.clear-btn {
    background: #64748b;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
}

.clear-btn:hover {
    background: #475569;
    transform: translateY(-1px);
}

/* New Multi-Select Filter Chips */
.filter-controls-new {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    padding: 0;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: white;
    color: #64748b;
    border-color: #e2e8f0;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-chip.active {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    font-weight: 700;
    border-width: 2px;
}

/* Category filter chip colors - darker, more prominent when active */
.filter-chip.category-job.active {
    background: linear-gradient(135deg, #0077b6 0%, #005a8d 100%);
    color: white;
    border-color: #0077b6;
}

.filter-chip.category-training.active {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: white;
    border-color: #d97706;
}

.filter-chip.category-college.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-color: #2563eb;
}

.filter-chip.category-career-fair.active {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: white;
    border-color: #e11d48;
}

.filter-chip.category-immigration.active {
    background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
    color: white;
    border-color: #9333ea;
}

.filter-chip.category-announcement.active {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border-color: #4f46e5;
}

.filter-chip.category-resource.active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-color: #059669;
}

/* Deadline and class type chips */
.filter-chip.deadline-chip.active,
.filter-chip.classtype-chip.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border-color: #0284c7;
}

/* Posted date chips */
.filter-chip[data-posted].active {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border-color: #7c3aed;
}

/* Posted by advisor chips */
.filter-chip.postedby-chip.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #f59e0b;
}

.filter-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 8px;
}

.expired-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.active-filters-count {
    background: #0ea5e9;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.active-filters-count span {
    background: white;
    color: #0ea5e9;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .filter-chip {
        font-size: 12px;
        padding: 6px 12px;
    }

    .filter-group-title {
        font-size: 13px;
    }

    .filter-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .expired-toggle-container {
        justify-content: center;
    }

    .clear-btn {
        width: 100%;
    }
}

.results-info {
    background: rgba(14, 165, 233, 0.08);
    border-left: 4px solid #0ea5e9;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 0 12px 12px 0;
    font-size: 14px;
    font-weight: 500;
    color: #0284c7;
    display: none;
    backdrop-filter: blur(5px);
}

/* View Controls */
.view-controls {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.view-btn {
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    min-width: 100px;
}

.view-btn:hover {
    background: rgba(14, 165, 233, 0.1);
    color: #0ea5e9;
    transform: translateY(-1px);
}

.view-btn.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.view-btn.active:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}

/* Expired Toggle */
.expired-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 16px;
    padding: 8px 16px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #0ea5e9;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Bulletin Container */
.bulletin-container {
    position: relative;
}

.bulletin-view {
    display: none !important;
}

.bulletin-view.bulletin-grid.active {
    display: grid !important;
}

.bulletin-view.bulletin-list.active {
    display: flex !important;
}

.bulletin-view.bulletin-calendar.active {
    display: block !important;
}

/* Bulletin Grid - Mobile First */
.bulletin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 640px) {
    .bulletin-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .bulletin-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 28px;
    }
}

.bulletin-card {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1), 0 1px 4px rgba(15, 23, 42, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.bulletin-card.hash-highlight {
    border-color: rgba(14, 165, 233, 0.6);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.18), 0 12px 36px rgba(15, 23, 42, 0.2);
}

/* Expired bulletin styling */
.bulletin-card.expired-bulletin {
    opacity: 0.75;
    filter: grayscale(30%);
    background: rgba(241, 245, 249, 0.98);
    border-color: rgba(220, 38, 38, 0.3);
    position: relative;
}

.bulletin-card.expired-bulletin:hover {
    opacity: 0.9;
    filter: grayscale(20%);
}

.expired-banner {
    position: absolute;
    top: 16px;
    right: -35px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 8px 45px;
    border-radius: 0 0 8px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transform: rotate(45deg);
    z-index: 10;
    text-align: center;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    border: 1px solid rgba(153, 27, 27, 0.3);
}

@media (min-width: 640px) {
    .bulletin-card {
        padding: 32px;
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.05);
    }
}

.bulletin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #0284c7, #0369a1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bulletin-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15), 0 8px 16px rgba(15, 23, 42, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
}

.bulletin-card:hover::before {
    opacity: 1;
}

.bulletin-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    position: relative;
}

.bulletin-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
    margin-top: 8px;
    line-height: 1.4;
    letter-spacing: -0.025em;
    width: 100%;
    padding-right: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 640px) {
    .bulletin-title {
        font-size: 1.35rem;
    }
}

.category-badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    align-self: flex-start;
    white-space: nowrap;
}

.category-job {
    background: linear-gradient(135deg, #bfdbfe 0%, #dbeafe 100%);
    color: #1e3a8a;
    border: 2px solid #93c5fd;
    text-shadow: none;
    font-weight: 700;
}
.category-training {
    background: linear-gradient(135deg, #fed7aa 0%, #ffedd5 100%);
    color: #7c2d12;
    border: 2px solid #fdba74;
    text-shadow: none;
    font-weight: 700;
}
.category-college {
    background: linear-gradient(135deg, #c7d2fe 0%, #e0e7ff 100%);
    color: #3730a3;
    border: 2px solid #a5b4fc;
    text-shadow: none;
    font-weight: 700;
}
.category-career-fair {
    background: linear-gradient(135deg, #fbcfe8 0%, #fce7f3 100%);
    color: #9f1239;
    border: 2px solid #f9a8d4;
    text-shadow: none;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(249, 168, 212, 0.25);
}
.category-immigration {
    background: linear-gradient(135deg, #e9d5ff 0%, #f3e8ff 100%);
    color: #6b21a8;
    border: 2px solid #d8b4fe;
    text-shadow: none;
    font-weight: 700;
}
.category-announcement {
    background: linear-gradient(135deg, #c7d2fe 0%, #ddd6fe 100%);
    color: #4338ca;
    border: 2px solid #a78bfa;
    text-shadow: none;
    font-weight: 700;
}
.category-resource {
    background: linear-gradient(135deg, #bbf7d0 0%, #dcfce7 100%);
    color: #14532d;
    border: 2px solid #86efac;
    text-shadow: none;
    font-weight: 700;
}

.bulletin-description {
    color: #475569;
    margin-bottom: 24px;
    line-height: 1.7;
    font-size: 15px;
    font-weight: 400;
}

.bulletin-description p {
    margin: 0 0 12px;
}

.bulletin-description code {
    background: rgba(15, 23, 42, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 0.9em;
}
.description-wrapper {
    position: relative;
}

.description-content {
    transition: max-height 0.3s ease;
}

.description-wrapper:not(.expanded) .description-content {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 9.5rem;
}

.description-wrapper:not(.expanded) .description-content::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3.5rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(248, 250, 252, 0.9) 65%, rgba(248, 250, 252, 1) 100%);
    pointer-events: none;
}

.description-wrapper.expanded .description-content::after {
    display: none;
}

.toggle-description {
    border: 2px solid #0ea5e9;
    background: #f0f9ff;
    color: #0284c7;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 0.95rem;
    margin-top: 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.toggle-description:hover {
    background: #0ea5e9;
    color: white;
    border-color: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.bulletin-meta {
    border-top: 1px solid rgba(203, 213, 225, 0.4);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #64748b;
}

.meta-item {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.meta-item strong {
    margin-right: 8px;
    min-width: 80px;
    flex-shrink: 0;
    color: #334155;
    font-weight: 600;
}

.meta-item a {
    word-break: break-all;
    overflow-wrap: anywhere;
    max-width: 100%;
    display: inline-block;
}

.deadline-warning {
    color: #dc2626;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    border-left: 3px solid #dc2626;
}

.posted-by {
    font-style: normal;
    color: #64748b;
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.8;
}

.bulletin-image {
    margin: 20px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
    background: #f1f5f9;
    display: flex;
    justify-content: center;
}

.card-image {
    width: 100%;
    max-width: 640px;
    height: auto;
    max-height: 900px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-image:hover {
    transform: scale(1.03);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(203, 213, 225, 0.3);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
    margin: 40px auto;
    max-width: 600px;
}

.empty-state h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
}

.empty-state p {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 400;
    line-height: 1.6;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.3s ease-out;
    border: 2px solid rgba(14, 165, 233, 0.2);
}

.bulletin-detail-modal {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 12px;
}

.bulletin-detail-content {
    max-width: 960px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(226, 232, 240, 0.98) 100%);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}

.close-detail {
    position: absolute;
    top: 16px;
    right: 20px;
    border: none;
    background: transparent;
    font-size: 28px;
    color: #475569;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.close-detail:hover {
    color: #0f172a;
}

#bulletinDetailBody {
    padding: 32px;
}

.detail-card {
    background: white;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(203, 213, 225, 0.35);
}

.detail-card .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.detail-card .detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

/* Removed - now using .category-badge classes for consistent styling */

.detail-card .detail-subtitle {
    margin-top: 6px;
    color: #64748b;
    font-size: 0.95rem;
}

.detail-card .detail-image {
    margin: 24px 0;
    background: #f1f5f9;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.detail-card .detail-image img {
    width: 100%;
    max-width: 720px;
    height: auto;
    max-height: calc(80vh - 220px);
    object-fit: contain;
    border-radius: 16px;
}

.detail-card .detail-body {
    display: grid;
    gap: 16px;
    font-size: 1rem;
    color: #1e293b;
}

.detail-card .detail-body p {
    margin: 0;
    line-height: 1.6;
}

.detail-card .detail-meta {
    display: grid;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    margin-top: 24px;
}

.detail-card .detail-meta strong {
    color: #0f172a;
}

.detail-card .detail-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 28px;
}

.detail-card .detail-actions button {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-card .detail-actions .close-btn {
    background: #e2e8f0;
    color: #1e293b;
}

.detail-card .detail-actions .close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.3);
}

.detail-card .detail-actions .share-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.detail-card .detail-actions .share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    right: 24px;
    top: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    z-index: 10;
}

.close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.close:active {
    transform: scale(0.95);
}

.modal-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: -8px 0 24px 0;
    line-height: 1.5;
}

.modal-content h3 {
    color: #0f172a;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-content input[type="text"],
.modal-content input[type="password"],
.modal-content input[type="email"] {
    transition: all 0.2s ease;
    border: 2px solid #e2e8f0;
}

.modal-content input[type="text"]:focus,
.modal-content input[type="password"]:focus,
.modal-content input[type="email"]:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    outline: none;
}

.modal-content button[type="submit"] {
    position: relative;
    transition: all 0.2s ease;
}

.modal-content button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.modal-content button[type="submit"]:active {
    transform: translateY(0);
}

.modal-content button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.modal-content button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.modal-content button.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Admin Panel */
.admin-panel {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.admin-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.logout-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    background: #ecf0f1;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-btn:hover {
    background: #bdc3c7;
}

.tab-btn.active:hover {
    background: #2980b9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    position: relative;
}

.form-group label.required {
    font-weight: 700;
    color: #1a365d;
}

.form-group label.required::after {
    content: " *";
    color: #e53e3e;
    font-weight: 700;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    background: #f7fafc;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Field Type Color Coding */
.form-group.required-field {
    border-left: 4px solid #e53e3e;
    padding-left: 12px;
    background: rgba(229, 62, 62, 0.02);
    border-radius: 0 8px 8px 0;
}

.form-group.optional-field {
    border-left: 4px solid #38a169;
    padding-left: 12px;
    background: rgba(56, 161, 105, 0.02);
    border-radius: 0 8px 8px 0;
}

.form-group.enhancement-field {
    border-left: 4px solid #9333ea;
    padding-left: 12px;
    background: rgba(147, 51, 234, 0.02);
    border-radius: 0 8px 8px 0;
}

/* Form Section Grouping */
.form-section {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.form-section-icon {
    font-size: 20px;
    margin-right: 8px;
    width: 24px;
    text-align: center;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.form-section-subtitle {
    font-size: 13px;
    color: #718096;
    margin: 4px 0 0 0;
    font-weight: 400;
}

/* Required Fields Section */
.form-section.required {
    border-left: 4px solid #e53e3e;
    background: rgba(229, 62, 62, 0.03);
}

.form-section.required .form-section-header {
    border-bottom-color: #e53e3e;
}

.form-section.required .form-section-icon {
    color: #e53e3e;
}

/* Optional Fields Section */
.form-section.optional {
    border-left: 4px solid #38a169;
    background: rgba(56, 161, 105, 0.03);
}

.form-section.optional .form-section-header {
    border-bottom-color: #38a169;
}

.form-section.optional .form-section-icon {
    color: #38a169;
}

/* Event Details Section */
.form-section.event-details {
    border-left: 4px solid #3182ce;
    background: rgba(49, 130, 206, 0.03);
}

.form-section.event-details .form-section-header {
    border-bottom-color: #3182ce;
}

.form-section.event-details .form-section-icon {
    color: #3182ce;
}

.form-group.event-field {
    border-left: 4px solid #3182ce;
    padding-left: 12px;
    background: rgba(49, 130, 206, 0.02);
    border-radius: 0 8px 8px 0;
}

/* Enhancement Fields Section */
.form-section.enhancement {
    border-left: 4px solid #9333ea;
    background: rgba(147, 51, 234, 0.03);
}

.form-section.enhancement .form-section-header {
    border-bottom-color: #9333ea;
}

.form-section.enhancement .form-section-icon {
    color: #9333ea;
}

/* Field Priority Indicators */
.field-priority {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.field-priority.required {
    background: #fed7d7;
    color: #c53030;
}

.field-priority.recommended {
    background: #c6f6d5;
    color: #2f855a;
}

.field-priority.optional {
    background: #bee3f8;
    color: #2b6cb0;
}

/* Enhanced Input Styling */
.form-group input.required,
.form-group select.required,
.form-group textarea.required {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.02);
}

.form-group input.required:focus,
.form-group select.required:focus,
.form-group textarea.required:focus {
    border-color: #c53030;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-group input.recommended,
.form-group select.recommended,
.form-group textarea.recommended {
    border-color: #38a169;
    background: rgba(56, 161, 105, 0.02);
}

.form-group input.recommended:focus,
.form-group select.recommended:focus,
.form-group textarea.recommended:focus {
    border-color: #2f855a;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

/* Form Help Text Enhancement */
.input-help {
    display: block;
    color: #718096;
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
    line-height: 1.4;
}

.input-help.required {
    color: #c53030;
    font-weight: 500;
}

.input-help.recommended {
    color: #2f855a;
    font-weight: 500;
}

/* Form Validation States */
.form-group.valid input,
.form-group.valid select,
.form-group.valid textarea {
    border-color: #38a169;
    background: rgba(56, 161, 105, 0.05);
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
    border-color: #e53e3e;
    background: rgba(229, 62, 62, 0.05);
}

/* Enhanced Form Validation Feedback */
.field-feedback {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    display: none;
    transition: all 0.3s ease;
}

.field-feedback.success {
    background: rgba(56, 161, 105, 0.1);
    color: #2f855a;
    border: 1px solid rgba(56, 161, 105, 0.2);
    display: block;
}

.field-feedback.error {
    background: rgba(229, 62, 62, 0.1);
    color: #c53030;
    border: 1px solid rgba(229, 62, 62, 0.2);
    display: block;
}

.field-feedback.warning {
    background: rgba(237, 137, 54, 0.1);
    color: #c05621;
    border: 1px solid rgba(237, 137, 54, 0.2);
    display: block;
}

/* Form Progress Indicator */
.form-progress {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.form-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.form-progress-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.form-progress-percentage {
    font-size: 12px;
    font-weight: 600;
    color: #718096;
}

.form-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.form-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3182ce, #2b6cb0);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Form Section Completion Indicators */
.form-section.completed {
    border-left-color: #38a169;
    background: rgba(56, 161, 105, 0.05);
}

.form-section.completed .form-section-icon {
    color: #38a169;
}

.form-section.completed .form-section-title::after {
    content: " ✓";
    color: #38a169;
    font-weight: 700;
}

/* Interactive Form Elements */
.form-group input:not(:placeholder-shown),
.form-group select:not([value=""]),
.form-group textarea:not(:placeholder-shown) {
    border-color: #3182ce;
    background: rgba(49, 130, 206, 0.02);
}

.form-group input:not(:placeholder-shown):focus,
.form-group select:not([value=""]):focus,
.form-group textarea:not(:placeholder-shown):focus {
    border-color: #2b6cb0;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Form Submission States */
.form-submitting .form-actions button {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.form-submitting .submit-btn {
    background: #a0aec0;
    position: relative;
}

.form-submitting .submit-btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Success State */
.form-success {
    background: rgba(56, 161, 105, 0.1);
    border: 2px solid #38a169;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.form-success-icon {
    font-size: 48px;
    color: #38a169;
    margin-bottom: 12px;
}

.form-success-title {
    font-size: 18px;
    font-weight: 600;
    color: #2f855a;
    margin: 0 0 8px 0;
}

.form-success-message {
    color: #2f855a;
    margin: 0;
    font-size: 14px;
}

/* Form Error State */
.form-error {
    background: rgba(229, 62, 62, 0.1);
    border: 2px solid #e53e3e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.form-error-icon {
    font-size: 48px;
    color: #e53e3e;
    margin-bottom: 12px;
}

.form-error-title {
    font-size: 18px;
    font-weight: 600;
    color: #c53030;
    margin: 0 0 8px 0;
}

.form-error-message {
    color: #c53030;
    margin: 0;
    font-size: 14px;
}

/* Mobile Form Enhancements */
@media (max-width: 768px) {
    .form-section {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .form-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .form-section-icon {
        font-size: 18px;
    }
    
    .form-section-title {
        font-size: 15px;
    }
    
    .form-section-subtitle {
        font-size: 12px;
    }
    
    .field-group {
        gap: 16px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .input-help {
        font-size: 11px;
    }
}

/* Field Group Styling */
.field-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.field-group.single {
    grid-template-columns: 1fr;
}

.field-group.double {
    grid-template-columns: 1fr 1fr;
}

.field-group.triple {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .field-group {
        grid-template-columns: 1fr;
    }
}

.file-input {
    padding: 8px !important;
    border: 2px dashed #ddd !important;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
}

.file-input:hover {
    border-color: #3498db !important;
    background: #e3f2fd;
}

.file-upload-help {
    margin-top: 8px;
}

.file-upload-help small {
    color: #666;
    font-size: 0.85rem;
}

.image-preview {
    margin-top: 15px;
}

.image-info {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.image-info small {
    color: #666;
    font-size: 11px;
}

.size-warning {
    color: #f39c12 !important;
    font-weight: 500;
}

.preview-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.preview-image {
    width: 100%;
    max-width: 640px;
    max-height: calc(90vh - 180px);
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.18);
    background: #f1f5f9;
    object-fit: contain;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-image:hover {
    background: #c0392b;
}

button[type="submit"] {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease;
    width: 100%;
}

button[type="submit"]:hover {
    background: #229954;
}

.login-help {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.login-help a {
    color: #0ea5e9;
    text-decoration: none;
}

.login-help a:hover {
    text-decoration: underline;
}

/* Enhanced Form Styling */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.success-message {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.form-group {
    position: relative;
}

.input-help {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 4px;
    font-style: italic;
}

/* Password input wrapper for integrated toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input[type="password"],
.password-input-wrapper input[type="text"] {
    padding-right: 80px; /* Make room for the toggle button */
    width: 100%;
}

.show-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    padding: 4px 8px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    transition: all 0.2s ease;
    z-index: 1;
}

.show-password:hover {
    background: #e9ecef;
    color: #333;
    border-color: #adb5bd;
}

.show-password:active {
    background: #dee2e6;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.secondary-btn:hover {
    background: #5a6268;
}

.password-change-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.password-strength {
    margin-top: 8px;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background: #fee;
    color: #c33;
}

.password-strength.medium {
    background: #fff3cd;
    color: #856404;
}

.password-strength.strong {
    background: #d4edda;
    color: #155724;
}

.reset-info {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    color: #004085;
    padding: 12px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 0.9rem;
}

/* Loading States */
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Share Feature Styling */
.bulletin-actions {
    border-top: 1px solid rgba(203, 213, 225, 0.4);
    padding-top: 16px;
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.bulletin-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.info-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(203, 213, 225, 0.2);
    color: #475569;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(203, 213, 225, 0.3);
    transition: all 0.2s ease;
}

.info-tag:hover {
    background: rgba(203, 213, 225, 0.3);
    transform: translateY(-1px);
}

.class-type-tag {
    background: rgba(14, 165, 233, 0.1);
    color: #0c4a6e;
    border-color: rgba(14, 165, 233, 0.2);
}

.deadline-tag {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.2);
}

.deadline-urgent {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.company-tag {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    border-color: rgba(34, 197, 94, 0.2);
}

.bulletin-action-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile responsive for bulletin actions */
@media (max-width: 640px) {
    .bulletin-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .bulletin-tags {
        justify-content: center;
        order: 2;
    }
    
    .bulletin-action-buttons {
        justify-content: center;
        order: 1;
    }
    
    .info-tag {
        font-size: 10px;
        padding: 3px 6px;
    }
}

.share-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.pdf-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.pdf-btn:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.pdf-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.pdf-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Mobile PDF button optimizations */
@media (max-width: 640px) {
    .pdf-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .bulletin-action-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
}

.pdf-preview-container {
    padding: 12px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pdf-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-icon {
    font-size: 2rem;
}

.pdf-details {
    display: flex;
    flex-direction: column;
}

.pdf-details strong {
    font-size: 14px;
    color: #0f172a;
}

.pdf-details small {
    font-size: 12px;
    color: #64748b;
}

.remove-pdf {
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-pdf:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* List View Styles */
.bulletin-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.bulletin-list-item {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.bulletin-list-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
}

.bulletin-list-content {
    flex: 1;
}

.bulletin-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.bulletin-list-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    letter-spacing: -0.025em;
    margin: 0;
}

.bulletin-list-description {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 15px;
}

.bulletin-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 16px;
}

.bulletin-list-meta-item {
    display: flex;
    align-items: center;
}

.bulletin-list-meta-item strong {
    margin-right: 8px;
    color: #334155;
    font-weight: 600;
}

.bulletin-list-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(203, 213, 225, 0.4);
}

.bulletin-list-actions .share-btn {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.bulletin-list-actions .share-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.bulletin-list-category {
    align-self: flex-start;
}

/* Calendar View Styles */
.bulletin-calendar {
    margin-bottom: 40px;
}

/* Monthly Calendar Styles */
.monthly-calendar {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 8px;
}

.calendar-month {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    flex: 1;
    text-align: center;
}

.calendar-nav-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 500;
}

.calendar-nav-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.calendar-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
    width: 100%;
    box-sizing: border-box;
}

.calendar-weekday {
    padding: 8px 6px;
    text-align: center;
    font-weight: 600;
    color: #64748b;
    font-size: 0.8rem;
    background: rgba(241, 245, 249, 0.8);
    border-radius: 6px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: rgba(226, 232, 240, 0.3);
    border-radius: 12px;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 4px;
    min-height: 60px;
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.calendar-day:hover {
    background: rgba(248, 250, 252, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 197, 253, 0.1));
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.calendar-day.has-bulletins {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.calendar-day-number {
    font-weight: 600;
    color: #374151;
    font-size: 0.8rem;
    margin-bottom: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.calendar-day.today .calendar-day-number {
    color: #2563eb;
    font-weight: 700;
}

.event-count-badge {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(14, 165, 233, 0.3);
}

.calendar-day-content {
    flex: 1;
}

.calendar-bulletins {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.monthly-bulletin-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    margin-bottom: 1px;
}

.monthly-bulletin-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(2px);
}

.monthly-bulletin-category {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

.monthly-bulletin-title {
    font-weight: 500;
    color: #374151;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.monthly-bulletin-deadline {
    font-size: 0.65rem;
    color: #6b7280;
    margin-top: 1px;
}

.monthly-bulletin-deadline.deadline-warning {
    color: #dc2626;
    font-weight: 600;
}

.more-bulletins {
    font-size: 0.65rem;
    color: #6b7280;
    text-align: center;
    font-style: italic;
    margin-top: 1px;
}

.today-indicator {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 5px;
    height: 5px;
    background: #2563eb;
    border-radius: 50%;
}

/* Legacy Calendar Grid (for backward compatibility) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Mobile-first calendar grid */
@media (max-width: 640px) {
    .calendar-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .monthly-calendar {
        padding: 18px;
        margin: 0 12px;
    }

    .calendar-day {
        min-height: 70px;
        padding: 6px;
    }

    .calendar-day-number {
        font-size: 0.9rem;
        font-weight: 700;
    }

    /* Show only first 2 events on tablet/medium screens */
    .calendar-bulletins .monthly-bulletin-item:nth-child(n+3) {
        display: none;
    }

    .event-count-badge {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .monthly-bulletin-item {
        font-size: 0.75rem;
        padding: 4px 6px;
        line-height: 1.3;
        margin-bottom: 3px;
    }

    .monthly-bulletin-title {
        font-weight: 600;
    }

    .monthly-bulletin-deadline {
        font-size: 0.7rem;
        margin-top: 2px;
    }

    .calendar-nav-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .calendar-month {
        font-size: 1.5rem;
    }

    .calendar-weekday {
        padding: 12px 8px;
        font-size: 0.9rem;
        font-weight: 700;
    }
}

@media (max-width: 480px) {
    .monthly-calendar {
        padding: 14px;
        margin: 0 8px;
    }

    .calendar-day {
        min-height: 65px;
        padding: 5px;
    }

    .calendar-day-number {
        font-size: 0.85rem;
        font-weight: 700;
    }

    /* Hide event details on very small screens - just show count badge */
    .calendar-bulletins {
        display: none;
    }

    .event-count-badge {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    .monthly-bulletin-item {
        font-size: 0.72rem;
        padding: 4px 6px;
        line-height: 1.3;
        margin-bottom: 3px;
    }

    .monthly-bulletin-title {
        font-weight: 600;
    }

    .monthly-bulletin-deadline {
        font-size: 0.68rem;
        margin-top: 2px;
    }

    .calendar-weekday {
        padding: 10px 5px;
        font-size: 0.85rem;
        font-weight: 700;
    }

    .calendar-month {
        font-size: 1.35rem;
    }

    .calendar-nav-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

@media (min-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 24px;
    }
}

.calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #0ea5e9;
}

.calendar-day-date {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0f172a;
}

.calendar-day-weekday {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.calendar-day-bulletins {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-bulletin-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(203, 213, 225, 0.3);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.calendar-bulletin-item:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.calendar-bulletin-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.calendar-bulletin-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.calendar-bulletin-description {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 8px;
}

.calendar-bulletin-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.calendar-bulletin-deadline {
    color: #dc2626;
    font-weight: 600;
}

/* Mobile optimizations for calendar components */
@media (max-width: 768px) {
    .calendar-day-header {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .calendar-day-date {
        font-size: 1rem;
    }

    .calendar-day-weekday {
        font-size: 0.8rem;
    }

    .calendar-bulletin-item {
        padding: 12px;
        border-radius: 8px;
    }

    .calendar-bulletin-title {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .calendar-bulletin-category {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .calendar-bulletin-description {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .calendar-bulletin-meta {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .calendar-day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 10px;
    }

    .calendar-day-date {
        font-size: 0.9rem;
    }

    .calendar-day-weekday {
        font-size: 0.75rem;
    }

    .calendar-bulletin-item {
        padding: 10px;
    }

    .calendar-bulletin-title {
        font-size: 0.9rem;
    }

    .today-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

.today-badge {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.calendar-day.today {
    border-color: #dc2626;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
}

/* Day Events List (when clicking on a calendar day) */
.day-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.day-event-item {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.day-event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.4);
}

.day-event-item.expired {
    opacity: 0.6;
    background: rgba(248, 250, 252, 0.9);
}

.day-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.day-event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    flex: 1;
}

.day-event-description {
    color: #64748b;
    font-size: 0.9rem;
    margin: 8px 0;
    line-height: 1.5;
}

.day-event-meta {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 4px 0 0 0;
}

.expired-label {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Bulletin Detail Modal */
.bulletin-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.bulletin-detail-content {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 20px;
    padding: 32px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.25);
    width: 100%;
    position: relative;
}

.bulletin-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
}

.bulletin-detail-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    margin: 0;
}

.bulletin-detail-image {
    margin: 20px 0;
    text-align: center;
}

.detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.15);
}

.bulletin-detail-description {
    color: #475569;
    line-height: 1.7;
    font-size: 16px;
    margin-bottom: 28px;
}

.bulletin-detail-meta {
    border-top: 1px solid rgba(203, 213, 225, 0.4);
    padding-top: 20px;
    margin-bottom: 28px;
}

.detail-meta-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.detail-meta-item strong {
    margin-right: 12px;
    min-width: 120px;
    color: #334155;
    font-weight: 600;
}

.bulletin-detail-actions {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid rgba(203, 213, 225, 0.4);
}

.close-detail {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    z-index: 10;
}

.close-detail:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

/* Mobile optimizations for modal */
@media (max-width: 768px) {
    .bulletin-detail-modal {
        padding: 12px;
        align-items: center;
        background: rgba(0, 0, 0, 0.8);
    }

    .bulletin-detail-content {
        border-radius: 16px;
        max-height: 92vh;
        max-width: 100%;
        width: 100%;
        padding: 52px 0 16px;
        overflow-y: auto;
        margin: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    #bulletinDetailBody {
        padding: 0;
    }

    /* Add mobile styles for detail-card inside modal */
    .detail-card {
        padding: 16px;
        border-radius: 12px;
    }

    .detail-card .detail-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .detail-card .detail-header {
        gap: 16px;
        margin-bottom: 20px;
    }

    .detail-card .detail-body {
        font-size: 0.95rem;
    }

    .detail-card .detail-meta {
        gap: 12px;
        margin-top: 20px;
    }

    .detail-card .detail-actions {
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 20px;
    }

    .detail-card .detail-actions button,
    .detail-card .detail-actions a {
        flex: 1 1 auto;
        min-width: 120px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .close-detail {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
        font-size: 20px;
        position: absolute;
    }

    .bulletin-detail-header {
        margin-bottom: 16px;
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .bulletin-detail-header h2 {
        font-size: 1.4rem;
        padding-right: 45px;
        line-height: 1.3;
        margin-bottom: 0;
        width: 100%;
    }

    .bulletin-detail-header .category-badge {
        align-self: flex-start;
        margin-top: 8px;
        font-size: 0.7rem;
        padding: 6px 12px;
        order: 2;
    }

    .bulletin-detail-description {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .bulletin-detail-meta {
        padding-top: 16px;
        margin-bottom: 16px;
    }

    .detail-meta-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }

    .detail-meta-item strong {
        min-width: 70px;
        margin-right: 8px;
        margin-bottom: 0;
        font-size: 13px;
    }

    .detail-image {
        max-height: 250px;
        object-fit: contain;
        margin: 16px 0;
    }

    .bulletin-detail-actions {
        padding-top: 16px;
        padding-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .bulletin-detail-modal {
        padding: 8px;
        background: rgba(0, 0, 0, 0.8);
    }

    .bulletin-detail-content {
        padding: 48px 0 12px;
        border-radius: 12px;
        max-height: 94vh;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    #bulletinDetailBody {
        padding: 0;
    }

    /* Add mobile styles for detail-card at smaller sizes */
    .detail-card {
        padding: 12px;
        border-radius: 10px;
    }

    .detail-card .detail-title {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .detail-card .detail-body {
        font-size: 0.9rem;
    }

    .detail-card .detail-actions button,
    .detail-card .detail-actions a {
        min-width: 100px;
        padding: 9px 14px;
        font-size: 0.85rem;
    }

    .close-detail {
        top: 6px;
        right: 6px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .bulletin-detail-header h2 {
        font-size: 1.25rem;
        padding-right: 40px;
        margin-bottom: 0;
        width: 100%;
    }

    .bulletin-detail-header .category-badge {
        align-self: flex-start;
        margin-top: 6px;
        font-size: 0.65rem;
        padding: 5px 10px;
        order: 2;
    }

    .bulletin-detail-description {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .detail-meta-item strong {
        min-width: 65px;
        font-size: 12px;
    }

    .detail-image {
        max-height: 200px;
        margin: 14px 0;
    }

    .bulletin-detail-header {
        margin-bottom: 14px;
    }

    .bulletin-detail-meta {
        padding-top: 14px;
        margin-bottom: 14px;
    }

    .bulletin-detail-actions {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

/* Admin-specific styles */
.back-btn {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-btn:hover {
    background: #0ea5e9;
    color: white;
    transform: translateY(-1px);
}

.login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.login-card {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
    max-width: 400px;
}

.login-card h3 {
    color: #0f172a;
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.login-card p {
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.6;
}

.show-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.show-password:hover {
    opacity: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.secondary-btn {
    background: #64748b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #475569;
    transform: translateY(-1px);
}

.post-form-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.post-form-container h4 {
    color: #0f172a;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #0ea5e9;
    padding-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.file-input {
    padding: 8px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.file-upload-help {
    margin-top: 8px;
}

.file-upload-help small {
    color: #64748b;
    line-height: 1.4;
}

.image-preview {
    margin-top: 12px;
}

.preview-container {
    position: relative;
    display: inline-block;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.preview-image {
    max-width: 200px;
    max-height: 150px;
    display: block;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.remove-image:hover {
    background: rgba(220, 38, 38, 1);
}

.manage-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
}

.manage-card h5 {
    color: #0f172a;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.manage-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(203, 213, 225, 0.4);
}

.edit-btn, .delete-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #0ea5e9;
    color: white;
}

.edit-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}

.delete-btn {
    background: #dc2626;
    color: white;
}

.delete-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.preview-btn {
    background: #64748b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    background: #475569;
    transform: translateY(-1px);
}

.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    border-left: 4px solid #dc2626;
    font-size: 14px;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    border-left: 4px solid #16a34a;
    font-size: 14px;
}

.field-feedback {
    margin-top: 4px;
    font-size: 12px;
    padding: 4px 0;
}

.field-feedback.success {
    color: #16a34a;
}

.field-feedback.error {
    color: #dc2626;
}

.field-feedback.warning {
    color: #d97706;
}

.valid {
    border-color: #16a34a !important;
    background-color: rgba(34, 197, 94, 0.05) !important;
}

.invalid {
    border-color: #dc2626 !important;
    background-color: rgba(239, 68, 68, 0.05) !important;
}

.input-help {
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.reset-info {
    color: #64748b;
    font-size: 14px;
    margin: 12px 0;
    line-height: 1.5;
}

.password-change-notice {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    border-left: 4px solid #f59e0b;
    font-size: 14px;
}

.password-strength {
    margin: 12px 0;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
}

.size-warning {
    color: #d97706;
    font-weight: 500;
}

.image-info {
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    text-align: center;
}

.preview-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.preview-content {
    margin: 20px 0;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid rgba(203, 213, 225, 0.4);
}

.cancel-btn {
    background: #64748b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #475569;
    transform: translateY(-1px);
}

/* Login Modal Styles */
.login-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(203, 213, 225, 0.4);
    font-size: 14px;
    color: #64748b;
}

.login-info p {
    margin: 8px 0;
    line-height: 1.5;
}

.login-info strong {
    color: #0f172a;
    font-weight: 600;
}

/* Share Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.share-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.share-modal-content h3 {
    margin-bottom: 20px;
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 600;
}

.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.share-option {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.share-option:hover {
    background: #f8fafc;
    border-color: #0ea5e9;
    transform: translateY(-2px);
}

.share-option.whatsapp:hover { border-color: #25d366; }
.share-option.facebook:hover { border-color: #1877f2; }
.share-option.email:hover { border-color: #ea4335; }
.share-option.sms:hover { border-color: #0ea5e9; }

.share-link {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.share-link input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #64748b;
    outline: none;
}

.copy-btn {
    background: #0ea5e9;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #0284c7;
}

.close-share {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.close-share:hover {
    background: #5a6268;
}

/* Mobile share modal adjustments */
@media (max-width: 480px) {
    .share-modal {
        padding: 16px;
    }

    .share-modal-content {
        padding: 24px 20px;
    }

    .share-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .share-option {
        padding: 14px;
    }

    .share-link {
        flex-direction: column;
        gap: 12px;
    }

    .copy-btn {
        align-self: stretch;
        padding: 12px;
    }
}

/* Management Section */
.manage-header {
    margin-bottom: 24px;
}

.manage-header h4 {
    margin-bottom: 16px;
}

.manage-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.manage-search,
.manage-sort,
.manage-filter {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #475569;
}

.manage-search {
    flex: 1;
    min-width: 200px;
}

.manage-search:focus,
.manage-sort:focus,
.manage-filter:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.manage-bulletins-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.manage-card {
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.4);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.manage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}

.manage-card.expired {
    opacity: 0.7;
    filter: grayscale(30%);
}

.manage-expired-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.manage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.manage-card-header h5 {
    color: #0f172a;
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.manage-card-body {
    margin-bottom: 16px;
}

.manage-description {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.manage-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.deadline-expired {
    color: #dc2626;
    font-weight: 600;
}

.manage-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(203, 213, 225, 0.3);
}

.edit-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.no-posts-message {
    text-align: center;
    color: #64748b;
    padding: 40px 20px;
    font-size: 16px;
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 32px 20px;
    margin-top: 80px;
    color: #cbd5e1;
    border-top: 1px solid rgba(203, 213, 225, 0.2);
    font-size: 14px;
    font-weight: 400;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.advisor-portal-section {
    padding-top: 20px;
    border-top: 1px solid rgba(203, 213, 225, 0.2);
    width: 100%;
    text-align: center;
}

.footer-admin-btn {
    font-size: 13px;
    padding: 10px 18px;
    opacity: 0.8;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.footer-admin-btn:hover {
    opacity: 1;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.footer-contact {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(203, 213, 225, 0.2);
    width: 100%;
    text-align: center;
}

.footer-contact p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.contact-link {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #38bdf8;
    text-decoration: underline;
}

@media (min-width: 640px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .advisor-portal-section {
        border-top: none;
        width: auto;
        padding-top: 0;
    }

    .footer-contact {
        border-top: none;
        margin-top: 0;
        padding-top: 0;
        width: auto;
    }
}

/* Admin Page Specific Styles */
.header-left {
    display: flex;
    align-items: center;
    min-width: 150px;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
    min-width: 150px;
    justify-content: flex-end;
}

.back-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.back-btn:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
}

.login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 160px);
    padding: 60px 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 60px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.2);
    max-width: 500px;
    width: 100%;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card h3 {
    margin-bottom: 24px;
    color: #0f172a;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.login-card p {
    margin-bottom: 40px;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.welcome-section h3 {
    color: #2980b9;
    margin-bottom: 8px;
}

.welcome-section p {
    color: #666;
}

.post-form-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.preview-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.preview-btn:hover {
    background: #5a6268;
}

.submit-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.submit-btn:hover {
    background: #229954;
}

.preview-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.preview-content {
    margin: 20px 0;
}

.preview-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header h2 {
        font-size: 1rem;
    }

    .bulletin-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .manage-actions {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .preview-actions {
        flex-direction: column;
    }

    .header-right {
        flex-direction: column;
        gap: 10px;
    }

    .login-required {
        padding: 40px 16px;
    }

    .login-card {
        padding: 40px 30px;
        max-width: 90%;
    }

    .login-card h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .login-card p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .admin-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-loading-spinner 1s ease infinite;
}

@keyframes btn-loading-spinner {
    from { transform: rotate(0turn); }
    to { transform: rotate(1turn); }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    font-size: 18px;
    color: #2c3e50;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e3f2fd;
    border-radius: 50%;
    border-top-color: #1976d2;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Offline Handling */
.offline-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f39c12;
    color: white;
    padding: 12px 20px;
    text-align: center;
    z-index: 1002;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* Adjust main content when offline bar is visible */
body:has(.offline-bar[style*="display: block"]) .main-content {
    margin-top: 50px;
}

/* Form Validation Feedback */
.field-feedback {
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
    transition: all 0.3s ease;
}

.field-feedback.success {
    color: #27ae60;
}

.field-feedback.error {
    color: #e74c3c;
}

.field-feedback.warning {
    color: #f39c12;
}

.form-group input.valid,
.form-group textarea.valid {
    border-color: #27ae60;
    background-color: rgba(39, 174, 96, 0.05);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

.char-counter {
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-top: 2px;
}

.char-counter.warning {
    color: #f39c12;
}

.char-counter.danger {
    color: #e74c3c;
}

/* Toast Message Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Keyboard Navigation & Accessibility */
.tab-btn:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #1976d2;
    color: white;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.skip-link:focus {
    top: 6px;
}

/* Ensure buttons have proper contrast and sizing for accessibility */
.tab-btn,
.admin-btn,
.edit-btn,
.delete-btn {
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover,
.tab-btn:focus {
    background-color: rgba(25, 118, 210, 0.1);
    border-color: #1976d2;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header Right Controls */
.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}


/* Help Button */
.help-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 50px;
    min-height: 50px;
}

.help-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

/* Notification Button */
.notification-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 50px;
    min-height: 50px;
}

.notification-btn:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.notification-btn.has-notifications {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Notification Modal */
#notificationModal .modal-content {
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    font-weight: 400;
}

.checkbox-label:hover {
    background-color: rgba(14, 165, 233, 0.05);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #0ea5e9;
}

/* Notification Status */
.notification-status {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.notification-status h4 {
    color: #0f172a;
    margin-bottom: 12px;
    font-size: 1rem;
}

#currentSettings {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

/* Tutorial Styles */
.tutorial-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.tutorial-steps {
    margin: 20px 0;
}

.tutorial-step {
    display: none;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid #0ea5e9;
}

.tutorial-step.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.tutorial-step h4 {
    color: #0f172a;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.tutorial-step p {
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.6;
}

.tutorial-demo {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-top: 12px;
}

.tutorial-demo input,
.tutorial-demo select,
.tutorial-demo button {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.tutorial-demo input:disabled,
.tutorial-demo select:disabled,
.tutorial-demo button:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.phone-demo {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
}

.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 16px;
    background: #f1f5f9;
    border-radius: 8px;
}

.tutorial-navigation span {
    font-weight: 500;
    color: #475569;
}

.tutorial-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tutorial-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.tutorial-actions button {
    margin: 0 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .header-right {
        gap: 8px;
    }


    .help-btn,
    .notification-btn {
        padding: 10px 14px;
        font-size: 16px;
        min-width: 45px;
        min-height: 45px;
    }

    #notificationModal .modal-content,
    #helpModal .modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 20px;
    }

    .checkbox-group {
        gap: 10px;
    }

    .checkbox-label {
        padding: 6px 10px;
        font-size: 14px;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions button {
        width: 100%;
    }

    .tutorial-navigation {
        flex-direction: column;
        gap: 12px;
    }

    .tutorial-navigation span {
        order: -1;
    }

    .tutorial-actions {
        flex-direction: column;
        gap: 8px;
    }

    .tutorial-actions button {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0 15px;
    }

    .bulletin-card {
        padding: 20px;
    }

    .admin-tabs {
        flex-direction: column;
    }
}

/* ========================================
   MOBILE STABILITY IMPROVEMENTS
   ======================================== */

/* Prevent Double-Tap Zoom & Remove Tap Delays */
button,
.btn,
.bulletin-card,
.category-filter,
.admin-tab,
.close,
a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile Touch Feedback - Only on Touch Devices */
@media (hover: none) and (pointer: coarse) {
    /* Button Press Feedback */
    button:active,
    .btn:active {
        transform: scale(0.97);
        opacity: 0.9;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }

    /* Card Tap Feedback */
    .bulletin-card:active {
        transform: scale(0.99);
        transition: transform 0.15s ease;
    }

    /* Tab Press Feedback */
    .admin-tab:active,
    .category-filter:active {
        transform: scale(0.98);
        opacity: 0.9;
        transition: transform 0.1s ease;
    }

    /* Link Press Feedback */
    a:active {
        opacity: 0.7;
        transition: opacity 0.1s ease;
    }
}

/* iOS Keyboard & Modal Fixes */
@media (max-width: 768px) {
    /* Use dynamic viewport height for iOS keyboard handling */
    .modal {
        height: 100dvh;
        height: 100vh; /* Fallback for older browsers */
    }

    /* Make modal content scrollable on small screens */
    .modal-content {
        max-height: 85vh;
        max-height: 85dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        margin: 2% auto;
    }

    /* Ensure form inputs stay visible when keyboard opens */
    .modal-content input:focus,
    .modal-content textarea:focus {
        scroll-margin-top: 120px;
        scroll-margin-bottom: 120px;
    }

    /* Prevent body scroll when modal is open */
    body.modal-open {
        position: fixed;
        width: 100%;
        overflow: hidden;
        touch-action: none;
    }

    /* Better momentum scrolling */
    .bulletin-grid,
    .bulletin-detail-content,
    .modal-content {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Prevent text selection during scroll */
    .bulletin-card,
    .category-filter {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }

    /* But allow text selection in bulletin content */
    .bulletin-description,
    .detail-description,
    .bulletin-title {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* Extra Small Screens - Additional Stability */
@media (max-width: 480px) {
    /* Larger tap targets on small screens */
    button,
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
    }

    .close {
        width: 44px;
        height: 44px;
        font-size: 36px;
    }

    /* More padding for easier scrolling */
    .modal-content {
        padding: 24px 16px;
        max-height: 90vh;
        max-height: 90dvh;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
}

/* Smooth Scrolling for All Mobile */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
    }

    /* Prevent bounce effect on body */
    body {
        overscroll-behavior-y: none;
    }
}
