  /* Giao diện Admin Dashboard cho Sổ tay Kết cấu */
  .handbook-wrapper {
    display: flex;
    min-height: calc(100vh - 4.5rem);
    background: #f8fafc;
  }

  /* Sidebar phong cách Admin */
  .handbook-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
  }
  .sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
  }
  .sidebar-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .sidebar-badge {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
  }
  .sidebar-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
  }

  .sidebar-menu {
    padding: 1rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
  }
  .menu-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.75rem 0.35rem;
  }
  .menu-item-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
  }
  .menu-item-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
  }
  .menu-item-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  }
  .menu-item-btn .menu-icon {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
  }

  .sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
  }
  .btn-back-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
  }
  .btn-back-home:hover {
    color: var(--primary);
  }

  /* Main Content Area */
  .handbook-content {
    flex-grow: 1;
    padding: 2rem 2.5rem;
    max-width: 1100px;
  }

  .content-header {
    margin-bottom: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .content-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
  }
  .content-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
  }
  .tcvn-badge {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
  }

  /* Card Máy tính kết cấu */
  .calc-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
  }

  .calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .form-group {
    margin-bottom: 1rem;
  }
  .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
  }
  .form-control-calc {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    color: var(--text-primary);
    background: #ffffff;
    transition: border-color 0.15s ease;
  }
  .form-control-calc:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  }

  .calc-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
  }
  .btn-calc-execute {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .btn-calc-execute:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
  }

  /* Hộp Kết quả Tính toán */
  .result-box {
    margin-top: 1.75rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
  }
  .result-box.pass {
    background: #f0fdf4;
    border-color: #bbf7d0;
  }
  .result-box.fail {
    background: #fef2f2;
    border-color: #fecaca;
  }
  .result-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .result-title.pass { color: #15803d; }
  .result-title.fail { color: #b91c1c; }

  .result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  .result-item {
    background: #ffffff;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,0,0,0.06);
  }
  .result-item-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
  }
  .result-item-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
  }

  /* Ẩn hiện tab */
  .tab-pane {
    display: none;
  }
  .tab-pane.active {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Table tra cứu thép */
  .rebar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
  }
  .rebar-table th, .rebar-table td {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    text-align: center;
  }
  .rebar-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: var(--text-primary);
  }
  .rebar-table tr:hover {
    background: var(--primary-light);
  }

  /* Khối Tri Ân Tác Giả & Tải PDF Gốc */
  .author-tribute-card {
    background: #ffffff;
    border: 1px solid #d1fae5;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
  }
  .tribute-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
  }
  .tribute-badge .badge-icon {
    font-size: 0.9rem;
  }
  .tribute-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
  }
  .tribute-title-wrap {
    flex: 1;
    min-width: 280px;
  }
  .tribute-book-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    line-height: 1.3;
  }
  .tribute-author {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
  }
  .tribute-author strong {
    color: #065f46;
    font-weight: 700;
  }
  .tribute-sep {
    color: #94a3b8;
    font-size: 0.75rem;
  }
  .btn-download-pdf-source {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .btn-download-pdf-source:hover {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
  }
  .btn-download-pdf-source svg {
    flex-shrink: 0;
  }
  .tribute-message {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.55;
  }

  /* ==================== CẤU TRÚC THẺ (CARD) SỔ TAY KẾT CẤU ==================== */
  @media (min-width: 901px) {
    .handbook-card {
      display: contents;
    }
    .mobile-card-header {
      display: none !important;
    }
  }

  @media (max-width: 900px) {
    .handbook-wrapper { 
      flex-direction: column; 
    }
    /* Ẩn sidebar cuộn ngang cũ trên mobile */
    .handbook-sidebar { 
      display: none !important; 
    }

    .handbook-content { 
      padding: 0.85rem 0.65rem 3rem; 
      width: 100%;
      box-sizing: border-box;
    }

    .author-tribute-card {
      margin-bottom: 1rem;
      padding: 1rem;
    }
    .tribute-header { 
      flex-direction: column; 
      align-items: stretch; 
      gap: 0.75rem;
    }
    .tribute-book-title {
      font-size: 1.15rem;
    }
    .btn-download-pdf-source { 
      justify-content: center; 
      width: 100%; 
    }

    /* Danh sách Thẻ dọc (Vertical Cards / Accordion) */
    .handbook-card {
      display: block;
      margin-bottom: 0.65rem;
      border-radius: 12px;
      background: transparent;
      transition: all 0.2s ease;
    }

    .mobile-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.95rem 1.15rem;
      background: #ffffff;
      border: 1px solid var(--border-color);
      border-radius: 12px;
      cursor: pointer;
      user-select: none;
      transition: all 0.2s ease;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
      -webkit-tap-highlight-color: transparent;
    }

    .mobile-card-header:active {
      background: #f8fafc;
      transform: scale(0.99);
    }

    .mobile-card-header.active {
      background: #f0fdf4;
      border-color: #86efac;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      border-bottom: 1px dashed #bbf7d0;
      box-shadow: 0 2px 6px rgba(21, 128, 61, 0.08);
    }

    .card-header-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex: 1;
      min-width: 0;
    }

    .card-icon {
      font-size: 1.45rem;
      line-height: 1;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2.2rem;
      height: 2.2rem;
      background: #f8fafc;
      border-radius: 8px;
    }

    .mobile-card-header.active .card-icon {
      background: #dcfce7;
    }

    .card-title-group {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
      min-width: 0;
    }

    .card-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #0f172a;
      line-height: 1.3;
    }

    .card-subtitle {
      font-size: 0.75rem;
      color: #64748b;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .card-chevron {
      color: #94a3b8;
      transition: transform 0.25s ease;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      margin-left: 0.5rem;
    }

    .mobile-card-header.active .card-chevron {
      transform: rotate(180deg);
      color: var(--primary);
    }

    /* Ẩn tab-pane mặc định, chỉ hiện khi cha hoặc tab active */
    .handbook-card .tab-pane {
      display: none;
    }

    .handbook-card.active .tab-pane.active {
      display: block;
      background: #ffffff;
      border: 1px solid #86efac;
      border-top: none;
      border-bottom-left-radius: 12px;
      border-bottom-right-radius: 12px;
      padding: 1.15rem 0.9rem;
      margin-bottom: 0.65rem;
      box-shadow: 0 4px 14px rgba(21, 128, 61, 0.06);
      animation: fadeInCard 0.25s ease;
    }

    @keyframes fadeInCard {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .content-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
      margin-bottom: 1rem;
    }
    .content-header h1 {
      font-size: 1.15rem;
    }
    .calc-grid { 
      grid-template-columns: 1fr; 
      gap: 0.75rem;
    }
    .step-card {
      padding: 1rem 0.85rem;
    }
    .calc-card {
      padding: 1rem 0.85rem;
    }
    .form-group label {
      font-size: 0.82rem;
    }
    .form-control-calc {
      font-size: 0.88rem;
    }
  }

  /* ==================== CÁC PHONG CÁCH TIỆN ÍCH 3 BƯỚC ==================== */
  .step-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
  }
  .step-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
  }
  .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
  .step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
  }
  .dual-unit-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.2rem;
  }
  .preset-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
  }
  .preset-option-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
  }
  .preset-option-btn:hover {
    border-color: var(--primary);
    background: #f0fdf4;
  }
  .preset-option-btn.selected {
    border-color: var(--primary);
    background: #ecfdf5;
    box-shadow: 0 0 0 1px var(--primary);
  }
  .preset-option-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
  }
  .preset-option-size {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0.2rem 0;
  }
  .preset-option-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
  }
  .btn-export-pdf-calc {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
  }
  .btn-export-pdf-calc:hover {
    background: #1e5e24;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
  }
