/* SGEO.pro 后台管理系统样式 */

/* 登录页面 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black-primary);
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
}

.login-box {
    background: var(--black-secondary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 50px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo .logo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    font-size: 28px;
}

.login-logo .logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--white);
}

.login-error {
    color: var(--danger);
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
}

/* 后台布局 */
.admin-body {
    background: var(--black-primary);
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--black-secondary);
    border-right: 1px solid rgba(212, 175, 55, 0.1);
    padding: 30px 0;
    z-index: 100;
    overflow-y: auto;
}

.admin-logo {
    padding: 0 30px;
    margin-bottom: 40px;
}

.admin-logo .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.admin-logo .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.admin-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-primary);
}

.admin-logo .logo-sub {
    font-size: 10px;
    color: var(--gray);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.admin-menu {
    list-style: none;
}

.admin-menu-item {
    margin-bottom: 8px;
}

.admin-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 30px;
    color: var(--gray);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-menu-link:hover,
.admin-menu-link.active {
    background: rgba(212, 175, 55, 0.05);
    color: var(--gold-primary);
    border-left-color: var(--gold-primary);
}

.admin-menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.admin-main {
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
    flex: 1;
    background: var(--black-primary);
}

.admin-page {
    animation: fadeIn 0.3s ease;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.admin-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--white);
}

.admin-user {
    color: var(--gray);
    font-size: 14px;
}

.admin-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--black-secondary);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-4px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gold-primary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--gray);
    margin-top: 6px;
}

/* 表格 */
.admin-table {
    width: 100%;
    background: var(--black-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.admin-table th,
.admin-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table th {
    background: rgba(212, 175, 55, 0.05);
    font-size: 13px;
    font-weight: 600;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-table tr:hover {
    background: rgba(212, 175, 55, 0.02);
}

.admin-table td {
    font-size: 14px;
    color: var(--white);
}

.admin-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.admin-badge-pending { background: rgba(255, 193, 7, 0.2); color: #FFC107; }
.admin-badge-following { background: rgba(33, 150, 243, 0.2); color: #2196F3; }
.admin-badge-signed { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.admin-badge-active { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.admin-badge-disabled { background: rgba(244, 67, 54, 0.2); color: #F44336; }
.admin-badge-published { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.admin-badge-draft { background: rgba(158, 158, 158, 0.2); color: #9E9E9E; }

.admin-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.admin-btn-primary {
    background: var(--gold-primary);
    color: var(--black-primary);
}

.admin-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-btn-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.admin-btn:hover {
    opacity: 0.8;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 14px;
    background: var(--black-secondary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover,
.pagination button.active {
    background: var(--gold-primary);
    color: var(--black-primary);
    border-color: var(--gold-primary);
}

/* 弹窗 */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal.show {
    display: flex;
}

.modal-content {
    background: var(--black-secondary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--white);
}

.modal-body {
    color: var(--white);
}

/* 客户详情 */
.lead-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-item span {
    font-size: 15px;
    color: var(--white);
}

/* 跟进记录 */
.followups-list {
    max-height: 300px;
    overflow-y: auto;
}

.followup-item {
    padding: 16px;
    background: var(--black-primary);
    border-radius: 10px;
    margin-bottom: 12px;
}

.followup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.followup-user {
    font-size: 14px;
    font-weight: 500;
    color: var(--gold-primary);
}

.followup-date {
    font-size: 12px;
    color: var(--gray);
}

.followup-content {
    font-size: 14px;
    color: var(--white);
    line-height: 1.6;
}

/* 区块标题 */
.section-subtitle {
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
    margin-top: 40px;
}

/* 表单样式重写 */
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--black-primary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23D4AF37' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-select:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--black-primary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--black-primary);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
    min-height: 100px;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group .form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--white);
}

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

/* 响应式 */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 220px;
    }
    
    .admin-main {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .lead-info-grid,
    .form-row {
        grid-template-columns: 1fr;
    }
}
