/* 后台全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f0f2f5;
}
a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}
img {
    max-width: 100%;
}

/* 登录页 */
.login-page {
    background-color: #2563eb;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    width: 360px;
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.login-box h1 {
    text-align: center;
    font-size: 20px;
    color: #2563eb;
    margin-bottom: 5px;
}
.login-box .sub-title {
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 25px;
}
.login-box .form-item {
    margin-bottom: 18px;
}
.login-box .form-item label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #374151;
}
.login-box .form-item input {
    width: 100%;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
}
.login-box .form-item input:focus {
    border-color: #2563eb;
}
.btn-login {
    width: 100%;
    height: 42px;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 5px;
}
.login-box .tip {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 15px;
}

/* 后台布局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 200px;
    background-color: #1f2937;
    color: #d1d5db;
    flex-shrink: 0;
}
.logo {
    padding: 20px 15px;
    border-bottom: 1px solid #374151;
}
.logo h2 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 3px;
}
.logo p {
    font-size: 12px;
    color: #9ca3af;
}
.menu {
    padding: 10px 0;
}
.menu-item {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: #d1d5db;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.menu-item:hover {
    background-color: #374151;
    color: #fff;
}
.menu-item.logout {
    color: #f87171;
}
.menu-item.logout:hover {
    background-color: rgba(248,113,113,0.1);
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.top-bar {
    height: 50px;
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.breadcrumb {
    font-size: 14px;
    color: #6b7280;
}
.admin-info {
    font-size: 13px;
    color: #374151;
}
.content-wrap {
    flex: 1;
    padding: 20px;
}

/* 页面标题 */
.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.page-title h1 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}
.page-title p {
    font-size: 13px;
    color: #6b7280;
    margin-top: 3px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 0 16px;
    height: 34px;
    line-height: 34px;
    border-radius: 4px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-primary {
    background-color: #2563eb;
    color: #fff;
}
.btn-default {
    background-color: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}
.btn-danger {
    background-color: #ef4444;
    color: #fff;
}

/* 面板 */
.panel {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.panel-title {
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}
.panel-body {
    padding: 20px;
}

/* 统计卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.stat-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.stat-num {
    font-size: 28px;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 5px;
}
.stat-card.warn .stat-num {
    color: #f59e0b;
}
.stat-label {
    font-size: 13px;
    color: #6b7280;
}

/* 提示列表 */
.tip-list {
    font-size: 13px;
    color: #4b5563;
    line-height: 2;
    padding-left: 20px;
}
.tip-list li {
    list-style: decimal;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th {
    background-color: #f9fafb;
    text-align: left;
    padding: 12px;
    font-weight: 500;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}
.table td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}
.table tr:hover {
    background-color: #f9fafb;
}
.table .empty {
    text-align: center;
    padding: 40px 0;
    color: #9ca3af;
}
.table tr.level1 {
    background-color: #f9fafb;
}
.table tr.level2 {
    background-color: #fff;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
}
.tag.success {
    background-color: #d1fae5;
    color: #065f46;
}
.tag.danger {
    background-color: #fee2e2;
    color: #991b1b;
}
.tag.warn {
    background-color: #fef3c7;
    color: #92400e;
}
.tag.info {
    background-color: #dbeafe;
    color: #1e40af;
}
.tag.default {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* 链接操作 */
.link {
    color: #2563eb;
    font-size: 13px;
    margin-right: 10px;
}
.link.danger {
    color: #ef4444;
}

/* 缩略图 */
.thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}
.no-img {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    color: #9ca3af;
    font-size: 12px;
    border-radius: 4px;
}

/* 搜索表单 */
.search-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.search-item {
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-item input,
.search-item select {
    height: 34px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    width: 200px;
}

/* 表单 */
.form-box {
    max-width: 600px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.form-item {
    margin-bottom: 18px;
}
.form-item label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}
.form-item input,
.form-item textarea,
.form-item select {
    width: 100%;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    outline: none;
    background-color: #fff;
}
.form-item textarea {
    height: auto;
    padding: 8px 10px;
    resize: vertical;
    font-family: inherit;
}
.form-item input:focus,
.form-item textarea:focus,
.form-item select:focus {
    border-color: #2563eb;
}
.form-tip {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 5px;
}
.logo-preview {
    margin-bottom: 10px;
}
.logo-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* 分页 */
.pager {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f3f4f6;
    margin-top: 10px;
}
.page-item {
    padding: 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    color: #374151;
    background-color: #fff;
}
.page-info {
    font-size: 13px;
    color: #6b7280;
}

/* 申请详情 */
.apply-detail {
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 6px;
}
.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-row .label {
    width: 100px;
    color: #6b7280;
    flex-shrink: 0;
}
.detail-row .value {
    flex: 1;
    color: #374151;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .logo h2, .logo p, .menu-item span {
        display: none;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
