/* 广东兰凯律师事务所 - 后台管理系统样式 */

/* ========== 登录页 ========== */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4B0082 0%, #2E0052 50%, #1a0033 100%);
    position: relative;
    overflow: hidden;
}

.admin-login::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(106, 13, 173, 0.15);
    top: -200px;
    right: -100px;
}

.admin-login::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(106, 13, 173, 0.1);
    bottom: -150px;
    left: -50px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 40px;
    border-radius: 4px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.login-box h3 {
    text-align: center;
    color: #4B0082;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.login-box .subtitle {
    text-align: center;
    color: #999;
    font-size: 13px;
    margin-bottom: 35px;
}

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

.login-box .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.login-box .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.login-box .form-group input:focus {
    border-color: #4B0082;
    box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.1);
}

.login-box button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4B0082, #6A0DAD);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    letter-spacing: 4px;
    transition: opacity 0.3s;
    margin-top: 10px;
}

.login-box button[type="submit"]:hover {
    opacity: 0.9;
}

/* ========== 后台布局 ========== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 230px;
    background: linear-gradient(180deg, #2E0052 0%, #1a0033 100%);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 2px;
}

.sidebar-header p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li a {
    display: block;
    padding: 13px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-menu li a.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-left-color: #C9A96E;
}

.sidebar-menu li a .icon {
    margin-right: 8px;
    font-size: 12px;
}

.admin-main {
    margin-left: 230px;
    flex: 1;
    background: #f5f5f5;
    min-height: 100vh;
}

.admin-header {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header h4 {
    font-size: 17px;
    color: #333;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.user-info a {
    color: #4B0082;
    cursor: pointer;
}

.user-info a:hover {
    text-decoration: underline;
}

.admin-content {
    padding: 25px 30px;
}

/* ========== 统计卡片 ========== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border: 1px solid #e0e0e0;
    text-align: center;
    transition: box-shadow 0.3s;
}

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

.stat-card h5 {
    font-size: 13px;
    color: #999;
    font-weight: 400;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-card .number {
    font-size: 32px;
    color: #4B0082;
    font-weight: 700;
}

/* ========== 数据表格 ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.data-table th {
    background: #f8f8f8;
    color: #666;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.data-table .tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    border-radius: 2px;
    background: #f0e6ff;
    color: #4B0082;
}

.data-table .tag-green {
    background: #e6f9e6;
    color: #2e7d32;
}

.data-table .tag-red {
    background: #ffe6e6;
    color: #c62828;
}

.data-table .actions {
    display: flex;
    gap: 10px;
}

.data-table .actions a,
.data-table .actions button {
    font-size: 13px;
    color: #4B0082;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.data-table .actions a:hover,
.data-table .actions button:hover {
    color: #6A0DAD;
}

.data-table .actions .btn-delete {
    color: #c62828;
}

.data-table .actions .btn-delete:hover {
    color: #e53935;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #4B0082, #6A0DAD);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    color: #fff;
}

.btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-danger {
    background: #c62828;
    color: #fff;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* ========== 表单 ========== */
.admin-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
}

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

.admin-form .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.admin-form .form-group input,
.admin-form .form-group select,
.admin-form .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    outline: none;
}

.admin-form .form-group input:focus,
.admin-form .form-group select:focus,
.admin-form .form-group textarea:focus {
    border-color: #4B0082;
    box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.08);
}

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

.admin-form .form-group small {
    display: block;
    margin-top: 4px;
    color: #999;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 10px;
}

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

/* ========== 标签输入 ========== */
.tag-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 42px;
    align-items: center;
    cursor: text;
    transition: border-color 0.3s;
}

.tag-input-wrapper:focus-within {
    border-color: #4B0082;
}

.tag-input-wrapper .tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #f0e6ff;
    color: #4B0082;
    font-size: 12px;
    border-radius: 2px;
}

.tag-input-wrapper .tag-item .remove-tag {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #999;
    margin-left: 2px;
}

.tag-input-wrapper .tag-item .remove-tag:hover {
    color: #c62828;
}

.tag-input-wrapper input {
    border: none !important;
    outline: none !important;
    padding: 4px 0 !important;
    box-shadow: none !important;
    flex: 1;
    min-width: 80px;
    font-size: 13px;
}

/* ========== 栏目管理 ========== */
.column-list {
    list-style: none;
}

.column-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 8px;
    transition: box-shadow 0.3s;
}

.column-item:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.column-item .column-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.column-item .column-drag {
    cursor: grab;
    color: #ccc;
    font-size: 18px;
    user-select: none;
}

.column-item .column-name {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.column-item .column-slug {
    font-size: 12px;
    color: #999;
}

.column-item .column-count {
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.column-item .column-actions {
    display: flex;
    gap: 10px;
}

/* ========== 消息提示 ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: #2e7d32;
}

.toast-error {
    background: #c62828;
}

.toast-info {
    background: #4B0082;
}

/* ========== 确认弹窗 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-box h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
}

.modal-box p {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-box .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #ccc;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 14px;
    color: #999;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
    }

    .admin-main {
        margin-left: 0;
    }

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

    .stat-cards {
        grid-template-columns: 1fr;
    }

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

    .login-box {
        padding: 35px 25px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
