/**
 * 德云付服务商管理系统 - 样式
 */

/* ===== 布局 ===== */
.app-layout {
    min-height: 100vh;
    background: #f5f7fa;
}

/* ===== 侧边栏 ===== */
.app-sidebar {
    width: 250px;
    background: #1e293b;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 18px 20px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-brand i { font-size: 22px; color: #3b82f6; }

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}
.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.sidebar-link.active {
    color: #fff;
    background: rgba(59,130,246,0.2);
    border-right: 3px solid #3b82f6;
}
.sidebar-link i { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
}
.user-info i { font-size: 18px; }

/* ===== 顶栏 ===== */
.app-topbar {
    position: fixed;
    top: 0; left: 250px; right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 999;
}

.sidebar-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 22px;
    color: #64748b;
    cursor: pointer;
}

/* ===== 主内容 ===== */
.app-main {
    margin-left: 250px;
    margin-top: 56px;
    padding: 24px;
    min-height: calc(100vh - 56px);
}

.app-footer {
    margin-left: 250px;
    text-align: center;
    padding: 16px;
    color: #94a3b8;
    font-size: 13px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

/* ===== 卡片 ===== */
.card-stats {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}
.card-stats:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.card-stats .stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.card-stats .stat-value {
    font-size: 28px;
    font-weight: 700;
}
.card-stats .stat-label {
    font-size: 13px;
    color: #64748b;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast-notify {
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
    display: flex; align-items: center; gap: 8px;
}
.toast-notify.success { background: #10b981; }
.toast-notify.error   { background: #ef4444; }
.toast-notify.warning { background: #f59e0b; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main, .app-footer { margin-left: 0; }
    .app-topbar { left: 0; }
    .sidebar-toggle { display: block; }
}

/* ===== 登录页 ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: 400px;
    max-width: 90vw;
    border-radius: 16px;
}

/* ===== 通用 ===== */
.table > :not(caption) > * > * {
    vertical-align: middle;
}
.cursor-pointer { cursor: pointer; }
