/* ========================================
   通知公告系统样式
   ======================================== */

/* 全局公告横幅 - 顶部固定 */
.global-announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 50px 12px 20px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-bottom: 2px solid #F59E0B;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
    animation: slideDown 0.4s ease-out;
}

.global-announcement-banner.priority-high {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border-bottom-color: #EF4444;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

.global-announcement-banner.priority-medium {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-bottom-color: #F59E0B;
}

.global-announcement-banner.priority-low {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border-bottom-color: #3B82F6;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    width: 100%;
}

.banner-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.banner-icon.high {
    color: #DC2626;
}

.banner-icon.medium {
    color: #D97706;
}

.banner-icon.low {
    color: #2563EB;
}

.banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.banner-title {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
}

.banner-message {
    font-size: 13px;
    color: #4B5563;
}

.banner-details {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    font-size: 12px;
    color: #6B7280;
}

.banner-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.banner-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 6px 14px 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 20px;
    transition: all 0.2s ease;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.banner-close:hover {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.banner-close:hover svg {
    color: white;
}

.banner-close:active {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
}

.banner-close svg {
    width: 16px;
    height: 16px;
    color: #22C55E;
}

.banner-close span {
    white-space: nowrap;
}

/* 登录通知模态框 */
.login-notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.login-notification-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 560px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    animation: scaleIn 0.3s ease-out;
}

.notification-header {
    position: relative;
    padding: 24px 24px 16px;
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    color: white;
}

.notification-header.welcome {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
}

.notification-header.update {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
}

.notification-header.important {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.notification-header-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-header-icon svg {
    width: 28px;
    height: 28px;
}

.notification-header-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.notification-header-version {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.notification-header-date {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.notification-body {
    padding: 20px 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.notification-section {
    margin-bottom: 20px;
}

.notification-section:last-child {
    margin-bottom: 0;
}

.notification-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #E5E7EB;
}

.notification-section-icon {
    width: 18px;
    height: 18px;
}

.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #F9FAFB;
    border-radius: 8px;
    font-size: 13px;
    color: #4B5563;
    transition: all 0.2s ease;
}

.notification-list-item:hover {
    background: #F3F4F6;
    transform: translateX(4px);
}

.notification-list-item:last-child {
    margin-bottom: 0;
}

.notification-list-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
}

.notification-list-icon.new {
    color: #22C55E;
}

.notification-list-icon.improved {
    color: #22C55E;
}

.notification-list-icon.developing {
    color: #F59E0B;
}

.notification-footer {
    padding: 16px 24px;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: center;
}

.notification-confirm-btn {
    padding: 12px 48px;
    font-size: 15px;
    font-weight: 500;
    color: white;
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.notification-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

.notification-confirm-btn:active {
    transform: translateY(0);
}

/* 后台管理页面样式 */
.notification-admin-container {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.notification-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.notification-admin-title {
    font-size: 24px;
    font-weight: 600;
    color: #1F2937;
}

.notification-admin-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 12px;
}

.admin-tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    background: transparent;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-tab-btn:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.admin-tab-btn.active {
    background: #22C55E;
    color: white;
    border-color: #22C55E;
}

.notification-admin-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
}

.notification-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.notification-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
}

.notification-card-actions {
    display: flex;
    gap: 8px;
}

.notification-card-body {
    padding: 20px;
}

.notification-form-group {
    margin-bottom: 16px;
}

.notification-form-group:last-child {
    margin-bottom: 0;
}

.notification-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.notification-form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.notification-form-input:focus {
    outline: none;
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.notification-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.notification-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.notification-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #D1D5DB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-toggle-switch.active {
    background: #22C55E;
}

.notification-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.notification-toggle-switch.active::after {
    left: 22px;
}

.notification-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-btn-primary {
    color: white;
    background: #22C55E;
    border: none;
}

.notification-btn-primary:hover {
    background: #16A34A;
}

.notification-btn-secondary {
    color: #374151;
    background: white;
    border: 1px solid #D1D5DB;
}

.notification-btn-secondary:hover {
    background: #F3F4F6;
}

.notification-btn-danger {
    color: white;
    background: #EF4444;
    border: none;
}

.notification-btn-danger:hover {
    background: #DC2626;
}

/* 公告列表 */
.notification-list-table {
    width: 100%;
    border-collapse: collapse;
}

.notification-list-table th,
.notification-list-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.notification-list-table th {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #F9FAFB;
}

.notification-list-table td {
    font-size: 14px;
    color: #374151;
}

.notification-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.notification-status-badge.active {
    background: #DCFCE7;
    color: #166534;
}

.notification-status-badge.inactive {
    background: #F3F4F6;
    color: #6B7280;
}

.notification-priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.notification-priority-badge.high {
    background: #FEE2E2;
    color: #991B1B;
}

.notification-priority-badge.medium {
    background: #FEF3C7;
    color: #92400E;
}

.notification-priority-badge.low {
    background: #DBEAFE;
    color: #1E40AF;
}

/* 动画 */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .global-announcement-banner {
        padding: 10px 40px 10px 15px;
    }

    .banner-details {
        flex-direction: column;
        gap: 4px;
    }

    .login-notification-content {
        width: 95%;
        max-height: 90vh;
    }

    .notification-header {
        padding: 20px 20px 14px;
    }

    .notification-body {
        padding: 16px 20px;
    }

    .notification-footer {
        padding: 14px 20px;
    }

    .notification-confirm-btn {
        width: 100%;
    }

    .notification-admin-container {
        padding: 16px;
    }

    .notification-admin-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .notification-admin-tabs {
        flex-wrap: wrap;
    }

    .admin-tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .notification-list-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .banner-icon {
        display: none;
    }

    .notification-header-title {
        font-size: 18px;
    }

    .notification-section-title {
        font-size: 13px;
    }

    .notification-list-item {
        font-size: 12px;
    }
}

/* 内容编辑器样式 */
.notification-content-editor {
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    overflow: hidden;
}

.notification-content-editor-header {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.editor-btn {
    padding: 6px 12px;
    font-size: 13px;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    background: #F3F4F6;
}

.notification-content-editor-body {
    min-height: 150px;
    padding: 12px;
    font-size: 14px;
}

.notification-content-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
    background: #F9FAFB;
    border-radius: 6px;
}

.notification-content-item-input {
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
}

.notification-content-item-remove {
    padding: 8px;
    background: #FEE2E2;
    color: #DC2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.notification-content-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    color: #22C55E;
    background: #DCFCE7;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-content-add-btn:hover {
    background: #BBF7D0;
}
