.container {
  padding: 16px;
  background: #f6f8fc;
  min-height: calc(89vh - 0px);

  .grid {
    height: 100%;
  }

  .panel {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(12, 24, 52, 0.06);
    overflow: hidden;
  }

  .panelHeader {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eef2f7;

    .panelTitle {
      font-size: 16px;
      font-weight: 600;
      color: #1f2a37;
    }

    .headerBtn {
      border-radius: 18px;
      height: 32px;
      padding: 0 12px;
    }
  }

  .leftBody {
    display: flex;
    gap: 14px;
    padding: 14px;

    .formWrap {
      flex: 1;
      min-width: 0;
      padding-right: 6px;

      .form {
        :global {
          .ant-form-item {
            margin-bottom: 12px;
          }
          .ant-radio-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
          }
          .ant-radio-button-wrapper {
            border-radius: 16px;
            overflow: hidden;
          }
        }

        .fullWidth {
          width: 100%;
        }

        .valueRow {
          width: 100%;

          .valueSelect {
            width: 110px;
          }

          .valueInput {
            width: 100%;
          }

          .addBtn {
            width: 36px;
            border-radius: 10px;
            border-color: #c7d2fe;
            color: #2f54eb;
          }
        }

        .uploader {
          border-radius: 12px;

          :global {
            .ant-upload-drag {
              border-radius: 12px;
              border: 1px dashed #cbd5e1;
              background: #fbfcfe;
            }
            .ant-upload-drag:hover {
              border-color: #5b7cff;
            }
          }

          .uploadInner {
            padding: 14px 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;

            .uploadIcon {
              width: 44px;
              height: 44px;
              border-radius: 12px;
              background: rgba(91, 124, 255, 0.12);
              color: #2f54eb;
              display: flex;
              align-items: center;
              justify-content: center;
              font-size: 20px;
            }

            .uploadBtn {
              border-radius: 18px;
              height: 30px;
              padding: 0 14px;
            }

            .uploadHint {
              font-size: 12px;
              color: #94a3b8;
              line-height: 18px;
            }
          }
        }

        .formActions {
          display: flex;
          gap: 10px;
          padding-top: 6px;

          .primaryAction {
            border-radius: 18px;
            height: 34px;
            padding: 0 22px;
            background: #4b63ff;
          }

          .secondaryAction {
            border-radius: 18px;
            height: 34px;
            padding: 0 22px;
          }
        }
      }
    }

    .templateWrap {
      width: 200px;
      border-left: 1px solid #eef2f7;
      padding-left: 12px;

      .templateTitle {
        font-size: 13px;
        font-weight: 600;
        color: #6b7280;
        padding: 2px 2px 10px;
      }

      .templateList {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: 560px;
        overflow: auto;
        padding-right: 6px;
      }

      .templateItem {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 10px;
        border-radius: 12px;
        background: #f7faff;
        border: 1px solid #eef2f7;
        cursor: pointer;

        &:hover {
          border-color: #c7d2fe;
          background: #f3f6ff;
        }

        .templateIcon {
          width: 30px;
          height: 30px;
          border-radius: 10px;
          background: rgba(47, 84, 235, 0.12);
          color: #2f54eb;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        .templateText {
          font-size: 13px;
          color: #334155;
          font-weight: 500;
        }
      }
    }
  }

  .pendingRow {
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;

    .pendingCard {
      border-radius: 14px;
      background: #f5f9ff;
      border: 1px solid #cfe0ff;
      box-shadow: none;

      :global {
        .ant-card-body {
          padding: 12px;
        }
      }

      .pendingDevice {
        font-size: 12px;
        color: #475569;

        .deviceLink {
          color: #2f54eb;
        }
      }

      .pendingMeta {
        padding-top: 8px;
        display: flex;
        flex-direction: column;
        gap: 6px;

        .metaLine {
          font-size: 12px;
          color: #64748b;
          display: flex;
          align-items: center;

          .metaKey {
            width: 66px;
            color: #94a3b8;
            flex: 0 0 auto;
          }

          .metaVal {
            color: #475569;
          }

          .statusDot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #22c55e;
            margin-right: 6px;
          }

          .statusText {
            color: #16a34a;
            font-weight: 600;
          }
        }
      }

      .pendingActions {
        padding-top: 10px;
        display: flex;
        justify-content: center;

        .detailBtn {
          width: 100%;
          border-radius: 18px;
          height: 32px;
          background: #4b63ff;
        }
      }
    }
  }

  .todaySection {
    padding: 0 14px 14px;

    .todayHeader {
      padding: 8px 0 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;

      .todayTitle {
        font-size: 14px;
        font-weight: 600;
        color: #1f2a37;
      }

      .todayRight {
        display: flex;
        align-items: center;
        gap: 10px;

        .todayCount {
          color: #64748b;
          font-size: 12px;
        }

        .auditBtn {
          border-radius: 18px;
          height: 32px;
          background: #4b63ff;
        }
      }
    }

    .table {
      :global {
        .ant-table {
          border-radius: 12px;
          overflow: hidden;
        }
        .ant-table-thead > tr > th {
          background: #f2f6ff;
          color: #475569;
          font-weight: 600;
        }
      }
    }

    .paginationWrap {
      padding-top: 10px;
      display: flex;
      justify-content: flex-end;
    }
  }
}

@media (max-width: 1200px) {
  .container {
    .leftBody {
      flex-direction: column;

      .templateWrap {
        width: 100%;
        border-left: none;
        border-top: 1px solid #eef2f7;
        padding-left: 0;
        padding-top: 12px;
      }
    }

    .pendingRow {
      grid-template-columns: 1fr;
    }
  }
}
