/* 成都银发经济联盟管理系统 - 样式文件 */

/* 基础样式 */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #F5F7FA;
    color: #263238;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 水印样式 */
.watermark-container {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    display: flex;
    flex-wrap: wrap;
    transform: rotate(-45deg);
    opacity: 0.03;
}

.watermark-text {
    width: 20%;
    padding: 30px;
    font-size: 24px;
    font-weight: bold;
    color: #2E7D32;
    white-space: nowrap;
    text-align: center;
}

/* 工具类样式 */
.content-auto {
    content-visibility: auto;
}

.card-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sidebar-item-active {
    background-color: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
    border-left: 4px solid #2E7D32;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.9), #558B2F);
}

/* 表单样式 */
.form-input {
    width: 100%;
    padding-left: 2.5rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

/* 按钮样式 */
.btn-primary {
    background-color: #2E7D32;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: rgba(46, 125, 50, 0.9);
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* 卡片样式 */
.stat-card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 侧边栏样式 */
.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #374151;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background-color: #f3f4f6;
}

/* 表格样式 */
.data-table {
    width: 100%;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #374151;
}

.data-table td {
    padding: 0.75rem 1rem;
}

.data-table tr {
    border-bottom: 1px solid #e5e7eb;
}

.data-table tr:hover {
    background-color: #f9fafb;
}

/* 模态框样式 - 关键修复 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 42rem;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 证书样式 */
.certificate {
    width: 100%;
    max-width: 42rem;
    border: 8px solid rgba(46, 125, 50, 0.2);
    background-color: white;
    padding: 2rem;
    position: relative;
    aspect-ratio: 210/297;
}

.certificate-border {
    position: absolute;
    width: 5rem;
    height: 5rem;
}

.certificate-border-tl {
    top: 0;
    left: 0;
    border-top: 8px solid #2E7D32;
    border-left: 8px solid #2E7D32;
}

.certificate-border-tr {
    top: 0;
    right: 0;
    border-top: 8px solid #2E7D32;
    border-right: 8px solid #2E7D32;
}

.certificate-border-bl {
    bottom: 0;
    left: 0;
    border-bottom: 8px solid #2E7D32;
    border-left: 8px solid #2E7D32;
}

.certificate-border-br {
    bottom: 0;
    right: 0;
    border-bottom: 8px solid #2E7D32;
    border-right: 8px solid #2E7D32;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.badge-primary {
    background-color: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 16rem;
}

/* 文件上传样式 */
.file-upload-label {
    background-color: #e5e7eb;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.file-upload-label:hover {
    background-color: #d1d5db;
}

.file-upload-input {
    display: none;
}

/* 通知徽章 */
.notification-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    width: 1rem;
    height: 1rem;
    background-color: #ef4444;
    border-radius: 9999px;
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
    height: 1.25rem;
    width: 1.25rem;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 9999px;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* 产品卡片样式 */
.product-card {
    background-color: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-card-image {
    height: 12rem;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-content {
    padding: 1rem;
}

/* 设置页面样式 */
.settings-section {
    margin-bottom: 2rem;
}

.settings-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #263238;
    margin-bottom: 1rem;
}

/* 审核状态样式 */
.status-pending {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background-color: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    border-radius: 9999px;
}

.status-approved {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background-color: #d1fae5;
    color: #065f46;
    font-size: 0.75rem;
    border-radius: 9999px;
}

.status-rejected {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background-color: #fee2e2;
    color: #991b1b;
    font-size: 0.75rem;
    border-radius: 9999px;
}

/* Toast通知样式 */
.toast-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    color: white;
    transition: all 0.3s;
}

.toast-message.success {
    background-color: #22c55e;
}

.toast-message.error {
    background-color: #ef4444;
}

.toast-message.warning {
    background-color: #f59e0b;
}

.toast-message.info {
    background-color: #3b82f6;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* SAAS管理平台 工具网格样式 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.tool-card {
    background: #ffffff;
    border: 1px solid rgba(46, 125, 50, 0.15);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.tool-card:hover {
    transform: translateY(-6px);
    border-color: rgba(46, 125, 50, 0.5);
    box-shadow: 0 12px 32px rgba(46, 125, 50, 0.15);
}

.tool-icon {
    font-size: 52px;
    margin-bottom: 18px;
    display: inline-block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.12);
    filter: drop-shadow(0 0 10px rgba(46, 125, 50, 0.3));
}

.tool-name {
    font-size: 20px;
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.tool-card:hover .tool-name {
    color: #0d3c12;
}

.tool-desc {
    font-size: 14px;
    color: #2e7d32;
    opacity: 0.75;
    line-height: 1.5;
}

.tool-sub-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.tool-sub-badge {
    font-size: 11px;
    font-weight: 500;
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.06);
    border: 1px solid rgba(46, 125, 50, 0.2);
    border-radius: 6px;
    padding: 3px 8px;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-sub-badge {
    background: rgba(46, 125, 50, 0.15);
    border-color: rgba(46, 125, 50, 0.5);
    color: #0d3c12;
}

/* 动效提示框 (Modern Alert) */
.modern-alert-container {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 90%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(46, 125, 50, 0.5);
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modern-alert-container.show {
    top: 24px;
    opacity: 1;
}

.modern-alert-container.fade-out {
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
    top: 10px;
}

.modern-alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.modern-alert-icon {
    font-size: 20px;
    animation: pulseIcon 1.5s infinite;
}

.modern-alert-message {
    font-size: 14px;
    font-weight: 500;
    color: #1b5e20;
    flex: 1;
}

.modern-alert-close {
    background: none;
    border: none;
    color: #66bb6a;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.modern-alert-close:hover {
    color: #1b5e20;
}

@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 4px rgba(46, 125, 50, 0.5)); }
    100% { transform: scale(1); }
}
