* { margin: 0; padding: 0; box-sizing: border-box; overflow-anchor: none; }
body { font-family: "HarmonyOS Sans", "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #f0f2f5; }
.app-container { display: flex; height: 100vh; overflow: hidden; }

/* 左侧边栏 - 草绿色 */
.sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background: #00a9a5;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 10;
}
/* 运行在动听exe(有28px自绘标题栏)时，侧栏从标题栏下方开始 */
body.dt-shell .sidebar { top: 28px; }
.site-title {
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 20px;
    width: 100%;
    color: #ffffff;
    border-bottom: none;
    background-image: linear-gradient(to right, #ffffff, #ffffff);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: calc(100% - 40px) 2px;
}
.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 20px;
    width: 100%;
    align-items: center;
}
.nav-item {
    display: block;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.2s;
    font-size: 16px;
    text-align: center;
    width: 100%;
}
.nav-item:hover{
    background: #3ec9b0;
}
.logout-btn {
    flex-shrink: 0;
    padding: 16px 22px;
    text-align: left;
    border-top: none;
    margin-top: auto;
    width: 100%;
    position: relative;
}
.settings-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 8px;
    line-height: 0;
}
.settings-btn:hover { background: rgba(255,255,255,0.15); }
.settings-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 140px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    padding: 6px;
    z-index: 20;
}
.settings-menu a {
    display: block;
    padding: 11px 16px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    text-align: center;
}
.settings-menu a:hover { background: #f1f3f5; color: #333333; }
.main-content {
    flex: 1;
    min-width: 0;
    overflow-anchor: none;
    margin-left: 260px;
    padding: 30px 40px;
    background: #ffffff;
    overflow-y: auto;
    height: 100vh;
    box-shadow: -2px 0 10px rgba(0,0,0,0.05);
}
/* exe 下主体高度扣除28px标题栏 */
body.dt-shell .main-content { height: calc(100vh - 28px); }

/* 页面标题与搜索框间距 */
.main-content h1 {
    margin-bottom: 25px;
}

.search-bar { margin-bottom: 20px; }
.search-bar form { display: flex; gap: 10px; align-items: center; }
.search-bar input { flex: 1; padding: 8px 12px; border: 1px solid #ccc; border-radius: 6px; font-size: 14px; }
.search-bar button { padding: 8px 16px; background: #00a9a5; color: white; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; }
.search-bar button:hover { background: #0f756e; }
.clear-btn { padding: 8px 16px; background: #6c757d; color: white; border: none; border-radius: 6px; cursor: pointer; text-decoration: none; }

/* 保存/保存修改 主按钮 */
.save-btn { background: #00a9a5; color: #fff; border: none; padding: 8px 20px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.save-btn:hover { background: #0f756e; }
.note-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.note-table th, .note-table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid #ddd; }
.note-table th { background: #f8f9fa; font-weight: 600; }
.note-table tr:hover { background: #f1f3f5; }
.note-table td a { color: #2c3e50; text-decoration: none; }
.note-table td a:hover { color: #3498db; text-decoration: underline; }
.no-result { margin-top: 20px; color: #6c757d; }
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #e9ecef; }
.login-box { background: white; padding: 40px; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 360px; text-align: center; }
.login-box h2 { margin-bottom: 30px; color: #2c3e50; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.input-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 6px; }
.login-btn { width: 100%; padding: 10px; background: #0f756e; color: white; border: none; border-radius: 6px; cursor: pointer; }
.login-btn:hover { background: #0f5f57; }
.error-msg { color: #e74c3c; margin-bottom: 15px; }
@media (max-width: 700px) { .sidebar { width: 80px; } .site-title { font-size: 16px; padding: 20px 5px; } .nav-item { text-align: center; font-size: 12px; padding: 10px 5px; } .main-content { padding: 15px; } }

/* ===== 标签样式 ===== */
.tag-link {
    display: inline-block;
    background: #dcebe7;
    color: #0f5f57;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
    text-decoration: none;
    border: 1px solid #8fd4c9;
}
.tag-link:hover {
    background: #8fd4c9;
    text-decoration: none;
}

.no-tag {
    color: #bbb;
    font-size: 12px;
}

.tag-filter-bar {
    margin-bottom: 15px;
    padding: 10px;
    background: #dcebe7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.tag-filter-bar .tag {
    background: #0f5f57;
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 13px;
}

/* 标签输入框提示 */
.tag-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
/* ===== 详情页正文铺满右侧宽度(2026-08-31) ===== */
.print-area { width: 100% !important; box-sizing: border-box; }
.note-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-wrap: break-word;
}
.note-content img, .note-content table, .note-content video, .note-content iframe {
    max-width: 100%;
}

.m-topbar, .bottom-nav { display: none; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .app-container { display: block; }
  .main-content { padding: 0 0 80px; border-radius: 0; box-shadow: none; }
  .m-topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20;
    background: linear-gradient(135deg, #0f8f80, #0f756e);
    color: #ffffff; padding: 14px 16px;
  }
  .m-title { font-size: 18px; font-weight: bold; }
  .m-logout { color: #fff9c4; text-decoration: none; font-size: 14px; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: #ffffff; border-top: 1px solid #e0e0e0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bn-item {
    flex: 1; text-align: center; padding: 12px 0 8px;
    color: #555555; text-decoration: none; font-size: 13px;
  }
  .bn-new { font-size: 26px; line-height: 1; color: #0f756e; font-weight: bold; padding: 8px 0; }
  .bn-item:active { color: #0f756e; }
  /* 列表页表格 -> 卡片 */
  .note-table, .note-table tbody { display: block; }
  .note-table thead { display: none; }
  .note-table tr {
    display: block; background: #ffffff; margin: 0 12px 10px; padding: 12px 14px;
    border: 1px solid #eeeeee; border-radius: 10px;
  }
  .note-table td { display: block; border: none; padding: 3px 0; }
  .note-table td:first-child { font-size: 16px; font-weight: 600; }
  .note-table td:nth-child(2) { font-size: 12px; }
  .note-table td:nth-child(3), .note-table td:nth-child(4) { color: #999; font-size: 11px; }
  .search-bar form { flex-wrap: wrap; }
  .search-bar { padding: 12px; }
  .login-box { width: 90%; padding: 30px 20px; }
}

