.resource-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    padding: 14px;
    height: calc(100vh - 150px);
    overflow: hidden;
  }
  
  .resource-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    overflow: hidden;
  }
  
  .resource-summary-card,
  .resource-weekly-card,
  .resource-chat-panel {
    background: linear-gradient(180deg, #020817, #020617);
    border: 1px solid #1e3a5f;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    color: #e5e7eb;
  }
  
  .resource-summary-card {
    padding: 16px;
    overflow: hidden;
  }
  
  .resource-summary-header,
  .resource-weekly-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
  }
  
  .resource-summary-header h2,
  .resource-weekly-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
  }
  
  .resource-summary-header p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 12px;
  }
  
  .resource-summary-actions {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  .resource-summary-actions select {
    min-width: 190px;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 9px 12px;
    outline: none;
  }
  
  .resource-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
  }
  
  .resource-stat {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px;
  }
  
  .resource-stat .label {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    margin-bottom: 6px;
  }
  
  .resource-stat strong {
    font-size: 18px;
    color: #f8fafc;
  }
  

  
  .resource-matrix-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 12px;
  }
  
  .resource-matrix-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #020617;
    color: #cbd5e1;
    font-weight: 700;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #334155;
  }
  
  .resource-matrix-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.55);
    color: #e2e8f0;
  }
  
  .resource-matrix-table tbody tr:hover {
    background: rgba(14, 165, 233, 0.08);
  }
  
  .resource-weekly-card {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
  }
  
  .resource-weekly-grid {
    height: calc(100% - 38px);
    overflow: auto;
    border: 1px solid #1e293b;
    border-radius: 12px;
    background: #020617;
  }
  
  .resource-week-row {
    display: grid;
    grid-template-columns: 110px repeat(var(--week-count), 64px);
    min-width: max-content;
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  }
  
  .resource-week-row.header {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #020617;
  }
  
  .resource-week-role {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #020617;
    border-right: 1px solid #334155;
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
  }
  
  .resource-week-cell {
    min-height: 34px;
    padding: 7px 6px;
    border-right: 1px solid rgba(51, 65, 85, 0.55);
    font-size: 11px;
    color: #e2e8f0;
    text-align: center;
  }
  
  .resource-week-cell.active {
    background: rgba(37, 99, 235, 0.18);
  }
  
  .resource-week-cell.hot {
    background: rgba(220, 38, 38, 0.18);
  }
  
  .resource-chat-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  
  .resource-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
  }
  
  .resource-chat-message {
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 1.45;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.75);
  }
  
  .resource-chat-message.ai {
    border-color: #334155;
  }
  
  .resource-chat-message.user {
    border-color: #0e7490;
    background: rgba(14, 116, 144, 0.14);
  }
  
  .resource-chat-input {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid #1e293b;
  }
  
  .resource-chat-input textarea {
    flex: 1;
    resize: none;
    min-height: 46px;
    max-height: 110px;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 10px;
    outline: none;
  }
  
  .resource-chat-input button {
    align-self: stretch;
    min-width: 78px;
  }
  
  @media (max-width: 1180px) {
    .resource-layout {
      grid-template-columns: 1fr;
      height: auto;
      overflow: visible;
    }
  
    .resource-chat-panel {
      min-height: 360px;
    }
  }
  .resource-table-controls {
    display: flex;
    gap: 10px;
    margin: 8px 0 10px;
  }
  
  .resource-table-controls select,
  .resource-summary-actions select {
    appearance: none;
    background: #020617;
    color: #e5e7eb;
    border: 1px solid #1e3a5f;
    border-radius: 10px;
    padding: 8px 34px 8px 12px;
    font-size: 12px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.08);
  }
  
  .resource-table-controls select:focus,
  .resource-summary-actions select:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.18);
  }
  
  .resource-summary-card {
    max-height: 330px;
  }
  
  .resource-matrix-wrapper {
    max-height: 360px;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid #16324f;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.78);
  }
  .resource-weekly-card {
    min-height: 380px;
  }
  
  .resource-matrix-wrapper::-webkit-scrollbar,
  .resource-weekly-grid::-webkit-scrollbar,
  .resource-chat-messages::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  
  .resource-matrix-wrapper::-webkit-scrollbar-track,
  .resource-weekly-grid::-webkit-scrollbar-track,
  .resource-chat-messages::-webkit-scrollbar-track {
    background: #020617;
    border-radius: 999px;
  }
  
  .resource-matrix-wrapper::-webkit-scrollbar-thumb,
  .resource-weekly-grid::-webkit-scrollbar-thumb,
  .resource-chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0891b2, #1e40af);
    border-radius: 999px;
    border: 2px solid #020617;
  }
  
  .resource-matrix-wrapper::-webkit-scrollbar-thumb:hover,
  .resource-weekly-grid::-webkit-scrollbar-thumb:hover,
  .resource-chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #06b6d4, #2563eb);
  }

  .resource-summary-card {
    padding: 10px 14px;
    max-height: 230px;
    overflow: hidden;
  }
  
  .resource-summary-header {
    margin-bottom: 8px;
  }
  
  .resource-summary-header h2 {
    font-size: 16px;
  }
  
  .resource-summary-header p {
    font-size: 11px;
  }
  
  .resource-summary-stats {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .resource-stat {
    padding: 8px 10px;
    min-height: 48px;
  }
  
  .resource-stat strong {
    font-size: 15px;
  }
  
  .resource-table-controls {
    margin: 4px 0 6px;
  }
  
  .resource-matrix-wrapper {
    max-height: 105px;
    min-height: 105px;
    overflow: auto;
  }
  
  .resource-weekly-card {
    min-height: 470px;
  }
  .resource-summary-card {
    padding: 10px 14px;
    max-height: 175px;
  }
  
  .resource-summary-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 6px;
  }
  
  .resource-summary-header h2 {
    font-size: 15px;
    margin: 0;
  }
  
  .resource-summary-header p {
    display: none;
  }
  
  .resource-summary-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
  }
  
  .resource-stat {
    flex: 1;
    padding: 6px 10px;
    min-height: 38px;
  }
  
  .resource-stat .label {
    font-size: 10px;
    margin-bottom: 2px;
  }
  
  .resource-stat strong {
    font-size: 13px;
  }
  
  .resource-table-controls {
    position: absolute;
    right: 14px;
    top: 78px;
    margin: 0;
  }
  
  .resource-summary-card {
    position: relative;
  }
  
  .resource-table-controls select {
    height: 32px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  
  .resource-matrix-wrapper {
    max-height: 82px;
    min-height: 82px;
    margin-top: 4px;
  }
  
  .resource-weekly-card {
    min-height: 420px;
  }
  .resource-summary-card {
    max-height: 445px;
    min-height: 315px;
    overflow: hidden;
  }
  
  .resource-matrix-wrapper {
    max-height: 295px;
    min-height: 195px;
    margin-top: 8px;
  }
  
  .resource-weekly-card {
    min-height: 450px;
  }
  .resource-week-row {
    grid-template-columns:
      180px
      70px
      90px
      70px
      repeat(var(--week-count), 58px);
  }
  
  .resource-week-meta {
    min-height: 34px;
    padding: 8px;
    border-right: 1px solid rgba(51, 65, 85, 0.55);
    font-size: 11px;
    color: #e2e8f0;
    text-align: center;
    background: #020617;
  }
  
  .resource-week-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #020617;
    font-weight: 800;
  }
  
  .resource-week-data:hover .resource-week-cell,
  .resource-week-data:hover .resource-week-meta,
  .resource-week-data:hover .resource-week-role {
    background-color: rgba(14, 165, 233, 0.08);
  }