﻿/* 熊猫店长管理系统样式 */

:root {
    --primary: #1ab394;
    --primary-dark: #18a689;
    --dark-bg: #2f4050;
    --dark-sub: #293846;
    --text-dark: #337ab7;
    --text-gray: #a7b1c2;
    --sidebar-width: 220px;
    --header-bg: #f3f3f4;
    --border-color: #e7eaec;
    --font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: var(--font-family);
    background: #f5f5f5;
    overflow: hidden;
}

body.fixed-sidebar.full-height-layout {
    overflow: hidden;
}

#wrapper {
    display: flex;
    height: 100vh;
}

/* ===== 左侧导航 ===== */
.navbar-default {
    width: var(--sidebar-width);
    background: var(--dark-bg);
    color: #fff;
    flex-shrink: 0;
    transition: width 0.3s;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
}

.nav-close {
    display: none;
}

.sidebar-collapse {
    height: 100%;
}

#side-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

#side-menu li {
    position: relative;
}

#side-menu > li > a {
    display: block;
    padding: 12px 20px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

#side-menu > li > a:hover {
    color: #fff;
    background: var(--dark-sub);
}

#side-menu > li.active > a {
    color: #fff;
    background: var(--dark-sub);
    border-left-color: var(--primary);
}

#side-menu .nav-label {
    margin-left: 5px;
}

#side-menu .fa.arrow {
    float: right;
    margin-top: 3px;
    font-size: 10px;
    transition: transform 0.2s;
}

#side-menu li.active > a > .fa.arrow {
    transform: rotate(90deg);
}

/* 二级菜单 */
.nav-second-level {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--dark-sub);
}

.nav-second-level li a {
    display: block;
    padding: 10px 20px 10px 52px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 12.5px;
    transition: all 0.2s;
}

.nav-second-level li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.nav-second-level li.active a {
    color: #fff;
}

/* 三级菜单 */
.nav-third-level {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #1e2c3a;
}

.nav-third-level li a {
    display: block;
    padding: 8px 20px 8px 72px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 12px;
}

.nav-third-level li a:hover {
    color: #fff;
}

/* 用户头像区域 */
.nav-header {
    padding: 20px 20px 15px;
    text-align: center;
    background: var(--dark-sub);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-header .img-circle {
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1);
}

.nav-header .profile-element .block {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: 14px;
}

.nav-header .dropdown-menu {
    min-width: 160px;
    margin-top: 5px;
}

.nav-header .dropdown-menu a {
    padding: 8px 16px;
    font-size: 13px;
}

.nav-header .dropdown-menu .dropdown-divider {
    margin: 4px 0;
}

/* ===== 右侧区域 ===== */
#page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f5f5f5;
}

/* 顶部导航 */
.navbar-static-top {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.navbar-header {
    display: flex;
    align-items: center;
}

.navbar-minimalize {
    padding: 8px 12px;
    font-size: 16px;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.navbar-minimalize:hover {
    background: #eee;
    color: #333;
}

.navbar-top-links {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.navbar-top-links > li > a {
    display: block;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.navbar-top-links > li > a:hover {
    background: #eee;
}

.navbar-top-links .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 160px;
    margin-top: 2px;
}

.navbar-top-links .dropdown-menu a {
    padding: 8px 16px;
    font-size: 13px;
}

/* Tab页签区域 */
.tabs-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.nav-tabs {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 5px;
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.nav-tabs .nav-item {
    margin-bottom: 0;
    white-space: nowrap;
}

.nav-tabs .nav-link {
    border: none;
    padding: 10px 18px;
    font-size: 13px;
    color: #555;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    background: #f5f5f5;
    color: #333;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

.tab-close {
    margin-left: 6px;
    font-size: 11px;
    opacity: 0.6;
    cursor: pointer;
}

.tab-close:hover {
    opacity: 1;
}

.tab-content {
    flex: 1;
    min-height: 0;
    position: relative;
}

.tab-pane {
    height: 100%;
    display: none;
}

.tab-pane.active {
    display: block;
}

.content-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== 小屏适配 ===== */
body.mini-navbar .navbar-default {
    width: 60px;
}

body.mini-navbar .nav-label,
body.mini-navbar .nav-header .block,
body.mini-navbar .nav-header .dropdown-toggle .caret,
body.mini-navbar .fa.arrow,
body.mini-navbar .nav-second-level,
body.mini-navbar .nav-third-level {
    display: none !important;
}

body.mini-navbar .nav-header {
    padding: 15px 5px;
}

body.mini-navbar .nav-header img {
    width: 40px;
    height: 40px;
}

body.mini-navbar #side-menu > li > a {
    text-align: center;
    padding: 15px 0;
}

body.mini-navbar #side-menu > li > a i:first-child {
    font-size: 18px;
    margin: 0;
}

/* ===== 返回顶部 ===== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 35px;
    height: 35px;
    text-align: center;
    line-height: 35px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    border-radius: 4px;
    display: none;
    transition: all 0.3s;
}

#back-to-top:hover {
    background: var(--primary-dark);
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

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

/* ===== 动画 ===== */
.animated {
    animation-duration: 0.3s;
    animation-fill-mode: both;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fadeInRight {
    animation-name: fadeInRight;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fadeIn {
    animation-name: fadeIn;
}

/* ===== 通用工具类 ===== */
.gray-bg { background: #f5f5f5; }
.white-bg { background: #fff; }
.m-t-xs { margin-top: 5px; }
.m-t-sm { margin-top: 10px; }
.m-t-md { margin-top: 15px; }
.m-b-md { margin-bottom: 15px; }
.p-sm { padding: 10px; }
.p-md { padding: 15px; }
.p-lg { padding: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-navy { color: var(--primary); }
.font-bold { font-weight: 700; }

/* ===== 通用按钮 ===== */
.btn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-success {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-success:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-white {
    background: #fff;
    color: #333;
    border-color: #e0e0e0;
}

.btn-white:hover {
    background: #f5f5f5;
}

.btn-warning {
    background: #f8ac59;
    color: #fff;
    border-color: #f8ac59;
}

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

.btn-primary {
    background: #1c84c6;
    color: #fff;
    border-color: #1c84c6;
}

.btn-info {
    background: #23c6c8;
    color: #fff;
    border-color: #23c6c8;
}

/* wrapper content */
.wrapper-content {
    padding: 20px;
}
