/* Common styles for Taoist Temple Systems with Traditional Chinese Style */
:root {
    --primary-color: #862a0e; /* 道教赤红色 */
    --secondary-color: #1c3144; /* 深邃蓝黑色 */
    --accent-color: #d4af37; /* 金色点缀 */
    --light-bg: #f7f2e9; /* 淡黄纸色背景 */
    --dark-bg: #3a2921; /* 深木色 */
    --text-color: #342e2b; /* 墨色文字 */
    --light-text: #fdf5e6; /* 米白色文字 */
    --border-radius: 6px;
    --box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    --gold-gradient: linear-gradient(135deg, #d4af37 0%, #f9df74 50%, #d4af37 100%);
    --wood-texture: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23433029'/%3E%3Cpath d='M0 0h100v25H0z' fill='%233a2921' fill-opacity='.4'/%3E%3Cpath d='M0 25h100v25H0z' fill='%233a2921' fill-opacity='.3'/%3E%3Cpath d='M0 50h100v25H0z' fill='%233a2921' fill-opacity='.2'/%3E%3Cpath d='M0 75h100v25H0z' fill='%233a2921' fill-opacity='.1'/%3E%3C/svg%3E");
    --paper-texture: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='%23f7f2e9'/%3E%3Cpath d='M0 0h100v100H0z' fill='%23e9dfd5' fill-opacity='.2'/%3E%3C/svg%3E");
}

@font-face {
    font-family: 'FangSong';
    src: local('FangSong'), local('仿宋');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'FangSong', 'Microsoft YaHei', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    background-image: var(--paper-texture);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: var(--dark-bg);
    background-image: var(--wood-texture);
    color: var(--light-text);
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-bottom: 2px solid var(--accent-color);
}

header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: normal;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header .logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

header .back-link {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-text);
    text-decoration: none;
    border: 1px solid var(--accent-color);
    padding: 5px 10px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

header .back-link:hover {
    background-color: var(--accent-color);
    color: var(--dark-bg);
}

.card {
    background-color: white;
    background-image: var(--paper-texture);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(210, 175, 55, 0.2);
}

.card-title {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--primary-color);
    font-weight: normal;
    letter-spacing: 1px;
    font-size: 22px;
    position: relative;
}

.card-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--gold-gradient);
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-family: 'FangSong', 'Microsoft YaHei', Arial, sans-serif;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #9f3110;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-primary:hover {
    background-color: #9f3110;
}

.btn-secondary {
    background-color: #5d6e7d;
    color: var(--light-text);
}

.btn-secondary:hover {
    background-color: #4a5a69;
}

.btn-success {
    background-color: #3a6351;
    color: var(--light-text);
}

.btn-success:hover {
    background-color: #2a4d3e;
}

.btn-warning {
    background-color: #ba8a00;
    color: var(--light-text);
}

.btn-warning:hover {
    background-color: #946f00;
}

.btn-danger {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-danger:hover {
    background-color: #9f3110;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0c6b3;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    background-color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    font-family: 'FangSong', 'Microsoft YaHei', Arial, sans-serif;
}

.form-control:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233a2921' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: #e8f4f0;
    color: #2c5741;
    border-color: #3a6351;
}

.alert-info {
    background-color: #e9eef2;
    color: #1c3144;
    border-color: #1c3144;
}

.alert-warning {
    background-color: #fdf6e5;
    color: #7a5c00;
    border-color: #ba8a00;
}

.alert-danger {
    background-color: #f8e7e4;
    color: #862a0e;
    border-color: #862a0e;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    border: 1px solid #d0c6b3;
    border-radius: var(--border-radius);
    overflow: hidden;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #d0c6b3;
}

table th {
    background-color: var(--secondary-color);
    color: var(--light-text);
    font-weight: normal;
    letter-spacing: 1px;
}

table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.05);
}

table tbody tr:last-child td {
    border-bottom: none;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.widget {
    background-color: white;
    background-image: var(--paper-texture);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    position: relative;
    border: 1px solid rgba(210, 175, 55, 0.2);
    overflow: hidden;
}

.widget::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold-gradient);
}

.widget-title {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

.widget-value {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.widget-info {
    font-size: 14px;
    color: #666;
}

.widget-trend {
    font-size: 14px;
    margin-top: 5px;
}

.widget-trend.up {
    color: #3a6351;
}

.widget-trend.down {
    color: var(--primary-color);
}

.widget-trend.stable {
    color: #7a5c00;
}

.tabs {
    display: flex;
    margin-bottom: 25px;
    position: relative;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    background-color: rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    border: 1px solid #d0c6b3;
    padding: 0 10px;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    position: relative;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.tab.active {
    color: var(--primary-color);
    font-weight: bold;
}

.tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gold-gradient);
    transition: width 0.3s ease;
}

.tab.active::after {
    width: 80%;
}

.tab:hover::after {
    width: 40%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: var(--light-text);
    background-color: var(--dark-bg);
    background-image: var(--wood-texture);
    border-top: 2px solid var(--accent-color);
    letter-spacing: 1px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1;
}

.status-badge.success {
    background-color: #e8f4f0;
    color: #2c5741;
    border: 1px solid #3a6351;
}

.status-badge.warning {
    background-color: #fdf6e5;
    color: #7a5c00;
    border: 1px solid #ba8a00;
}

.status-badge.danger {
    background-color: #f8e7e4;
    color: #862a0e;
    border: 1px solid #862a0e;
}

.status-badge.online {
    background-color: #e8f4f0;
    color: #2c5741;
    border: 1px solid #3a6351;
}

.status-badge.offline {
    background-color: #f8e7e4;
    color: #862a0e;
    border: 1px solid #862a0e;
}

.status-badge.pending {
    background-color: #e9eef2;
    color: #1c3144;
    border: 1px solid #1c3144;
}

.feature-card {
    background-color: white;
    background-image: var(--paper-texture);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(210, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 30px 30px 0;
    border-color: transparent var(--primary-color) transparent transparent;
    opacity: 0.1;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-weight: normal;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(210, 175, 55, 0.2);
    padding-bottom: 10px;
}

.feature-card p {
    color: #666;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    header .logo, header .back-link {
        position: static;
        display: inline-block;
        transform: none;
        margin: 10px 0;
    }
    
    header {
        text-align: center;
        padding: 10px;
    }
}

.chart-container {
    background-color: rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(210, 175, 55, 0.2);
    position: relative;
}

.chart-container h3 {
    margin-top: 0;
    color: var(--secondary-color);
    font-weight: normal;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(210, 175, 55, 0.2);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.chart-container::before {
    content: "";
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='rgba(134, 42, 14, 0.2)' stroke-width='2' d='M12 2v20M2 12h20M4.93 4.93l14.14 14.14M4.93 19.07l14.14-14.14'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.color-dot.blue {
    background-color: #3498db;
}

.color-dot.green {
    background-color: #3a6351;
}

.color-dot.orange {
    background-color: #ba8a00;
}

.color-dot.red {
    background-color: var(--primary-color);
}

.color-box {
    width: 12px;
    height: 12px;
    margin-right: 5px;
    display: inline-block;
}

.chart-placeholder {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.pie-chart {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #f5f5f5;
    overflow: hidden;
    margin: 0 auto;
}

.pie-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    background-color: var(--color, #ccc);
    transition: all 0.3s ease;
}

.pie-segment:hover {
    transform: scale(1.03);
}

.dual-chart-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container.half-width {
    margin-bottom: 0;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    background-color: rgba(255,255,255,0.5);
    border-radius: var(--border-radius);
    padding: 15px;
    border: 1px solid rgba(210, 175, 55, 0.2);
}

.search-box {
    display: flex;
    flex: 1;
    position: relative;
}

.search-box input {
    flex: 1;
    padding-right: 35px;
}

.search-box .btn-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.btn-page {
    margin: 0 5px;
    padding: 5px 10px;
    background-color: transparent;
    border: 1px solid #d0c6b3;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-page.active,
.btn-page:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-numbers {
    display: flex;
    align-items: center;
}

.time-slot {
    border: 1px solid #d0c6b3;
    border-radius: var(--border-radius);
    padding: 10px;
    margin-bottom: 10px;
    background-color: rgba(255,255,255,0.5);
}

.slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-weight: bold;
}

.slot-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1;
}

.slot-status.full {
    background-color: #f8e7e4;
    color: #862a0e;
}

.slot-status.reserved {
    background-color: #fdf6e5;
    color: #7a5c00;
}

.slot-status.available {
    background-color: #e8f4f0;
    color: #2c5741;
}

.slot-info {
    font-size: 14px;
    color: #666;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    border-bottom: 1px solid rgba(210, 175, 55, 0.3);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: normal;
    letter-spacing: 0.5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: #3a6351;
}

.toggle-switch input:checked + label:before {
    transform: translateX(34px);
}

.toggle-label {
    margin-left: 70px;
}

.range-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-input input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 5px;  
    background: #d0c6b3;
    outline: none;
}

.range-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%; 
    background: var(--primary-color);
    cursor: pointer;
}

.range-value {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
}

.system-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(210, 175, 55, 0.2);
}

.info-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
}

.info-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.info-value {
    font-size: 14px;
    font-weight: bold;
}

.info-value.success {
    color: #3a6351;
}

.settings-actions {
    margin-top: 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* 添加中国传统装饰元素 */
.container::before {
    content: "";
    position: fixed;
    top: 20px;
    left: 20px;
    width: 100px;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' width='100' height='100'%3E%3Cpath d='M50 0C22.4 0 0 22.4 0 50s22.4 50 50 50 50-22.4 50-50S77.6 0 50 0zm0 92c-23.2 0-42-18.8-42-42s18.8-42 42-42 42 18.8 42 42-18.8 42-42 42zm0-76c-18.8 0-34 15.2-34 34s15.2 34 34 34 34-15.2 34-34-15.2-34-34-34z' fill='rgba(212, 175, 55, 0.05)'/%3E%3Cpath d='M50 8C26.8 8 8 26.8 8 50s18.8 42 42 42 42-18.8 42-42S73.2 8 50 8zm0 76c-18.8 0-34-15.2-34-34s15.2-34 34-34 34 15.2 34 34-15.2 34-34 34z' fill='rgba(212, 175, 55, 0.05)'/%3E%3Cpath d='M50 92c-23.2 0-42-18.8-42-42s18.8-42 42-42 42 18.8 42 42-18.8 42-42 42zm0-76c-18.8 0-34 15.2-34 34s15.2 34 34 34 34-15.2 34-34-15.2-34-34-34z' fill='rgba(212, 175, 55, 0.05)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.container::after {
    content: "";
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 150px;
    height: 150px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' width='200' height='200'%3E%3Cpath d='M100,20 L120,60 L170,60 L130,90 L150,140 L100,110 L50,140 L70,90 L30,60 L80,60 Z' fill='none' stroke='rgba(134, 42, 14, 0.05)' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.security-map {
    margin-bottom: 30px;
}

.map-container {
    border: 1px solid rgba(210, 175, 55, 0.2) !important;
    border-radius: var(--border-radius);
    background-color: #f5f3ef !important;
}

@media (max-width: 768px) {
    .dashboard-widgets {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    header .logo, header .back-link {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        margin: 10px 0;
    }
    
    header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .dual-chart-container {
        grid-template-columns: 1fr;
    }
    
    .settings-container {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-bar > * {
        width: 100%;
    }
} 