/* Admin Notice — bell, panel, dashboard banner */

.oms-notice-wrap {
    position: relative;
    z-index: 10100;
    overflow: visible;
}

.oms-notice-bell {
    position: relative;
}

.oms-notice-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

.oms-notice-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(380px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    z-index: 40000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.oms-notice-panel[hidden] {
    display: none !important;
}

.oms-notice-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
}

.oms-notice-panel-head strong {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oms-notice-mark-all {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.oms-notice-mark-all:hover {
    background: rgba(255, 255, 255, 0.22);
}

.oms-notice-list {
    overflow-y: auto;
    padding: 8px;
    flex: 1;
}

.oms-notice-empty {
    margin: 20px 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.oms-notice-item {
    position: relative;
    display: block;
    padding: 12px 12px 12px 18px;
    border-radius: 10px;
    margin-bottom: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: inherit;
    pointer-events: auto;
    transition: background 0.15s, border-color 0.15s;
}

.oms-notice-item:hover {
    background: #f1f5f9;
}

.oms-notice-item.is-unread {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.oms-notice-item.is-important.is-unread {
    background: #fff7ed;
    border-color: #fed7aa;
}

.oms-notice-item.is-important h4 {
    color: #c2410c;
}

.oms-notice-dot {
    position: absolute;
    left: 8px;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
}

.oms-notice-item.is-important .oms-notice-dot {
    background: #f97316;
}

.oms-notice-item h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.oms-notice-mod {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #334155;
}

.oms-notice-mod.is-admin { background: #e0e7ff; color: #3730a3; }
.oms-notice-mod.is-mail { background: #ffedd5; color: #c2410c; }
.oms-notice-mod.is-leave { background: #d1fae5; color: #047857; }
.oms-notice-mod.is-stores { background: #ede9fe; color: #6d28d9; }
.oms-notice-mod.is-vehicle { background: #fee2e2; color: #b91c1c; }
.oms-notice-mod.is-archive { background: #e0f2fe; color: #0369a1; }
.oms-notice-mod.is-files { background: #f1f5f9; color: #0f172a; }
.oms-notice-mod.is-event { background: #fce7f3; color: #be185d; }

.oms-notice-item .oms-notice-body {
    margin: 0 0 8px;
    font-size: 12px;
    color: #475569;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.oms-notice-item footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: #94a3b8;
}

.oms-notice-open {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #4f46e5;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
}

.oms-notice-open:hover {
    background: #4338ca;
    color: #fff !important;
}

.oms-notice-open i {
    font-size: 10px;
}

.oms-notice-manage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.oms-notice-manage:hover {
    background: #f1f5f9;
    color: #4338ca;
}

.oms-notice-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 22px;
    border-radius: 14px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

.oms-notice-banner.is-important {
    border-color: #fdba74;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.15);
}

.oms-notice-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #4f46e5;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.oms-notice-banner.is-important .oms-notice-banner-icon {
    background: #ea580c;
}

.oms-notice-banner-text {
    flex: 1;
    min-width: 0;
}

.oms-notice-banner-text strong {
    display: block;
    font-size: 15px;
    color: #1e1b4b;
    margin-bottom: 4px;
}

.oms-notice-banner.is-important .oms-notice-banner-text strong {
    color: #9a3412;
}

.oms-notice-banner-text p {
    margin: 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.45;
}

.oms-notice-banner-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.oms-notice-banner-read {
    border: none;
    background: #4f46e5;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.oms-notice-banner.is-important .oms-notice-banner-read {
    background: #ea580c;
}

.oms-notice-banner-read:hover {
    filter: brightness(1.08);
}

.oms-notice-banner-more {
    font-size: 11px;
    color: #64748b;
}

html[data-theme="dark"] .oms-notice-panel {
    background: #1e293b;
    border-color: #334155;
}

html[data-theme="dark"] .oms-notice-item {
    background: #0f172a;
    border-color: #334155;
    color: inherit;
}

html[data-theme="dark"] .oms-notice-item h4 {
    color: #f1f5f9;
}

html[data-theme="dark"] .oms-notice-item .oms-notice-body {
    color: #cbd5e1;
}

@media (max-width: 640px) {
    .oms-notice-banner {
        flex-wrap: wrap;
    }
    .oms-notice-banner-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
